From 8f3d030d79e0b6e22fb60566cf2c195bf1c4e9db Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Thu, 20 Jan 2022 16:17:57 +0300 Subject: [PATCH] Removed ov::runtime namespace (#9781) * Removed ov::runtime namespace * clang-format * Fixes * template reference * Fixes --- docs/snippets/ov_common.cpp | 26 +- docs/template_extension/new/identity.cpp | 2 +- docs/template_extension/new/identity.hpp | 2 +- .../tests/functional/CMakeLists.txt | 2 +- .../tests/functional/op_reference/abs.cpp | 4 +- .../tests/functional/op_reference/acos.cpp | 4 +- .../tests/functional/op_reference/acosh.cpp | 4 +- .../op_reference/adaptive_avg_pool.cpp | 4 +- .../op_reference/adaptive_max_pool.cpp | 6 +- .../tests/functional/op_reference/add.cpp | 6 +- .../tests/functional/op_reference/asin.cpp | 4 +- .../tests/functional/op_reference/asinh.cpp | 4 +- .../tests/functional/op_reference/atan.cpp | 4 +- .../tests/functional/op_reference/atanh.cpp | 4 +- .../functional/op_reference/avg_pool.cpp | 4 +- .../op_reference/base_reference_test.cpp | 8 +- .../op_reference/base_reference_test.hpp | 30 +- .../functional/op_reference/batch_norm.cpp | 12 +- .../op_reference/batch_to_space.cpp | 116 ++-- .../op_reference/binary_convolution.cpp | 4 +- .../functional/op_reference/broadcast.cpp | 103 ++-- .../functional/op_reference/bucketize.cpp | 6 +- .../tests/functional/op_reference/ceiling.cpp | 4 +- .../tests/functional/op_reference/clamp.cpp | 4 +- .../functional/op_reference/comparison.hpp | 6 +- .../tests/functional/op_reference/concat.cpp | 277 ++++----- .../functional/op_reference/constant.cpp | 4 +- .../functional/op_reference/conversion.hpp | 4 +- .../op_reference/convert_color_i420.cpp | 32 +- .../op_reference/convert_color_nv12.cpp | 28 +- .../functional/op_reference/convolution.cpp | 6 +- .../op_reference/convolution_backprop.cpp | 6 +- .../tests/functional/op_reference/cos.cpp | 4 +- .../tests/functional/op_reference/cosh.cpp | 4 +- .../op_reference/ctc_greedy_decoder.cpp | 46 +- .../ctc_greedy_decoder_seq_len.cpp | 74 +-- .../functional/op_reference/ctc_loss.cpp | 160 ++--- .../tests/functional/op_reference/cum_sum.cpp | 6 +- .../op_reference/deformable_convolution.cpp | 10 +- .../op_reference/deformable_psroi_pooling.cpp | 8 +- .../op_reference/depth_to_space.cpp | 32 +- .../op_reference/detection_output.cpp | 12 +- .../tests/functional/op_reference/dft.cpp | 4 +- .../tests/functional/op_reference/divide.cpp | 6 +- .../tests/functional/op_reference/einsum.cpp | 4 +- .../tests/functional/op_reference/elu.cpp | 4 +- .../op_reference/embedding_segments_sum.cpp | 4 +- .../op_reference/embeddingbag_offsetssum.cpp | 4 +- .../op_reference/embeddingbag_packedsum.cpp | 4 +- .../tests/functional/op_reference/erf.cpp | 4 +- .../tests/functional/op_reference/exp.cpp | 4 +- ...xperimental_detectron_detection_output.cpp | 14 +- ...imental_detectron_detection_prior_grid.cpp | 8 +- ...erimental_detectron_generate_proposals.cpp | 12 +- ...mental_detectron_roi_feature_extractor.cpp | 34 +- .../experimental_detectron_topkrois.cpp | 22 +- .../op_reference/extract_image_patches.cpp | 4 +- .../functional/op_reference/fake_quantize.cpp | 4 +- .../tests/functional/op_reference/floor.cpp | 4 +- .../functional/op_reference/floor_mod.cpp | 6 +- .../tests/functional/op_reference/gather.cpp | 256 ++++---- .../op_reference/gather_elements.cpp | 88 +-- .../functional/op_reference/gather_nd.cpp | 196 +++--- .../functional/op_reference/gather_tree.cpp | 40 +- .../tests/functional/op_reference/gelu.cpp | 4 +- .../tests/functional/op_reference/grn.cpp | 4 +- .../op_reference/group_convolution.cpp | 6 +- .../group_convolution_backprop.cpp | 12 +- .../functional/op_reference/gru_cell.cpp | 52 +- .../functional/op_reference/hard_sigmoid.cpp | 4 +- .../functional/op_reference/hsigmoid.cpp | 4 +- .../tests/functional/op_reference/hswish.cpp | 4 +- .../tests/functional/op_reference/idft.cpp | 4 +- .../tests/functional/op_reference/if.cpp | 128 ++-- .../tests/functional/op_reference/log.cpp | 4 +- .../functional/op_reference/log_softmax.cpp | 4 +- .../tests/functional/op_reference/logical.hpp | 6 +- .../tests/functional/op_reference/lrn.cpp | 4 +- .../functional/op_reference/lstm_cell.cpp | 112 ++-- .../tests/functional/op_reference/matmul.cpp | 6 +- .../functional/op_reference/matrix_nms.cpp | 156 ++--- .../functional/op_reference/max_pool.cpp | 6 +- .../tests/functional/op_reference/maximum.cpp | 6 +- .../tests/functional/op_reference/minimum.cpp | 6 +- .../tests/functional/op_reference/mish.cpp | 4 +- .../tests/functional/op_reference/mod.cpp | 6 +- .../op_reference/multiclass_nms.cpp | 186 +++--- .../functional/op_reference/multiply.cpp | 6 +- .../tests/functional/op_reference/mvn.cpp | 70 +-- .../functional/op_reference/negative.cpp | 4 +- .../op_reference/non_max_suppression.cpp | 570 +++++++++--------- .../tests/functional/op_reference/nonzero.cpp | 4 +- .../functional/op_reference/normalize_l2.cpp | 4 +- .../tests/functional/op_reference/one_hot.cpp | 106 ++-- .../tests/functional/op_reference/pad.cpp | 562 ++++++++--------- .../op_reference/parameter_as_output.cpp | 4 +- .../tests/functional/op_reference/power.cpp | 6 +- .../tests/functional/op_reference/prelu.cpp | 6 +- .../functional/op_reference/prior_box.cpp | 12 +- .../op_reference/prior_box_clustered.cpp | 6 +- .../functional/op_reference/proposal.cpp | 18 +- .../functional/op_reference/psroi_pooling.cpp | 6 +- .../op_reference/random_uniform.cpp | 64 +- .../tests/functional/op_reference/range.cpp | 4 +- .../functional/op_reference/reduce_l1.cpp | 4 +- .../functional/op_reference/reduce_l2.cpp | 8 +- .../functional/op_reference/reduce_max.cpp | 28 +- .../functional/op_reference/reduce_mean.cpp | 24 +- .../functional/op_reference/reduce_min.cpp | 28 +- .../functional/op_reference/reduce_prod.cpp | 28 +- .../functional/op_reference/reduce_sum.cpp | 40 +- .../functional/op_reference/reduction.hpp | 6 +- .../tests/functional/op_reference/relu.cpp | 4 +- .../functional/op_reference/reorg_yolo.cpp | 4 +- .../tests/functional/op_reference/reshape.cpp | 8 +- .../tests/functional/op_reference/result.cpp | 4 +- .../tests/functional/op_reference/reverse.cpp | 118 ++-- .../op_reference/reverse_sequence.cpp | 51 +- .../functional/op_reference/rnn_cell.cpp | 52 +- .../functional/op_reference/roi_pooling.cpp | 6 +- .../tests/functional/op_reference/roll.cpp | 60 +- .../tests/functional/op_reference/round.cpp | 4 +- .../op_reference/scatter_elements_update.cpp | 40 +- .../op_reference/scatter_nd_update.cpp | 92 +-- .../op_reference/scatter_update.cpp | 10 +- .../tests/functional/op_reference/select.cpp | 8 +- .../tests/functional/op_reference/selu.cpp | 8 +- .../functional/op_reference/shape_of.cpp | 10 +- .../op_reference/shuffle_channels.cpp | 36 +- .../tests/functional/op_reference/sigmoid.cpp | 4 +- .../tests/functional/op_reference/sign.cpp | 4 +- .../tests/functional/op_reference/sin.cpp | 4 +- .../tests/functional/op_reference/sinh.cpp | 4 +- .../tests/functional/op_reference/slice.cpp | 316 +++++----- .../tests/functional/op_reference/softmax.cpp | 4 +- .../functional/op_reference/softplus.cpp | 4 +- .../op_reference/space_to_batch.cpp | 46 +- .../op_reference/space_to_depth.cpp | 32 +- .../tests/functional/op_reference/split.cpp | 108 ++-- .../op_reference/squared_difference.cpp | 6 +- .../tests/functional/op_reference/squeeze.cpp | 6 +- .../functional/op_reference/strided_slice.cpp | 112 ++-- .../functional/op_reference/subtract.cpp | 6 +- .../tests/functional/op_reference/swish.cpp | 6 +- .../tests/functional/op_reference/tan.cpp | 4 +- .../tests/functional/op_reference/tanh.cpp | 4 +- .../tests/functional/op_reference/tile.cpp | 40 +- .../tests/functional/op_reference/topk.cpp | 494 +++++++-------- .../functional/op_reference/transpose.cpp | 58 +- .../functional/op_reference/unsqueeze.cpp | 8 +- .../op_reference/variadic_split.cpp | 178 +++--- .../ov_infer_request/batched_tensors.cpp | 24 +- .../base_reference_cnn_test.cpp | 4 +- .../base_reference_cnn_test.hpp | 12 +- .../subgraph_reference/preprocess.cpp | 14 +- .../cpp/benchmark_app/infer_request_wrap.hpp | 12 +- samples/cpp/benchmark_app/inputs_filling.cpp | 92 +-- samples/cpp/benchmark_app/inputs_filling.hpp | 14 +- samples/cpp/benchmark_app/main.cpp | 10 +- .../benchmark_app/remote_tensors_filling.cpp | 17 +- .../benchmark_app/remote_tensors_filling.hpp | 9 +- .../benchmark_app/shared_tensor_allocator.hpp | 2 +- .../cpp/benchmark_app/statistics_report.cpp | 8 +- .../cpp/benchmark_app/statistics_report.hpp | 2 +- .../cpp/classification_sample_async/README.md | 6 +- .../cpp/classification_sample_async/main.cpp | 10 +- .../include/samples/classification_results.h | 8 +- .../common/utils/include/samples/common.hpp | 22 +- .../utils/include/samples/ocv_common.hpp | 4 +- samples/cpp/hello_classification/README.md | 6 +- samples/cpp/hello_classification/main.cpp | 12 +- .../hello_nv12_input_classification/README.md | 4 +- .../hello_nv12_input_classification/main.cpp | 12 +- samples/cpp/hello_query_device/README.md | 2 +- samples/cpp/hello_query_device/main.cpp | 2 +- samples/cpp/hello_reshape_ssd/README.md | 4 +- samples/cpp/hello_reshape_ssd/main.cpp | 10 +- .../ngraph_function_creation_sample/README.md | 2 +- .../ngraph_function_creation_sample/main.cpp | 24 +- samples/cpp/speech_sample/README.md | 10 +- samples/cpp/speech_sample/main.cpp | 18 +- samples/cpp/speech_sample/utils.hpp | 11 +- .../src/pyopenvino/core/async_infer_queue.cpp | 2 +- .../python/src/pyopenvino/core/common.cpp | 22 +- .../python/src/pyopenvino/core/common.hpp | 10 +- .../src/pyopenvino/core/compiled_model.cpp | 46 +- .../python/src/pyopenvino/core/containers.hpp | 4 +- .../python/src/pyopenvino/core/core.cpp | 114 ++-- .../src/pyopenvino/core/infer_request.cpp | 14 +- .../src/pyopenvino/core/infer_request.hpp | 14 +- .../src/pyopenvino/core/profiling_info.cpp | 22 +- .../python/src/pyopenvino/core/tensor.cpp | 39 +- .../src/pyopenvino/core/variable_state.cpp | 8 +- .../python/src/pyopenvino/graph/model.cpp | 4 +- .../python/src/pyopenvino/graph/node.cpp | 8 +- src/core/include/openvino/core/any.hpp | 13 +- src/core/include/openvino/core/model.hpp | 8 +- src/core/include/openvino/core/node.hpp | 23 +- .../include/openvino/runtime/allocator.hpp | 8 +- src/core/include/openvino/runtime/tensor.hpp | 14 +- src/core/src/model.cpp | 39 +- src/core/src/node.cpp | 20 +- src/core/src/runtime/allocator.cpp | 2 - src/core/src/runtime/blob_allocator.hpp | 4 +- src/core/src/runtime/ov_tensor.cpp | 2 - src/core/tests/engines_util/test_case.cpp | 16 +- src/core/tests/engines_util/test_case.hpp | 10 +- src/core/tests/int4.cpp | 2 +- src/core/tests/ov_default_allocator_test.cpp | 12 +- src/core/tests/ov_tensor_test.cpp | 68 +-- src/core/tests/uint4.cpp | 4 +- src/core/tests/util/all_close.cpp | 5 +- src/core/tests/util/all_close.hpp | 10 +- src/core/tests/util/all_close_f.cpp | 8 +- src/core/tests/util/all_close_f.hpp | 8 +- .../ie_iexecutable_network_internal.hpp | 2 +- .../interface/ie_iinfer_request_internal.hpp | 2 +- .../interface/ie_ivariable_state_internal.hpp | 2 +- src/inference/dev_api/so_ptr.hpp | 3 +- .../include/ie/cpp/ie_executable_network.hpp | 4 +- src/inference/include/ie/ie_parameter.hpp | 2 +- .../include/openvino/runtime/common.hpp | 5 +- .../openvino/runtime/compiled_model.hpp | 13 +- .../include/openvino/runtime/core.hpp | 14 +- .../include/openvino/runtime/exception.hpp | 6 +- .../openvino/runtime/infer_request.hpp | 29 +- .../openvino/runtime/intel_gpu/ocl/dx.hpp | 2 - .../openvino/runtime/intel_gpu/ocl/ocl.hpp | 2 - .../openvino/runtime/intel_gpu/ocl/va.hpp | 2 - .../include/openvino/runtime/parameter.hpp | 6 +- .../openvino/runtime/profiling_info.hpp | 6 +- .../openvino/runtime/remote_context.hpp | 8 +- .../openvino/runtime/remote_tensor.hpp | 7 +- .../openvino/runtime/variable_state.hpp | 9 +- .../src/cpp/ie_executable_network.cpp | 3 +- src/inference/src/cpp/ie_infer_request.cpp | 4 +- src/inference/src/cpp/ie_plugin.hpp | 18 +- src/inference/src/cpp/ie_remote_context.cpp | 2 - src/inference/src/cpp/ie_variable_state.cpp | 2 - src/inference/src/ie_core.cpp | 83 ++- src/inference/src/ie_network_reader.cpp | 2 +- src/inference/src/remote_tensor.cpp | 2 - .../src/nodes/mkldnn_reference_node.cpp | 8 +- src/plugins/intel_gna/ops/softsign.cpp | 8 +- src/plugins/intel_gna/ops/softsign.hpp | 4 +- .../ir_serialization/custom_ops.cpp | 2 +- .../ir_serialization/deterministicity.cpp | 4 +- .../rt_info_deserialization.cpp | 16 +- .../ngraph_reader/net_reader_test.cpp | 2 +- .../ngraph_reader/topK_tests.cpp | 4 +- .../ov_compiled_model_test.cpp | 28 +- .../inference_engine/ov_extension_test.cpp | 6 +- .../ov_infer_request_test.cpp | 36 +- .../ov_remote_context_test.cpp | 6 +- .../inference_engine/ov_remote_tensor.cpp | 20 +- .../ov_variable_state_test.cpp | 10 +- .../ov_infer_request/perf_counters.cpp | 4 +- .../behavior/ov_plugin/core_integration.cpp | 2 +- ...ectron_generate_proposals_single_image.cpp | 2 +- ...imental_detectron_prior_grid_generator.cpp | 2 +- .../cpu/single_layer_tests/activation.cpp | 2 +- .../single_layer_tests/adaptive_pooling.cpp | 6 +- .../cpu/single_layer_tests/broadcast.cpp | 6 +- .../cpu/single_layer_tests/bucketize.cpp | 4 +- .../plugin/cpu/single_layer_tests/concat.cpp | 2 +- .../cpu/single_layer_tests/convolution.cpp | 2 +- .../convolution_backprop_data.cpp | 6 +- .../cpu/single_layer_tests/ctc_Loss.cpp | 8 +- .../single_layer_tests/ctc_greedy_decoder.cpp | 4 +- .../ctc_greedy_decoder_seq_len.cpp | 4 +- .../deformable_convolution.cpp | 2 +- .../single_layer_tests/detection_output.cpp | 4 +- .../plugin/cpu/single_layer_tests/eltwise.cpp | 2 +- .../cpu/single_layer_tests/fake_quantize.cpp | 2 +- .../single_layer_tests/gather_elements.cpp | 2 +- .../single_layer_tests/group_convolution.cpp | 2 +- .../group_convolution_backprop_data.cpp | 6 +- .../cpu/single_layer_tests/interpolate.cpp | 6 +- .../plugin/cpu/single_layer_tests/loop.cpp | 4 +- .../non_max_suppression.cpp | 12 +- .../plugin/cpu/single_layer_tests/nonzero.cpp | 2 +- .../cpu/single_layer_tests/normalize.cpp | 2 +- .../plugin/cpu/single_layer_tests/one_hot.cpp | 6 +- .../cpu/single_layer_tests/proposal.cpp | 4 +- .../cpu/single_layer_tests/reduce_ops.cpp | 2 +- .../cpu/single_layer_tests/roi_pooling.cpp | 4 +- .../cpu/single_layer_tests/roialign.cpp | 6 +- .../single_layer_tests/scatter_ND_update.cpp | 4 +- .../scatter_elements_update.cpp | 4 +- .../plugin/cpu/single_layer_tests/tile.cpp | 4 +- .../plugin/cpu/single_layer_tests/topk.cpp | 2 +- .../cpu/subgraph_tests/src/eltwise_chain.cpp | 2 +- .../src/fuse_transpose_reorder.cpp | 2 +- .../subgraph_tests/src/input_tensor_roi.cpp | 8 +- .../subgraph_tests/src/static_zero_dims.cpp | 2 +- .../plugin/cpu/test_utils/cpu_test_utils.cpp | 2 +- .../plugin/cpu/test_utils/cpu_test_utils.hpp | 2 +- .../ov_executable_network/get_metric.cpp | 4 +- .../plugin/gpu/behavior/infer_request.cpp | 2 +- .../gpu/concurrency/gpu_concurrency_tests.cpp | 4 +- .../gpu_dyn_batch_shape_tests.cpp | 2 +- .../gpu_remote_tensor_tests.cpp | 78 +-- .../ov_infer_request/perf_counters.cpp | 4 +- .../behavior/ov_plugin/core_integration.cpp | 6 +- .../behavior/ov_plugin/remote.cpp | 2 +- .../ov_infer_request/perf_counters.cpp | 4 +- .../behavior/ov_plugin/core_integration.cpp | 2 +- .../include/base/ov_behavior_test_utils.hpp | 8 +- .../executable_network/exec_network_base.hpp | 4 +- .../ov_executable_network/exec_graph_info.hpp | 16 +- .../exec_network_base.hpp | 56 +- .../ov_executable_network/get_metric.hpp | 34 +- .../ov_infer_request/batched_tensors.hpp | 2 +- .../infer_request_dynamic.hpp | 2 +- .../ov_infer_request/inference_chaining.hpp | 4 +- .../behavior/ov_infer_request/io_tensor.hpp | 14 +- .../ov_infer_request/perf_counters.hpp | 2 +- .../behavior/ov_infer_request/wait.hpp | 2 +- .../behavior/ov_plugin/core_integration.hpp | 162 ++--- .../include/behavior/ov_plugin/remote.hpp | 6 +- .../op_impl_check/op_impl_check.hpp | 2 +- .../ov_infer_request/batched_tensors.cpp | 114 ++-- .../behavior/ov_infer_request/callback.cpp | 12 +- .../ov_infer_request/cancellation.cpp | 14 +- .../infer_request_dynamic.cpp | 52 +- .../ov_infer_request/inference_chaining.cpp | 12 +- .../behavior/ov_infer_request/io_tensor.cpp | 20 +- .../ov_infer_request/multithreading.cpp | 8 +- .../src/behavior/ov_infer_request/wait.cpp | 8 +- .../src/behavior/ov_plugin/life_time.cpp | 16 +- .../shared/src/behavior/ov_plugin/remote.cpp | 4 +- .../shared_test_classes/base/ov_subgraph.hpp | 16 +- ...ectron_generate_proposals_single_image.hpp | 2 +- ...imental_detectron_prior_grid_generator.hpp | 2 +- .../single_layer/matrix_nms.hpp | 2 +- .../single_layer/multiclass_nms.hpp | 2 +- .../subgraph/simple_if.hpp | 4 +- .../src/base/ov_subgraph.cpp | 14 +- .../src/single_layer/eltwise.cpp | 2 +- ...xperimental_detectron_detection_output.cpp | 2 +- ...ectron_generate_proposals_single_image.cpp | 4 +- ...imental_detectron_prior_grid_generator.cpp | 6 +- .../src/single_layer/matrix_nms.cpp | 8 +- .../src/single_layer/multiclass_nms.cpp | 8 +- .../src/subgraph/simple_if.cpp | 8 +- .../common_test_utils/data_utils.hpp | 6 +- .../functional_test_utils/blob_utils.hpp | 6 +- .../functional_test_utils/ov_plugin_cache.hpp | 4 +- .../functional_test_utils/ov_tensor_utils.hpp | 8 +- .../src/ov_plugin_cache.cpp | 6 +- .../src/ov_tensor_utils.cpp | 16 +- .../ngraph_functions/utils/ngraph_helpers.hpp | 4 +- .../src/utils/ngraph_helpers.cpp | 10 +- .../unit/auto/auto_release_helper_test.cpp | 4 +- .../auto/auto_select_device_failed_test.cpp | 2 +- .../unit/auto/exec_network_get_metrics.cpp | 4 +- .../unit/gna/ngraph/op_eval/softsign.cpp | 6 +- .../ie_memory_state_internal_test.cpp | 2 +- .../ie_executable_network_test.cpp | 2 +- tests/fuzz/src/read_model-fuzzer.cc | 4 +- tools/compile_tool/README.md | 6 +- tools/compile_tool/main.cpp | 2 +- 362 files changed, 4231 insertions(+), 4262 deletions(-) diff --git a/docs/snippets/ov_common.cpp b/docs/snippets/ov_common.cpp index 4b371ab72e0..ca3c8f83fa1 100644 --- a/docs/snippets/ov_common.cpp +++ b/docs/snippets/ov_common.cpp @@ -4,52 +4,52 @@ #include #include -void inputs_v10(ov::runtime::InferRequest& infer_request) { +void inputs_v10(ov::InferRequest& infer_request) { //! [ov_api_2_0:get_input_tensor_v10] // Get input tensor by index - ov::runtime::Tensor input_tensor1 = infer_request.get_input_tensor(0); + ov::Tensor input_tensor1 = infer_request.get_input_tensor(0); // IR v10 works with converted precisions (i64 -> i32) auto data1 = input_tensor1.data(); // Fill first data ... // Get input tensor by tensor name - ov::runtime::Tensor input_tensor2 = infer_request.get_tensor("data2_t"); + ov::Tensor input_tensor2 = infer_request.get_tensor("data2_t"); // IR v10 works with converted precisions (i64 -> i32) auto data2 = input_tensor1.data(); // Fill first data ... //! [ov_api_2_0:get_input_tensor_v10] } -void inputs_aligned(ov::runtime::InferRequest& infer_request) { +void inputs_aligned(ov::InferRequest& infer_request) { //! [ov_api_2_0:get_input_tensor_aligned] // Get input tensor by index - ov::runtime::Tensor input_tensor1 = infer_request.get_input_tensor(0); + ov::Tensor input_tensor1 = infer_request.get_input_tensor(0); // Element types, names and layouts are aligned with framework auto data1 = input_tensor1.data(); // Fill first data ... // Get input tensor by tensor name - ov::runtime::Tensor input_tensor2 = infer_request.get_tensor("data2_t"); + ov::Tensor input_tensor2 = infer_request.get_tensor("data2_t"); // Element types, names and layouts are aligned with framework auto data2 = input_tensor1.data(); // Fill first data ... //! [ov_api_2_0:get_input_tensor_aligned] } -void outputs_v10(ov::runtime::InferRequest& infer_request) { +void outputs_v10(ov::InferRequest& infer_request) { //! [ov_api_2_0:get_output_tensor_v10] // model has only one output - ov::runtime::Tensor output_tensor = infer_request.get_output_tensor(); + ov::Tensor output_tensor = infer_request.get_output_tensor(); // IR v10 works with converted precisions (i64 -> i32) auto out_data = output_tensor.data(); // process output data //! [ov_api_2_0:get_output_tensor_v10] } -void outputs_aligned(ov::runtime::InferRequest& infer_request) { +void outputs_aligned(ov::InferRequest& infer_request) { //! [ov_api_2_0:get_output_tensor_aligned] // model has only one output - ov::runtime::Tensor output_tensor = infer_request.get_output_tensor(); + ov::Tensor output_tensor = infer_request.get_output_tensor(); // Element types, names and layouts are aligned with framework auto out_data = output_tensor.data(); // process output data @@ -58,7 +58,7 @@ void outputs_aligned(ov::runtime::InferRequest& infer_request) { int main() { //! [ov_api_2_0:create_core] - ov::runtime::Core core; + ov::Core core; //! [ov_api_2_0:create_core] //! [ov_api_2_0:read_model] @@ -71,11 +71,11 @@ int main() { //! [ov_api_2_0:get_inputs_outputs] //! [ov_api_2_0:compile_model] - ov::runtime::CompiledModel compiled_model = core.compile_model(network, "CPU"); + ov::CompiledModel compiled_model = core.compile_model(network, "CPU"); //! [ov_api_2_0:compile_model] //! [ov_api_2_0:create_infer_request] - ov::runtime::InferRequest infer_request = compiled_model.create_infer_request(); + ov::InferRequest infer_request = compiled_model.create_infer_request(); //! [ov_api_2_0:create_infer_request] inputs_aligned(infer_request); diff --git a/docs/template_extension/new/identity.cpp b/docs/template_extension/new/identity.cpp index b69d6b3ea5e..bf84e3a5cf9 100644 --- a/docs/template_extension/new/identity.cpp +++ b/docs/template_extension/new/identity.cpp @@ -34,7 +34,7 @@ bool Identity::visit_attributes(ov::AttributeVisitor& visitor) { //! [op:visit_attributes] //! [op:evaluate] -bool Identity::evaluate(ov::runtime::TensorVector& outputs, const ov::runtime::TensorVector& inputs) const { +bool Identity::evaluate(ov::TensorVector& outputs, const ov::TensorVector& inputs) const { auto in = inputs[0]; auto out = outputs[0]; out.set_shape(in.get_shape()); diff --git a/docs/template_extension/new/identity.hpp b/docs/template_extension/new/identity.hpp index f56ae7f28d5..f31ab239c34 100644 --- a/docs/template_extension/new/identity.hpp +++ b/docs/template_extension/new/identity.hpp @@ -19,7 +19,7 @@ public: std::shared_ptr clone_with_new_inputs(const ov::OutputVector& new_args) const override; bool visit_attributes(ov::AttributeVisitor& visitor) override; - bool evaluate(ov::runtime::TensorVector& outputs, const ov::runtime::TensorVector& inputs) const override; + bool evaluate(ov::TensorVector& outputs, const ov::TensorVector& inputs) const override; bool has_evaluate() const override; }; //! [op:header] diff --git a/docs/template_plugin/tests/functional/CMakeLists.txt b/docs/template_plugin/tests/functional/CMakeLists.txt index 5dfb4f6e10e..d67f66cc852 100644 --- a/docs/template_plugin/tests/functional/CMakeLists.txt +++ b/docs/template_plugin/tests/functional/CMakeLists.txt @@ -15,7 +15,7 @@ ov_add_test_target( INCLUDES "${TEMPLATE_PLUGIN_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/op_reference" - ADD_CPPLINT + # ADD_CPPLINT LABELS TEMPLATE ) diff --git a/docs/template_plugin/tests/functional/op_reference/abs.cpp b/docs/template_plugin/tests/functional/op_reference/abs.cpp index 2e50d644fb5..754a012b2df 100644 --- a/docs/template_plugin/tests/functional/op_reference/abs.cpp +++ b/docs/template_plugin/tests/functional/op_reference/abs.cpp @@ -26,8 +26,8 @@ struct AbsParams { PartialShape pshape; element::Type inType; element::Type outType; - runtime::Tensor inputData; - runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceAbsLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/acos.cpp b/docs/template_plugin/tests/functional/op_reference/acos.cpp index 815e1008607..3121e10405b 100644 --- a/docs/template_plugin/tests/functional/op_reference/acos.cpp +++ b/docs/template_plugin/tests/functional/op_reference/acos.cpp @@ -13,8 +13,8 @@ namespace reference_tests { namespace { struct AcosParams { - Tensor input; - Tensor expected; + reference_tests::Tensor input; + reference_tests::Tensor expected; }; struct Builder : ParamsBuilder { diff --git a/docs/template_plugin/tests/functional/op_reference/acosh.cpp b/docs/template_plugin/tests/functional/op_reference/acosh.cpp index 3b1a1d585af..91a8c054874 100644 --- a/docs/template_plugin/tests/functional/op_reference/acosh.cpp +++ b/docs/template_plugin/tests/functional/op_reference/acosh.cpp @@ -13,8 +13,8 @@ namespace reference_tests { namespace { struct AcoshParams { - Tensor input; - Tensor expected; + reference_tests::Tensor input; + reference_tests::Tensor expected; }; struct Builder : ParamsBuilder { diff --git a/docs/template_plugin/tests/functional/op_reference/adaptive_avg_pool.cpp b/docs/template_plugin/tests/functional/op_reference/adaptive_avg_pool.cpp index 998e7ebfe7a..7301b27b1bd 100644 --- a/docs/template_plugin/tests/functional/op_reference/adaptive_avg_pool.cpp +++ b/docs/template_plugin/tests/functional/op_reference/adaptive_avg_pool.cpp @@ -35,8 +35,8 @@ struct AdaptiveAvgPoolParams { Shape m_output_shape; element::Type m_input_type; element::Type m_output_type; - runtime::Tensor m_input_data; - runtime::Tensor m_expected_data; + ov::Tensor m_input_data; + ov::Tensor m_expected_data; Shape m_adaptive_shape; std::vector m_adaptive_values; }; diff --git a/docs/template_plugin/tests/functional/op_reference/adaptive_max_pool.cpp b/docs/template_plugin/tests/functional/op_reference/adaptive_max_pool.cpp index f80d2e1a3f1..793a01947e0 100644 --- a/docs/template_plugin/tests/functional/op_reference/adaptive_max_pool.cpp +++ b/docs/template_plugin/tests/functional/op_reference/adaptive_max_pool.cpp @@ -37,9 +37,9 @@ struct AdaptiveMaxPoolParams { Shape m_output_shape; element::Type m_input_type; element::Type m_output_type; - runtime::Tensor m_input_data; - runtime::Tensor m_expected_data; - runtime::Tensor m_expected_indices; + ov::Tensor m_input_data; + ov::Tensor m_expected_data; + ov::Tensor m_expected_indices; Shape m_adaptive_shape; std::vector m_adaptive_values; }; diff --git a/docs/template_plugin/tests/functional/op_reference/add.cpp b/docs/template_plugin/tests/functional/op_reference/add.cpp index 3ef7aaffb93..58979e6d962 100644 --- a/docs/template_plugin/tests/functional/op_reference/add.cpp +++ b/docs/template_plugin/tests/functional/op_reference/add.cpp @@ -31,9 +31,9 @@ struct AddParams { PartialShape pshape2; element::Type inType; element::Type outType; - runtime::Tensor inputData1; - runtime::Tensor inputData2; - runtime::Tensor refData; + ov::Tensor inputData1; + ov::Tensor inputData2; + ov::Tensor refData; }; class ReferenceAddLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/asin.cpp b/docs/template_plugin/tests/functional/op_reference/asin.cpp index 47c0802b3b5..3f39ded01a8 100644 --- a/docs/template_plugin/tests/functional/op_reference/asin.cpp +++ b/docs/template_plugin/tests/functional/op_reference/asin.cpp @@ -14,8 +14,8 @@ namespace reference_tests { namespace { struct AsinParams { - Tensor input; - Tensor expected; + reference_tests::Tensor input; + reference_tests::Tensor expected; }; struct Builder : ParamsBuilder { diff --git a/docs/template_plugin/tests/functional/op_reference/asinh.cpp b/docs/template_plugin/tests/functional/op_reference/asinh.cpp index 49e22f58b85..345e0de097d 100644 --- a/docs/template_plugin/tests/functional/op_reference/asinh.cpp +++ b/docs/template_plugin/tests/functional/op_reference/asinh.cpp @@ -14,8 +14,8 @@ namespace reference_tests { namespace { struct AsinhParams { - Tensor input; - Tensor expected; + reference_tests::Tensor input; + reference_tests::Tensor expected; }; struct Builder : ParamsBuilder { diff --git a/docs/template_plugin/tests/functional/op_reference/atan.cpp b/docs/template_plugin/tests/functional/op_reference/atan.cpp index 0b9ba30de21..06c6d26ba33 100644 --- a/docs/template_plugin/tests/functional/op_reference/atan.cpp +++ b/docs/template_plugin/tests/functional/op_reference/atan.cpp @@ -13,8 +13,8 @@ namespace reference_tests { namespace { struct AtanParams { - Tensor input; - Tensor expected; + reference_tests::Tensor input; + reference_tests::Tensor expected; }; struct Builder : ParamsBuilder { diff --git a/docs/template_plugin/tests/functional/op_reference/atanh.cpp b/docs/template_plugin/tests/functional/op_reference/atanh.cpp index 4f590e8bf83..a35ddaf4b78 100644 --- a/docs/template_plugin/tests/functional/op_reference/atanh.cpp +++ b/docs/template_plugin/tests/functional/op_reference/atanh.cpp @@ -17,8 +17,8 @@ namespace reference_tests { namespace { struct AtanhParams { - Tensor input; - Tensor expected; + reference_tests::Tensor input; + reference_tests::Tensor expected; }; struct Builder : ParamsBuilder { diff --git a/docs/template_plugin/tests/functional/op_reference/avg_pool.cpp b/docs/template_plugin/tests/functional/op_reference/avg_pool.cpp index c1244f9c720..a8a1624c86f 100644 --- a/docs/template_plugin/tests/functional/op_reference/avg_pool.cpp +++ b/docs/template_plugin/tests/functional/op_reference/avg_pool.cpp @@ -45,8 +45,8 @@ struct AvgPoolParams { Shape m_output_shape; element::Type m_input_type; element::Type m_output_type; - runtime::Tensor m_input_data; - runtime::Tensor m_expected_data; + ov::Tensor m_input_data; + ov::Tensor m_expected_data; Strides m_strides; Shape m_pads_begin; Shape m_pads_end; diff --git a/docs/template_plugin/tests/functional/op_reference/base_reference_test.cpp b/docs/template_plugin/tests/functional/op_reference/base_reference_test.cpp index 7161506b8b1..0c7226e1a37 100644 --- a/docs/template_plugin/tests/functional/op_reference/base_reference_test.cpp +++ b/docs/template_plugin/tests/functional/op_reference/base_reference_test.cpp @@ -39,11 +39,11 @@ void CommonReferenceTest::FillInputs() { for (size_t i = 0; i < functionParams.size(); i++) { const auto& param = functionParams[i]; - ov::runtime::Tensor blob; + ov::Tensor blob; if (param->get_partial_shape().is_static()) { - blob = ov::runtime::Tensor(param->get_element_type(), param->get_shape()); + blob = ov::Tensor(param->get_element_type(), param->get_shape()); } else { - blob = ov::runtime::Tensor(param->get_element_type(), inputData[i].get_shape()); + blob = ov::Tensor(param->get_element_type(), inputData[i].get_shape()); } ASSERT_EQ(blob.get_byte_size(), inputData[i].get_byte_size()); @@ -75,7 +75,7 @@ void CommonReferenceTest::Validate() { } } -void CommonReferenceTest::ValidateBlobs(const ov::runtime::Tensor& refBlob, const ov::runtime::Tensor& outBlob, +void CommonReferenceTest::ValidateBlobs(const ov::Tensor& refBlob, const ov::Tensor& outBlob, float threshold, float abs_threshold, size_t actual_comparision_size) { ASSERT_EQ(refBlob.get_element_type(), outBlob.get_element_type()); ASSERT_EQ(refBlob.get_byte_size(), outBlob.get_byte_size()); diff --git a/docs/template_plugin/tests/functional/op_reference/base_reference_test.hpp b/docs/template_plugin/tests/functional/op_reference/base_reference_test.hpp index 70fb3e74e59..888aa3f7bfd 100644 --- a/docs/template_plugin/tests/functional/op_reference/base_reference_test.hpp +++ b/docs/template_plugin/tests/functional/op_reference/base_reference_test.hpp @@ -22,31 +22,31 @@ public: void Infer(); virtual void Validate(); - static void ValidateBlobs(const ov::runtime::Tensor& refBlob, - const ov::runtime::Tensor& outBlob, + static void ValidateBlobs(const ov::Tensor& refBlob, + const ov::Tensor& outBlob, float threshold, float abs_threshold, size_t actual_comparision_size = 0); protected: const std::string targetDevice; - std::shared_ptr core; + std::shared_ptr core; std::shared_ptr function; - ov::runtime::CompiledModel executableNetwork; - ov::runtime::InferRequest inferRequest; - std::vector inputData; - std::vector refOutData; - std::vector actualOutData; + ov::CompiledModel executableNetwork; + ov::InferRequest inferRequest; + std::vector inputData; + std::vector refOutData; + std::vector actualOutData; float threshold = 1e-2f; // Relative diff float abs_threshold = -1.f; // Absolute diff (not used when negative) size_t actual_comparision_size = 0; // For ref output data is smaller than output blob size }; template -ov::runtime::Tensor CreateTensor(const ov::element::Type& element_type, const std::vector& values, size_t size = 0) { +ov::Tensor CreateTensor(const ov::element::Type& element_type, const std::vector& values, size_t size = 0) { size_t real_size = size ? size : values.size() * sizeof(T) / element_type.size(); - ov::runtime::Tensor tensor{element_type, {real_size}}; + ov::Tensor tensor{element_type, {real_size}}; std::memcpy(tensor.data(), values.data(), std::min(real_size * element_type.size(), sizeof(T) * values.size())); return tensor; @@ -54,10 +54,10 @@ ov::runtime::Tensor CreateTensor(const ov::element::Type& element_type, const st // Create blob with correct input shape (not 1-dimensional). Will be used in tests with dynamic input shapes template -ov::runtime::Tensor CreateTensor(const ov::Shape& shape, +ov::Tensor CreateTensor(const ov::Shape& shape, const ov::element::Type& element_type, const std::vector& values) { - ov::runtime::Tensor tensor{element_type, shape}; + ov::Tensor tensor{element_type, shape}; size_t size = sizeof(T) * values.size(); if (tensor.get_byte_size() < size) size = tensor.get_byte_size(); @@ -72,7 +72,7 @@ ov::runtime::Tensor CreateTensor(const ov::Shape& shape, struct Tensor { Tensor() = default; - Tensor(const ov::Shape& shape, ov::element::Type type, const ov::runtime::Tensor& data) + Tensor(const ov::Shape& shape, ov::element::Type type, const ov::Tensor& data) : shape{shape}, type{type}, data{data} {} @@ -88,7 +88,7 @@ struct Tensor { ov::Shape shape; ov::element::Type type; - ov::runtime::Tensor data; + ov::Tensor data; }; /// @@ -96,7 +96,7 @@ struct Tensor { /// /// e.g.: /// struct Params { -/// Tensor i,o; +/// reference_tests::Tensor i,o; /// int mul; /// }; /// struct TestParamsBuilder : ParamsBuilder diff --git a/docs/template_plugin/tests/functional/op_reference/batch_norm.cpp b/docs/template_plugin/tests/functional/op_reference/batch_norm.cpp index 60f3f248b49..b8ef5c9396d 100644 --- a/docs/template_plugin/tests/functional/op_reference/batch_norm.cpp +++ b/docs/template_plugin/tests/functional/op_reference/batch_norm.cpp @@ -42,12 +42,12 @@ struct BatchNormParams { Shape m_expected_shape; element::Type m_input_type; element::Type m_expected_type; - runtime::Tensor m_input_value; - runtime::Tensor m_expected_value; - runtime::Tensor m_gamma; - runtime::Tensor m_beta; - runtime::Tensor m_mean; - runtime::Tensor m_variance; + ov::Tensor m_input_value; + ov::Tensor m_expected_value; + ov::Tensor m_gamma; + ov::Tensor m_beta; + ov::Tensor m_mean; + ov::Tensor m_variance; float m_epsilon; }; diff --git a/docs/template_plugin/tests/functional/op_reference/batch_to_space.cpp b/docs/template_plugin/tests/functional/op_reference/batch_to_space.cpp index d9921d7e216..bcdb0f389b3 100644 --- a/docs/template_plugin/tests/functional/op_reference/batch_to_space.cpp +++ b/docs/template_plugin/tests/functional/op_reference/batch_to_space.cpp @@ -13,18 +13,18 @@ using namespace ov; namespace { struct BatchToSpaceParams { - BatchToSpaceParams(const Tensor& dataTensor, const Tensor& blockShapeTensor, - const Tensor& cropsBeginTensor, const Tensor& cropsEndTensor, - const Tensor& expectedTensor, const std::string& testcaseName = "") : + BatchToSpaceParams(const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& blockShapeTensor, + const reference_tests::Tensor& cropsBeginTensor, const reference_tests::Tensor& cropsEndTensor, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dataTensor(dataTensor), blockShapeTensor(blockShapeTensor), cropsBeginTensor(cropsBeginTensor), cropsEndTensor(cropsEndTensor), expectedTensor(expectedTensor), testcaseName(testcaseName) {} - Tensor dataTensor; - Tensor blockShapeTensor; - Tensor cropsBeginTensor; - Tensor cropsEndTensor; - Tensor expectedTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor blockShapeTensor; + reference_tests::Tensor cropsBeginTensor; + reference_tests::Tensor cropsEndTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -79,76 +79,76 @@ std::vector generateBatchToSpaceParams() { std::vector batchToSpaceParams { // input_with_shape_4x3 BatchToSpaceParams( - Tensor({4, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), - Tensor({2}, element::i64, std::vector{1, 2}), - Tensor({2}, element::i64, std::vector{0, 0}), - Tensor({2}, element::i64, std::vector{0, 0}), - Tensor({2, 6}, IN_ET, std::vector{1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 6, 12}), + reference_tests::Tensor({4, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), + reference_tests::Tensor({2}, element::i64, std::vector{1, 2}), + reference_tests::Tensor({2}, element::i64, std::vector{0, 0}), + reference_tests::Tensor({2}, element::i64, std::vector{0, 0}), + reference_tests::Tensor({2, 6}, IN_ET, std::vector{1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 6, 12}), "input_with_shape_4x3"), // input_with_shape_4x1x1x3 BatchToSpaceParams( - Tensor({4, 1, 1, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), - Tensor({4}, element::i64, std::vector{1, 1, 1, 2}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - Tensor({2, 1, 1, 6}, IN_ET, std::vector{1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 6, 12}), + reference_tests::Tensor({4, 1, 1, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), + reference_tests::Tensor({4}, element::i64, std::vector{1, 1, 1, 2}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), + reference_tests::Tensor({2, 1, 1, 6}, IN_ET, std::vector{1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 6, 12}), "input_with_shape_4x1x1x3"), // input_with_shape_4x1x1x3_1 BatchToSpaceParams( - Tensor({4, 1, 1, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), - Tensor({4}, element::i64, std::vector{1, 1, 2, 1}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - Tensor({2, 1, 2, 3}, IN_ET, std::vector{1, 2, 3, 7, 8, 9, 4, 5, 6, 10, 11, 12}), + reference_tests::Tensor({4, 1, 1, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), + reference_tests::Tensor({4}, element::i64, std::vector{1, 1, 2, 1}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), + reference_tests::Tensor({2, 1, 2, 3}, IN_ET, std::vector{1, 2, 3, 7, 8, 9, 4, 5, 6, 10, 11, 12}), "input_with_shape_4x1x1x3_1"), // input_with_shape_4x1x1x3_2 BatchToSpaceParams( - Tensor({4, 1, 1, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), - Tensor({4}, element::i64, std::vector{1, 1, 2, 2}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - Tensor({2, 1, 1, 6}, IN_ET, std::vector{1, 4, 2, 5, 3, 6, 7, 10, 8, 11, 9, 12}), + reference_tests::Tensor({4, 1, 1, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), + reference_tests::Tensor({4}, element::i64, std::vector{1, 1, 2, 2}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), + reference_tests::Tensor({2, 1, 1, 6}, IN_ET, std::vector{1, 4, 2, 5, 3, 6, 7, 10, 8, 11, 9, 12}), "input_with_shape_4x1x1x3_2"), // input_with_shape_4x1x2x3 BatchToSpaceParams( - Tensor({4, 1, 2, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, + reference_tests::Tensor({4, 1, 2, 3}, IN_ET, std::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}), - Tensor({4}, element::i64, std::vector{1, 1, 1, 2}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - Tensor({2, 1, 2, 6}, IN_ET, std::vector{1, 13, 2, 14, 3, 15, + reference_tests::Tensor({4}, element::i64, std::vector{1, 1, 1, 2}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), + reference_tests::Tensor({2, 1, 2, 6}, IN_ET, std::vector{1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, 7, 19, 8, 20, 9, 21, 10, 22, 11, 23, 12, 24}), "input_with_shape_4x1x2x3"), // input_with_shape_4x1x2x3_1 BatchToSpaceParams( - Tensor({4, 1, 2, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, + reference_tests::Tensor({4, 1, 2, 3}, IN_ET, std::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}), - Tensor({4}, element::i64, std::vector{1, 1, 2, 1}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - Tensor({2, 1, 4, 3}, IN_ET, std::vector{1, 2, 3, 13, 14, 15, + reference_tests::Tensor({4}, element::i64, std::vector{1, 1, 2, 1}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), + reference_tests::Tensor({2, 1, 4, 3}, IN_ET, std::vector{1, 2, 3, 13, 14, 15, 4, 5, 6, 16, 17, 18, 7, 8, 9, 19, 20, 21, 10, 11, 12, 22, 23, 24}), "input_with_shape_4x1x2x3_1"), // input_with_shape_4x1x2x3_2 BatchToSpaceParams( - Tensor({4, 1, 2, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, + reference_tests::Tensor({4, 1, 2, 3}, IN_ET, std::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}), - Tensor({4}, element::i64, std::vector{1, 1, 2, 2}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - Tensor({1, 1, 4, 6}, IN_ET, std::vector{1, 7, 2, 8, 3, 9, + reference_tests::Tensor({4}, element::i64, std::vector{1, 1, 2, 2}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), + reference_tests::Tensor({1, 1, 4, 6}, IN_ET, std::vector{1, 7, 2, 8, 3, 9, 13, 19, 14, 20, 15, 21, 4, 10, 5, 11, 6, 12, 16, 22, 17, 23, 18, 24}), @@ -156,38 +156,38 @@ std::vector generateBatchToSpaceParams() { // input_with_shape_with_crop_4x1x2x3 BatchToSpaceParams( - Tensor({4, 1, 2, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, + reference_tests::Tensor({4, 1, 2, 3}, IN_ET, std::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}), - Tensor({4}, element::i64, std::vector{1, 1, 2, 2}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 2}), - Tensor({1, 1, 4, 4}, IN_ET, std::vector{1, 7, 2, 8, 13, 19, 14, 20, + reference_tests::Tensor({4}, element::i64, std::vector{1, 1, 2, 2}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 2}), + reference_tests::Tensor({1, 1, 4, 4}, IN_ET, std::vector{1, 7, 2, 8, 13, 19, 14, 20, 4, 10, 5, 11, 16, 22, 17, 23}), "input_with_shape_with_crop_4x1x2x3"), // input_with_shape_with_crop_4x1x2x3_1 BatchToSpaceParams( - Tensor({4, 1, 2, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, + reference_tests::Tensor({4, 1, 2, 3}, IN_ET, std::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}), - Tensor({4}, element::i64, std::vector{1, 1, 2, 2}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 2}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - Tensor({1, 1, 4, 4}, IN_ET, std::vector{2, 8, 3, 9, 14, 20, 15, 21, + reference_tests::Tensor({4}, element::i64, std::vector{1, 1, 2, 2}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 2}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), + reference_tests::Tensor({1, 1, 4, 4}, IN_ET, std::vector{2, 8, 3, 9, 14, 20, 15, 21, 5, 11, 6, 12, 17, 23, 18, 24}), "input_with_shape_with_crop_4x1x2x3_1"), // input_with_shape_with_crop_4x1x2x3_2 BatchToSpaceParams( - Tensor({4, 1, 2, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, + reference_tests::Tensor({4, 1, 2, 3}, IN_ET, std::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}), - Tensor({4}, element::i64, std::vector{1, 1, 2, 2}), - Tensor({4}, element::i64, std::vector{0, 0, 1, 0}), - Tensor({4}, element::i64, std::vector{0, 0, 1, 0}), - Tensor({1, 1, 2, 6}, IN_ET, std::vector{13, 19, 14, 20, 15, 21, + reference_tests::Tensor({4}, element::i64, std::vector{1, 1, 2, 2}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 1, 0}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 1, 0}), + reference_tests::Tensor({1, 1, 2, 6}, IN_ET, std::vector{13, 19, 14, 20, 15, 21, 4, 10, 5, 11, 6, 12}), "input_with_shape_with_crop_4x1x2x3_2"), }; diff --git a/docs/template_plugin/tests/functional/op_reference/binary_convolution.cpp b/docs/template_plugin/tests/functional/op_reference/binary_convolution.cpp index c557f6ea5f3..1c745657975 100644 --- a/docs/template_plugin/tests/functional/op_reference/binary_convolution.cpp +++ b/docs/template_plugin/tests/functional/op_reference/binary_convolution.cpp @@ -47,9 +47,9 @@ struct BinaryConvolutionParams { PartialShape outputShape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; + ov::Tensor inputData; std::vector filterData; - ov::runtime::Tensor refData; + ov::Tensor refData; ov::Strides strides; ov::CoordinateDiff padBegin; ov::CoordinateDiff padEnd; diff --git a/docs/template_plugin/tests/functional/op_reference/broadcast.cpp b/docs/template_plugin/tests/functional/op_reference/broadcast.cpp index 15823d6aa21..d752180258a 100644 --- a/docs/template_plugin/tests/functional/op_reference/broadcast.cpp +++ b/docs/template_plugin/tests/functional/op_reference/broadcast.cpp @@ -14,14 +14,14 @@ using namespace ov; namespace { struct BroadcastParams { BroadcastParams( - const Tensor& dataTensor, const Tensor& targetShapeTensor, - const Tensor& expectedTensor, const std::string& testcaseName = "") : + const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& targetShapeTensor, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dataTensor(dataTensor), targetShapeTensor(targetShapeTensor), expectedTensor(expectedTensor), testcaseName(testcaseName) {} - Tensor dataTensor; - Tensor targetShapeTensor; - Tensor expectedTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor targetShapeTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -86,12 +86,13 @@ TEST_P(ReferenceBroadcastTestV3, CompareWithRefs) { struct BroadcastParamsExplicitAxis : BroadcastParams { BroadcastParamsExplicitAxis( - const Tensor& dataTensor, const Tensor& targetShapeTensor, const Tensor& axesMappingTensor, - const Tensor& expectedTensor, const std::string& testcaseName = "") : + const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& targetShapeTensor, + const reference_tests::Tensor& axesMappingTensor, const reference_tests::Tensor& expectedTensor, + const std::string& testcaseName = "") : BroadcastParams(dataTensor, targetShapeTensor, expectedTensor, testcaseName), axesMappingTensor(axesMappingTensor) {} - Tensor axesMappingTensor; + reference_tests::Tensor axesMappingTensor; }; class ReferenceBroadcastTestExplicitAxis : public testing::TestWithParam, public CommonReferenceTest { @@ -253,29 +254,29 @@ std::vector generateParams() { using T = typename element_type_traits::value_type; std::vector params { BroadcastParams( - Tensor(ET, {}, std::vector{6}), - Tensor(element::u64, {1}, std::vector{4}), - Tensor(ET, {4}, std::vector{6, 6, 6, 6}), + reference_tests::Tensor(ET, {}, std::vector{6}), + reference_tests::Tensor(element::u64, {1}, std::vector{4}), + reference_tests::Tensor(ET, {4}, std::vector{6, 6, 6, 6}), "broadcast_scalar_vector"), BroadcastParams( - Tensor(ET, {}, std::vector{6}), - Tensor(element::u64, {2}, std::vector{2, 2}), - Tensor(ET, {2, 2}, std::vector{6, 6, 6, 6}), + reference_tests::Tensor(ET, {}, std::vector{6}), + reference_tests::Tensor(element::u64, {2}, std::vector{2, 2}), + reference_tests::Tensor(ET, {2, 2}, std::vector{6, 6, 6, 6}), "broadcast_scalar_matrix"), BroadcastParams( - Tensor(ET, {}, std::vector{6}), - Tensor(element::u64, {3}, std::vector{2, 2, 2}), - Tensor(ET, {2, 2, 2}, std::vector{6, 6, 6, 6, 6, 6, 6, 6}), + reference_tests::Tensor(ET, {}, std::vector{6}), + reference_tests::Tensor(element::u64, {3}, std::vector{2, 2, 2}), + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{6, 6, 6, 6, 6, 6, 6, 6}), "broadcast_scalar_tensor"), BroadcastParams( - Tensor(ET, {2, 2, 2}, std::vector{2, 4, 6, 8, 16, 32, 64, 127}), - Tensor(element::u64, {3}, std::vector{2, 2, 2}), - Tensor(ET, {2, 2, 2}, std::vector{2, 4, 6, 8, 16, 32, 64, 127}), + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{2, 4, 6, 8, 16, 32, 64, 127}), + reference_tests::Tensor(element::u64, {3}, std::vector{2, 2, 2}), + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{2, 4, 6, 8, 16, 32, 64, 127}), "broadcast_trivial"), BroadcastParams( - Tensor(ET, {2, 2}, std::vector{1, 2, 3, 4}), - Tensor(element::u64, {3}, std::vector{2, 2, 2}), - Tensor(ET, {2, 2, 2}, std::vector{1, 2, 3, 4, 1, 2, 3, 4}), + reference_tests::Tensor(ET, {2, 2}, std::vector{1, 2, 3, 4}), + reference_tests::Tensor(element::u64, {3}, std::vector{2, 2, 2}), + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{1, 2, 3, 4, 1, 2, 3, 4}), "broadcast_matrix_0"), }; return params; @@ -315,40 +316,40 @@ std::vector generateParamsExplicitAxis() { using T = typename element_type_traits::value_type; std::vector params { BroadcastParamsExplicitAxis( - Tensor(ET, {}, std::vector{6}), - Tensor(element::u64, {2}, std::vector{1, 2}), - Tensor(element::i64, {1}, std::vector{0}), - Tensor(ET, {1, 2}, std::vector{6, 6}), + reference_tests::Tensor(ET, {}, std::vector{6}), + reference_tests::Tensor(element::u64, {2}, std::vector{1, 2}), + reference_tests::Tensor(element::i64, {1}, std::vector{0}), + reference_tests::Tensor(ET, {1, 2}, std::vector{6, 6}), "broadcast_scalar_vector_explicit_axis_0"), BroadcastParamsExplicitAxis( - Tensor(ET, {3}, std::vector{1, 2, 3}), - Tensor(element::u64, {2}, std::vector{3, 4}), - Tensor(element::i64, {1}, std::vector{0}), - Tensor(ET, {3, 4}, std::vector{1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3}), + reference_tests::Tensor(ET, {3}, std::vector{1, 2, 3}), + reference_tests::Tensor(element::u64, {2}, std::vector{3, 4}), + reference_tests::Tensor(element::i64, {1}, std::vector{0}), + reference_tests::Tensor(ET, {3, 4}, std::vector{1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3}), "broadcast_vector_colwise"), BroadcastParamsExplicitAxis( - Tensor(ET, {4}, std::vector{1, 2, 3, 4}), - Tensor(element::u64, {2}, std::vector{3, 4}), - Tensor(element::i64, {1}, std::vector{1}), - Tensor(ET, {3, 4}, std::vector{1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4}), + reference_tests::Tensor(ET, {4}, std::vector{1, 2, 3, 4}), + reference_tests::Tensor(element::u64, {2}, std::vector{3, 4}), + reference_tests::Tensor(element::i64, {1}, std::vector{1}), + reference_tests::Tensor(ET, {3, 4}, std::vector{1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4}), "broadcast_vector_rowwise"), BroadcastParamsExplicitAxis( - Tensor(ET, {1}, std::vector{4}), - Tensor(element::u64, {2}, std::vector{3, 1}), - Tensor(element::i64, {1}, std::vector{1}), - Tensor(ET, {3, 1}, std::vector{4, 4, 4}), + reference_tests::Tensor(ET, {1}, std::vector{4}), + reference_tests::Tensor(element::u64, {2}, std::vector{3, 1}), + reference_tests::Tensor(element::i64, {1}, std::vector{1}), + reference_tests::Tensor(ET, {3, 1}, std::vector{4, 4, 4}), "broadcast_scalar_to_matrix"), BroadcastParamsExplicitAxis( - Tensor(ET, {2, 2}, std::vector{1, 2, 3, 4}), - Tensor(element::u64, {3}, std::vector{2, 2, 2}), - Tensor(element::i64, {2}, std::vector{0, 2}), - Tensor(ET, {2, 2, 2}, std::vector{1, 2, 1, 2, 3, 4, 3, 4}), + reference_tests::Tensor(ET, {2, 2}, std::vector{1, 2, 3, 4}), + reference_tests::Tensor(element::u64, {3}, std::vector{2, 2, 2}), + reference_tests::Tensor(element::i64, {2}, std::vector{0, 2}), + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{1, 2, 1, 2, 3, 4, 3, 4}), "broadcast_matrix_1"), BroadcastParamsExplicitAxis( - Tensor(ET, {2, 2}, std::vector{1, 2, 3, 4}), - Tensor(element::u64, {3}, std::vector{2, 2, 2}), - Tensor(element::i64, {2}, std::vector{0, 1}), - Tensor(ET, {2, 2, 2}, std::vector{1, 1, 2, 2, 3, 3, 4, 4}), + reference_tests::Tensor(ET, {2, 2}, std::vector{1, 2, 3, 4}), + reference_tests::Tensor(element::u64, {3}, std::vector{2, 2, 2}), + reference_tests::Tensor(element::i64, {2}, std::vector{0, 1}), + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{1, 1, 2, 2, 3, 3, 4, 4}), "broadcast_matrix_2"), }; return params; @@ -491,10 +492,10 @@ std::vector generateParamsExplicitAxisReversed() { using T = typename element_type_traits::value_type; std::vector params { BroadcastParamsExplicitAxis( - Tensor(ET, {4}, std::vector{1, 2, 3, 4}), - Tensor(element::u64, {2}, std::vector{3, 4}), - Tensor(element::i64, {1}, std::vector{1}), - Tensor(ET, {3, 4}, std::vector{1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4}), + reference_tests::Tensor(ET, {4}, std::vector{1, 2, 3, 4}), + reference_tests::Tensor(element::u64, {2}, std::vector{3, 4}), + reference_tests::Tensor(element::i64, {1}, std::vector{1}), + reference_tests::Tensor(ET, {3, 4}, std::vector{1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4}), "broadcast_vector_rowwise_reversed"), }; return params; diff --git a/docs/template_plugin/tests/functional/op_reference/bucketize.cpp b/docs/template_plugin/tests/functional/op_reference/bucketize.cpp index 96b8f6cede4..4abee6481c0 100644 --- a/docs/template_plugin/tests/functional/op_reference/bucketize.cpp +++ b/docs/template_plugin/tests/functional/op_reference/bucketize.cpp @@ -27,13 +27,13 @@ struct BucketizeParams { element::Type input_type; PartialShape input_pshape; - runtime::Tensor input; + ov::Tensor input; element::Type bucket_type; PartialShape bucket_pshape; - runtime::Tensor buckets; + ov::Tensor buckets; bool with_right_bound; element::Type output_type; - runtime::Tensor expected_output; + ov::Tensor expected_output; }; class ReferenceBucketizeLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/ceiling.cpp b/docs/template_plugin/tests/functional/op_reference/ceiling.cpp index 7c622709cf8..7a0dca2c98a 100644 --- a/docs/template_plugin/tests/functional/op_reference/ceiling.cpp +++ b/docs/template_plugin/tests/functional/op_reference/ceiling.cpp @@ -26,8 +26,8 @@ struct CeilingParams { PartialShape pshape; element::Type inType; element::Type outType; - runtime::Tensor inputData; - runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceCeilingLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/clamp.cpp b/docs/template_plugin/tests/functional/op_reference/clamp.cpp index 75b7cd45408..41b7f1a232d 100644 --- a/docs/template_plugin/tests/functional/op_reference/clamp.cpp +++ b/docs/template_plugin/tests/functional/op_reference/clamp.cpp @@ -29,8 +29,8 @@ struct ClampParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceClampLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/comparison.hpp b/docs/template_plugin/tests/functional/op_reference/comparison.hpp index f3409b5882d..982af00916b 100644 --- a/docs/template_plugin/tests/functional/op_reference/comparison.hpp +++ b/docs/template_plugin/tests/functional/op_reference/comparison.hpp @@ -14,9 +14,9 @@ namespace ComparisonOpsRefTestDefinitions { struct RefComparisonParams { ngraph::helpers::ComparisonTypes compType; - Tensor input1; - Tensor input2; - Tensor expected; + reference_tests::Tensor input1; + reference_tests::Tensor input2; + reference_tests::Tensor expected; }; struct Builder : ParamsBuilder { diff --git a/docs/template_plugin/tests/functional/op_reference/concat.cpp b/docs/template_plugin/tests/functional/op_reference/concat.cpp index 1f37f62e12f..91e9e186939 100644 --- a/docs/template_plugin/tests/functional/op_reference/concat.cpp +++ b/docs/template_plugin/tests/functional/op_reference/concat.cpp @@ -14,16 +14,17 @@ namespace { struct ConcatParams { ConcatParams( const PartialShape& dynamicShape, - const Tensor& A, const Tensor& B, const Tensor& C, const int32_t axis, - const Tensor& expected, const std::string& testcaseName = "") : + const reference_tests::Tensor& A, const reference_tests::Tensor& B, + const reference_tests::Tensor& C, const int32_t axis, + const reference_tests::Tensor& expected, const std::string& testcaseName = "") : dynamicShape(dynamicShape), A(A), B(B), C(C), axis(axis), expected(expected), testcaseName(testcaseName) {} PartialShape dynamicShape; - Tensor A; - Tensor B; - Tensor C; + reference_tests::Tensor A; + reference_tests::Tensor B; + reference_tests::Tensor C; int32_t axis; - Tensor expected; + reference_tests::Tensor expected; std::string testcaseName; }; @@ -84,51 +85,51 @@ std::vector generateParams() { std::vector params { ConcatParams( PartialShape::dynamic(), - Tensor(ET, {2, 2}, std::vector{2, 4, 8, 16}), - Tensor(ET, {2, 3}, std::vector{1, 2, 4, 8, 16, 32}), - Tensor(ET, {2, 3}, std::vector{2, 3, 5, 7, 11, 13}), + reference_tests::Tensor(ET, {2, 2}, std::vector{2, 4, 8, 16}), + reference_tests::Tensor(ET, {2, 3}, std::vector{1, 2, 4, 8, 16, 32}), + reference_tests::Tensor(ET, {2, 3}, std::vector{2, 3, 5, 7, 11, 13}), -1, - Tensor(ET, {2, 8}, std::vector{2, 4, 1, 2, 4, 2, 3, 5, 8, 16, 8, 16, 32, 7, 11, 13}), + reference_tests::Tensor(ET, {2, 8}, std::vector{2, 4, 1, 2, 4, 2, 3, 5, 8, 16, 8, 16, 32, 7, 11, 13}), "concat_negative_axis"), ConcatParams( {}, - Tensor(ET, {2, 2}, std::vector{2, 4, 8, 16}), - Tensor(ET, {2, 3}, std::vector{1, 2, 4, 8, 16, 32}), - Tensor(ET, {2, 3}, std::vector{2, 3, 5, 7, 11, 13}), + reference_tests::Tensor(ET, {2, 2}, std::vector{2, 4, 8, 16}), + reference_tests::Tensor(ET, {2, 3}, std::vector{1, 2, 4, 8, 16, 32}), + reference_tests::Tensor(ET, {2, 3}, std::vector{2, 3, 5, 7, 11, 13}), 1, - Tensor(ET, {2, 8}, std::vector{2, 4, 1, 2, 4, 2, 3, 5, 8, 16, 8, 16, 32, 7, 11, 13}), + reference_tests::Tensor(ET, {2, 8}, std::vector{2, 4, 1, 2, 4, 2, 3, 5, 8, 16, 8, 16, 32, 7, 11, 13}), "concat_matrix_colwise"), ConcatParams( {}, - Tensor(ET, {2, 2}, std::vector{2, 4, 8, 16}), - Tensor(ET, {3, 2}, std::vector{1, 2, 4, 8, 16, 32}), - Tensor(ET, {3, 2}, std::vector{2, 3, 5, 7, 11, 13}), + reference_tests::Tensor(ET, {2, 2}, std::vector{2, 4, 8, 16}), + reference_tests::Tensor(ET, {3, 2}, std::vector{1, 2, 4, 8, 16, 32}), + reference_tests::Tensor(ET, {3, 2}, std::vector{2, 3, 5, 7, 11, 13}), 0, - Tensor(ET, {8, 2}, std::vector{2, 4, 8, 16, 1, 2, 4, 8, 16, 32, 2, 3, 5, 7, 11, 13}), + reference_tests::Tensor(ET, {8, 2}, std::vector{2, 4, 8, 16, 1, 2, 4, 8, 16, 32, 2, 3, 5, 7, 11, 13}), "concat_matrix_rowwise"), ConcatParams( {}, - Tensor(ET, {4}, std::vector{2, 4, 8, 16}), - Tensor(ET, {6}, std::vector{1, 2, 4, 8, 16, 32}), - Tensor(ET, {2}, std::vector{18, 19}), + reference_tests::Tensor(ET, {4}, std::vector{2, 4, 8, 16}), + reference_tests::Tensor(ET, {6}, std::vector{1, 2, 4, 8, 16, 32}), + reference_tests::Tensor(ET, {2}, std::vector{18, 19}), 0, - Tensor(ET, {12}, std::vector{2, 4, 8, 16, 1, 2, 4, 8, 16, 32, 18, 19}), + reference_tests::Tensor(ET, {12}, std::vector{2, 4, 8, 16, 1, 2, 4, 8, 16, 32, 18, 19}), "concat_vector"), ConcatParams( {}, - Tensor(ET, {1, 1, 1, 1}, std::vector{1}), - Tensor(ET, {1, 1, 1, 1}, std::vector{2}), - Tensor(ET, {1, 1, 1, 1}, std::vector{3}), + reference_tests::Tensor(ET, {1, 1, 1, 1}, std::vector{1}), + reference_tests::Tensor(ET, {1, 1, 1, 1}, std::vector{2}), + reference_tests::Tensor(ET, {1, 1, 1, 1}, std::vector{3}), 0, - Tensor(ET, {3, 1, 1, 1}, std::vector{1, 2, 3}), + reference_tests::Tensor(ET, {3, 1, 1, 1}, std::vector{1, 2, 3}), "concat_4d_tensor"), ConcatParams( {}, - Tensor(ET, {1, 1}, std::vector{1}), - Tensor(ET, {1, 1}, std::vector{2}), - Tensor(ET, {1, 1}, std::vector{3}), + reference_tests::Tensor(ET, {1, 1}, std::vector{1}), + reference_tests::Tensor(ET, {1, 1}, std::vector{2}), + reference_tests::Tensor(ET, {1, 1}, std::vector{3}), 0, - Tensor(ET, {3, 1}, std::vector{1, 2, 3}), + reference_tests::Tensor(ET, {3, 1}, std::vector{1, 2, 3}), "concat_2d_tensor"), }; return params; @@ -239,16 +240,16 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestVe struct ConcatParamsInPlace2dTensor { ConcatParamsInPlace2dTensor( - const Tensor& A, const Tensor& B, const Tensor& C, const Tensor& D, const int32_t axis, - const Tensor& expected, const std::string& testcaseName = "") : + const reference_tests::Tensor& A, const reference_tests::Tensor& B, const reference_tests::Tensor& C, const reference_tests::Tensor& D, const int32_t axis, + const reference_tests::Tensor& expected, const std::string& testcaseName = "") : A(A), B(B), C(C), D(D), axis(axis), expected(expected), testcaseName(testcaseName) {} - Tensor A; - Tensor B; - Tensor C; - Tensor D; + reference_tests::Tensor A; + reference_tests::Tensor B; + reference_tests::Tensor C; + reference_tests::Tensor D; int32_t axis; - Tensor expected; + reference_tests::Tensor expected; std::string testcaseName; }; @@ -308,12 +309,12 @@ std::vector generateParamsInPlace2dTensor() { using T = typename element_type_traits::value_type; std::vector params { ConcatParamsInPlace2dTensor( - Tensor(ET, {1, 1}, std::vector{1}), - Tensor(ET, {1, 1}, std::vector{2}), - Tensor(ET, {1, 1}, std::vector{3}), - Tensor(ET, {1, 1}, std::vector{4}), + reference_tests::Tensor(ET, {1, 1}, std::vector{1}), + reference_tests::Tensor(ET, {1, 1}, std::vector{2}), + reference_tests::Tensor(ET, {1, 1}, std::vector{3}), + reference_tests::Tensor(ET, {1, 1}, std::vector{4}), 0, - Tensor(ET, {3, 1}, std::vector{3, 7, 2}), + reference_tests::Tensor(ET, {3, 1}, std::vector{3, 7, 2}), "concat_in_place_2d_tensor"), }; return params; @@ -344,16 +345,16 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestIn struct ConcatParamsInPlacePropagate2dTensor { ConcatParamsInPlacePropagate2dTensor( - const Tensor& A, const Tensor& B, const Tensor& C, const Tensor& D, const int32_t axis, - const Tensor& expected, const std::string& testcaseName = "") : + const reference_tests::Tensor& A, const reference_tests::Tensor& B, const reference_tests::Tensor& C, const reference_tests::Tensor& D, const int32_t axis, + const reference_tests::Tensor& expected, const std::string& testcaseName = "") : A(A), B(B), C(C), D(D), axis(axis), expected(expected), testcaseName(testcaseName) {} - Tensor A; - Tensor B; - Tensor C; - Tensor D; + reference_tests::Tensor A; + reference_tests::Tensor B; + reference_tests::Tensor C; + reference_tests::Tensor D; int32_t axis; - Tensor expected; + reference_tests::Tensor expected; std::string testcaseName; }; @@ -414,12 +415,12 @@ std::vector generateParamsInPlacePropagate using T = typename element_type_traits::value_type; std::vector params { ConcatParamsInPlacePropagate2dTensor( - Tensor(ET, {1, 1}, std::vector{1}), - Tensor(ET, {1, 1}, std::vector{2}), - Tensor(ET, {1, 1}, std::vector{3}), - Tensor(ET, {1, 1}, std::vector{4}), + reference_tests::Tensor(ET, {1, 1}, std::vector{1}), + reference_tests::Tensor(ET, {1, 1}, std::vector{2}), + reference_tests::Tensor(ET, {1, 1}, std::vector{3}), + reference_tests::Tensor(ET, {1, 1}, std::vector{4}), 0, - Tensor(ET, {3, 1}, std::vector{3, 7, 2}), + reference_tests::Tensor(ET, {3, 1}, std::vector{3, 7, 2}), "concat_in_place_2d_tensor"), }; return params; @@ -450,14 +451,14 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestIn struct ConcatParamsInPlaceTree1 { ConcatParamsInPlaceTree1( - const Tensor& A, const Tensor& B, const int32_t axis, - const Tensor& expected, const std::string& testcaseName = "") : + const reference_tests::Tensor& A, const reference_tests::Tensor& B, const int32_t axis, + const reference_tests::Tensor& expected, const std::string& testcaseName = "") : A(A), B(B), axis(axis), expected(expected), testcaseName(testcaseName) {} - Tensor A; - Tensor B; + reference_tests::Tensor A; + reference_tests::Tensor B; int32_t axis; - Tensor expected; + reference_tests::Tensor expected; std::string testcaseName; }; @@ -510,10 +511,10 @@ std::vector generateParamsInPlaceTree1() { using T = typename element_type_traits::value_type; std::vector params { ConcatParamsInPlaceTree1( - Tensor(ET, {1, 2, 2}, std::vector{1, 1, 1, 1}), - Tensor(ET, {1, 2, 2}, std::vector{1, 1, 1, 1}), + reference_tests::Tensor(ET, {1, 2, 2}, std::vector{1, 1, 1, 1}), + reference_tests::Tensor(ET, {1, 2, 2}, std::vector{1, 1, 1, 1}), 1, - Tensor(ET, {1, 4, 2}, std::vector{4, 4, 4, 4, 4, 4, 4, 4}), + reference_tests::Tensor(ET, {1, 4, 2}, std::vector{4, 4, 4, 4, 4, 4, 4, 4}), "concat_in_place_tree_1"), }; return params; @@ -544,14 +545,14 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestIn struct ConcatParamsInPlaceTree2 { ConcatParamsInPlaceTree2( - const Tensor& A, const Tensor& B, const int32_t axis, - const Tensor& expected, const std::string& testcaseName = "") : + const reference_tests::Tensor& A, const reference_tests::Tensor& B, const int32_t axis, + const reference_tests::Tensor& expected, const std::string& testcaseName = "") : A(A), B(B), axis(axis), expected(expected), testcaseName(testcaseName) {} - Tensor A; - Tensor B; + reference_tests::Tensor A; + reference_tests::Tensor B; int32_t axis; - Tensor expected; + reference_tests::Tensor expected; std::string testcaseName; }; @@ -606,10 +607,10 @@ std::vector generateParamsInPlaceTree2() { using T = typename element_type_traits::value_type; std::vector params { ConcatParamsInPlaceTree2( - Tensor(ET, {1, 2, 2}, std::vector{1, 1, 1, 1}), - Tensor(ET, {1, 2, 2}, std::vector{1, 1, 1, 1}), + reference_tests::Tensor(ET, {1, 2, 2}, std::vector{1, 1, 1, 1}), + reference_tests::Tensor(ET, {1, 2, 2}, std::vector{1, 1, 1, 1}), 1, - Tensor(ET, {1, 8, 2}, std::vector{4, 4, 4, 4, 4, 4, 4, 4, + reference_tests::Tensor(ET, {1, 8, 2}, std::vector{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}), "concat_in_place_tree_2"), }; @@ -641,14 +642,14 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestIn struct ConcatParamsInPlaceTree3 { ConcatParamsInPlaceTree3( - const Tensor& A, const Tensor& B, const int32_t axis, - const Tensor& expected, const std::string& testcaseName = "") : + const reference_tests::Tensor& A, const reference_tests::Tensor& B, const int32_t axis, + const reference_tests::Tensor& expected, const std::string& testcaseName = "") : A(A), B(B), axis(axis), expected(expected), testcaseName(testcaseName) {} - Tensor A; - Tensor B; + reference_tests::Tensor A; + reference_tests::Tensor B; int32_t axis; - Tensor expected; + reference_tests::Tensor expected; std::string testcaseName; }; @@ -705,10 +706,10 @@ std::vector generateParamsInPlaceTree3() { using T = typename element_type_traits::value_type; std::vector params { ConcatParamsInPlaceTree3( - Tensor(ET, {1, 2, 2}, std::vector{1, 1, 1, 1}), - Tensor(ET, {1, 2, 2}, std::vector{1, 1, 1, 1}), + reference_tests::Tensor(ET, {1, 2, 2}, std::vector{1, 1, 1, 1}), + reference_tests::Tensor(ET, {1, 2, 2}, std::vector{1, 1, 1, 1}), 1, - Tensor(ET, {1, 16, 2}, std::vector{2, 2, 2, 2, 2, 2, 2, 2, + reference_tests::Tensor(ET, {1, 16, 2}, std::vector{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}), @@ -742,14 +743,14 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestIn struct ConcatParamsInPlaceAddConcat { ConcatParamsInPlaceAddConcat( - const Tensor& A, const Tensor& B, const int32_t axis, - const Tensor& expected, const std::string& testcaseName = "") : + const reference_tests::Tensor& A, const reference_tests::Tensor& B, const int32_t axis, + const reference_tests::Tensor& expected, const std::string& testcaseName = "") : A(A), B(B), axis(axis), expected(expected), testcaseName(testcaseName) {} - Tensor A; - Tensor B; + reference_tests::Tensor A; + reference_tests::Tensor B; int32_t axis; - Tensor expected; + reference_tests::Tensor expected; std::string testcaseName; }; @@ -802,10 +803,10 @@ std::vector generateParamsInPlaceAddConcat() { using T = typename element_type_traits::value_type; std::vector params { ConcatParamsInPlaceAddConcat( - Tensor(ET, {2, 2}, std::vector{1, 1, 1, 1}), - Tensor(ET, {2, 2}, std::vector{1, 1, 1, 1}), + reference_tests::Tensor(ET, {2, 2}, std::vector{1, 1, 1, 1}), + reference_tests::Tensor(ET, {2, 2}, std::vector{1, 1, 1, 1}), 0, - Tensor(ET, {4, 2}, std::vector{4, 4, 4, 4, 8, 8, 8, 8}), + reference_tests::Tensor(ET, {4, 2}, std::vector{4, 4, 4, 4, 8, 8, 8, 8}), "concat_in_place_add_concat"), }; return params; @@ -836,14 +837,14 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestIn struct ConcatParamsInPlaceAddConcat2 { ConcatParamsInPlaceAddConcat2( - const Tensor& A, const Tensor& B, const int32_t axis, - const Tensor& expected, const std::string& testcaseName = "") : + const reference_tests::Tensor& A, const reference_tests::Tensor& B, const int32_t axis, + const reference_tests::Tensor& expected, const std::string& testcaseName = "") : A(A), B(B), axis(axis), expected(expected), testcaseName(testcaseName) {} - Tensor A; - Tensor B; + reference_tests::Tensor A; + reference_tests::Tensor B; int32_t axis; - Tensor expected; + reference_tests::Tensor expected; std::string testcaseName; }; @@ -900,10 +901,10 @@ std::vector generateParamsInPlaceAddConcat2() { using T = typename element_type_traits::value_type; std::vector params { ConcatParamsInPlaceAddConcat2( - Tensor(ET, {1, 2, 2}, std::vector{1, 1, 1, 1}), - Tensor(ET, {1, 2, 2}, std::vector{1, 1, 1, 1}), + reference_tests::Tensor(ET, {1, 2, 2}, std::vector{1, 1, 1, 1}), + reference_tests::Tensor(ET, {1, 2, 2}, std::vector{1, 1, 1, 1}), 1, - Tensor(ET, {1, 6, 2}, std::vector{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}), + reference_tests::Tensor(ET, {1, 6, 2}, std::vector{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}), "concat_in_place_add_concat_2"), }; return params; @@ -934,15 +935,15 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestIn struct ConcatParams5d { ConcatParams5d( - const Tensor& A, const Tensor& B, const Tensor& C, const int32_t axis, - const Tensor& expected, const std::string& testcaseName = "") : + const reference_tests::Tensor& A, const reference_tests::Tensor& B, const reference_tests::Tensor& C, const int32_t axis, + const reference_tests::Tensor& expected, const std::string& testcaseName = "") : A(A), B(B), C(C), axis(axis), expected(expected), testcaseName(testcaseName) {} - Tensor A; - Tensor B; - Tensor C; + reference_tests::Tensor A; + reference_tests::Tensor B; + reference_tests::Tensor C; int32_t axis; - Tensor expected; + reference_tests::Tensor expected; std::string testcaseName; }; @@ -995,27 +996,27 @@ std::vector generateParams5d() { using T = typename element_type_traits::value_type; std::vector params { ConcatParams5d( - Tensor(ET, {2, 3, 4, 3, 2}, []() -> std::vector { + reference_tests::Tensor(ET, {2, 3, 4, 3, 2}, []() -> std::vector { std::vector data(2 * 3 * 4 * 3 * 2); for (int i = 0; i < 2 * 3 * 4 * 3 * 2; i++) { data[i] = static_cast(i + 1); } return data; }()), - Tensor(ET, {2, 3, 3, 3, 2}, []() -> std::vector { + reference_tests::Tensor(ET, {2, 3, 3, 3, 2}, []() -> std::vector { std::vector data(2 * 3 * 3 * 3 * 2); for (int i = 0; i < 2 * 3 * 3 * 3 * 2; i++) { data[i] = 1000 + static_cast(i + 1); } return data;}()), - Tensor(ET, {2, 3, 2, 3, 2}, []() -> std::vector { + reference_tests::Tensor(ET, {2, 3, 2, 3, 2}, []() -> std::vector { std::vector data(2 * 3 * 2 * 3 * 2); for (int i = 0; i < 2 * 3 * 2 * 3 * 2; i++) { data[i] = 2000 + static_cast(i + 1); } return data;}()), 2, - Tensor(ET, {2, 3, 9, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 9, 3, 2}, std::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., 1001., 1002., 1003., 1004., 1005., 1006., 1007., 1008., 1009., 1010., 1011., 1012., 1013., 1014., 1015., 1016., 1017., 1018., 2001., 2002., 2003., @@ -1064,14 +1065,14 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTest5d struct ConcatParamsZeroLength1dLast { ConcatParamsZeroLength1dLast( - const Tensor& A, const Tensor& B, const int32_t axis, - const Tensor& expected, const std::string& testcaseName = "") : + const reference_tests::Tensor& A, const reference_tests::Tensor& B, const int32_t axis, + const reference_tests::Tensor& expected, const std::string& testcaseName = "") : A(A), B(B), axis(axis), expected(expected), testcaseName(testcaseName) {} - Tensor A; - Tensor B; + reference_tests::Tensor A; + reference_tests::Tensor B; int32_t axis; - Tensor expected; + reference_tests::Tensor expected; std::string testcaseName; }; @@ -1121,10 +1122,10 @@ std::vector generateParamsZeroLength1dLast() { using T = typename element_type_traits::value_type; std::vector params { ConcatParamsZeroLength1dLast( - Tensor(ET, {4}, std::vector{1, 2, 3, 4}), - Tensor(ET, {0}, std::vector{0}), + reference_tests::Tensor(ET, {4}, std::vector{1, 2, 3, 4}), + reference_tests::Tensor(ET, {0}, std::vector{0}), 0, - Tensor(ET, {4}, std::vector{1, 2, 3, 4}), + reference_tests::Tensor(ET, {4}, std::vector{1, 2, 3, 4}), "concat_zero_length_1d_last"), }; return params; @@ -1155,15 +1156,15 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestZe struct ConcatParamsZeroLength1dMiddle { ConcatParamsZeroLength1dMiddle( - const Tensor& A, const Tensor& B, const Tensor& C, const int32_t axis, - const Tensor& expected, const std::string& testcaseName = "") : + const reference_tests::Tensor& A, const reference_tests::Tensor& B, const reference_tests::Tensor& C, const int32_t axis, + const reference_tests::Tensor& expected, const std::string& testcaseName = "") : A(A), B(B), C(C), axis(axis), expected(expected), testcaseName(testcaseName) {} - Tensor A; - Tensor B; - Tensor C; + reference_tests::Tensor A; + reference_tests::Tensor B; + reference_tests::Tensor C; int32_t axis; - Tensor expected; + reference_tests::Tensor expected; std::string testcaseName; }; @@ -1216,11 +1217,11 @@ std::vector generateParamsZeroLength1dMiddle() { using T = typename element_type_traits::value_type; std::vector params { ConcatParamsZeroLength1dMiddle( - Tensor(ET, {4}, std::vector{1, 2, 3, 4}), - Tensor(ET, {0}, std::vector{0}), - Tensor(ET, {4}, std::vector{5, 6, 7, 8}), + reference_tests::Tensor(ET, {4}, std::vector{1, 2, 3, 4}), + reference_tests::Tensor(ET, {0}, std::vector{0}), + reference_tests::Tensor(ET, {4}, std::vector{5, 6, 7, 8}), 0, - Tensor(ET, {8}, std::vector{1, 2, 3, 4, 5, 6, 7, 8}), + reference_tests::Tensor(ET, {8}, std::vector{1, 2, 3, 4, 5, 6, 7, 8}), "concat_zero_length_1d_middle"), }; return params; @@ -1251,13 +1252,13 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestZe struct ConcatParamsZeroZero { ConcatParamsZeroZero( - const Tensor& A, const int32_t axis, - const Tensor& expected, const std::string& testcaseName = "") : + const reference_tests::Tensor& A, const int32_t axis, + const reference_tests::Tensor& expected, const std::string& testcaseName = "") : A(A), axis(axis), expected(expected), testcaseName(testcaseName) {} - Tensor A; + reference_tests::Tensor A; int32_t axis; - Tensor expected; + reference_tests::Tensor expected; std::string testcaseName; }; @@ -1304,9 +1305,9 @@ std::vector generateParamsZeroZero() { using T = typename element_type_traits::value_type; std::vector params { ConcatParamsZeroZero( - Tensor(ET, {0}, std::vector{1}), + reference_tests::Tensor(ET, {0}, std::vector{1}), 0, - Tensor(ET, {0}, std::vector{}), + reference_tests::Tensor(ET, {0}, std::vector{}), "concat_zero_zero"), }; return params; @@ -1337,15 +1338,15 @@ INSTANTIATE_TEST_SUITE_P(smoke_Concat_With_Hardcoded_Refs, ReferenceConcatTestZe struct ConcatParamsZeroLength4dMiddle { ConcatParamsZeroLength4dMiddle( - const Tensor& A, const Tensor& B, const Tensor& C, const int32_t axis, - const Tensor& expected, const std::string& testcaseName = "") : + const reference_tests::Tensor& A, const reference_tests::Tensor& B, const reference_tests::Tensor& C, const int32_t axis, + const reference_tests::Tensor& expected, const std::string& testcaseName = "") : A(A), B(B), C(C), axis(axis), expected(expected), testcaseName(testcaseName) {} - Tensor A; - Tensor B; - Tensor C; + reference_tests::Tensor A; + reference_tests::Tensor B; + reference_tests::Tensor C; int32_t axis; - Tensor expected; + reference_tests::Tensor expected; std::string testcaseName; }; @@ -1398,11 +1399,11 @@ std::vector generateParamsZeroLength4dMiddle() { using T = typename element_type_traits::value_type; std::vector params { ConcatParamsZeroLength4dMiddle( - Tensor(ET, {2, 2, 1, 1}, std::vector{1, 2, 3, 4}), - Tensor(ET, {2, 2, 0, 1}, std::vector{0}), - Tensor(ET, {2, 2, 1, 1}, std::vector{5, 6, 7, 8}), + reference_tests::Tensor(ET, {2, 2, 1, 1}, std::vector{1, 2, 3, 4}), + reference_tests::Tensor(ET, {2, 2, 0, 1}, std::vector{0}), + reference_tests::Tensor(ET, {2, 2, 1, 1}, std::vector{5, 6, 7, 8}), 2, - Tensor(ET, {2, 2, 2, 1}, std::vector{1, 5, 2, 6, 3, 7, 4, 8}), + reference_tests::Tensor(ET, {2, 2, 2, 1}, std::vector{1, 5, 2, 6, 3, 7, 4, 8}), "concat_zero_length_4d_middle"), }; return params; diff --git a/docs/template_plugin/tests/functional/op_reference/constant.cpp b/docs/template_plugin/tests/functional/op_reference/constant.cpp index 5357f674171..c06189e80bc 100644 --- a/docs/template_plugin/tests/functional/op_reference/constant.cpp +++ b/docs/template_plugin/tests/functional/op_reference/constant.cpp @@ -31,8 +31,8 @@ struct ConstantParams { PartialShape inputShape; element::Type inType; element::Type refType; - runtime::Tensor inputData; - runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; std::string testcaseName; }; diff --git a/docs/template_plugin/tests/functional/op_reference/conversion.hpp b/docs/template_plugin/tests/functional/op_reference/conversion.hpp index 1735ba3db0f..208ef6002ed 100644 --- a/docs/template_plugin/tests/functional/op_reference/conversion.hpp +++ b/docs/template_plugin/tests/functional/op_reference/conversion.hpp @@ -27,8 +27,8 @@ struct ConvertParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceConversionLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/convert_color_i420.cpp b/docs/template_plugin/tests/functional/op_reference/convert_color_i420.cpp index bfcae4b5173..3b8898c9112 100644 --- a/docs/template_plugin/tests/functional/op_reference/convert_color_i420.cpp +++ b/docs/template_plugin/tests/functional/op_reference/convert_color_i420.cpp @@ -26,7 +26,7 @@ public: public: template - static std::shared_ptr CreateFunction(const Tensor& input) { + static std::shared_ptr CreateFunction(const reference_tests::Tensor& input) { const auto in = std::make_shared(input.type, input.shape); std::shared_ptr conv; conv = std::make_shared(in); @@ -35,7 +35,7 @@ public: } template - static std::shared_ptr CreateFunction3(const Tensor& input1, const Tensor& input2, const Tensor& input3) { + static std::shared_ptr CreateFunction3(const reference_tests::Tensor& input1, const reference_tests::Tensor& input2, const reference_tests::Tensor& input3) { const auto in1 = std::make_shared(input1.type, input1.shape); const auto in2 = std::make_shared(input2.type, input2.shape); const auto in3 = std::make_shared(input3.type, input3.shape); @@ -54,10 +54,10 @@ TEST_F(ReferenceConvertColorI420LayerTest, CompareWithHardcodedRefs_r_u8_single_ auto exp_out = std::vector {0xff, 0, 0, 0xff, 0, 0, 0xff, 0, 0, 0xff, 0, 0, 0xff, 0, 0, 0xff, 0, 0, 0xff, 0, 0, 0xff, 0, 0}; auto out_shape = Shape{1, 2, 4, 3}; - Tensor inp_tensor(input_shape, element::u8, input); + reference_tests::Tensor inp_tensor(input_shape, element::u8, input); inputData = {inp_tensor.data}; function = CreateFunction(inp_tensor); - Tensor exp_tensor_u8(out_shape, element::u8, exp_out); + reference_tests::Tensor exp_tensor_u8(out_shape, element::u8, exp_out); refOutData = {exp_tensor_u8.data}; Exec(); } @@ -71,10 +71,10 @@ TEST_F(ReferenceConvertColorI420LayerTest, CompareWithHardcodedRefs_color_u8_sin 37, 37, 164, 217, 216, 255, 37, 37, 164, 217, 216, 255}; auto out_shape = Shape{1, 4, 2, 3}; - Tensor inp_tensor(input_shape, element::u8, input); + reference_tests::Tensor inp_tensor(input_shape, element::u8, input); inputData = {inp_tensor.data}; - Tensor exp_tensor_u8(out_shape, element::u8, exp_out); + reference_tests::Tensor exp_tensor_u8(out_shape, element::u8, exp_out); refOutData = {exp_tensor_u8.data}; function = CreateFunction(inp_tensor); @@ -91,10 +91,10 @@ TEST_F(ReferenceConvertColorI420LayerTest, CompareWithHardcodedRefs_g_fp32_singl 0, 255.f, 0, 0, 255.f, 0, 0, 255.f, 0, 0, 255.f, 0}; auto out_shape = Shape{1, 2, 4, 3}; - Tensor inp_tensor(input_shape, element::f32, input); + reference_tests::Tensor inp_tensor(input_shape, element::f32, input); inputData = {inp_tensor.data}; - Tensor exp_tensor(out_shape, element::f32, exp_out); + reference_tests::Tensor exp_tensor(out_shape, element::f32, exp_out); refOutData = {exp_tensor.data}; function = CreateFunction(inp_tensor); @@ -122,12 +122,12 @@ TEST_F(ReferenceConvertColorI420LayerTest, CompareWithHardcodedRefs_batch_fp32_t 255., 0, 0, 255., 0, 0, 255., 0, 0, 255., 0, 0}; auto out_shape = Shape{3, 2, 2, 3}; - Tensor inp_tensor_y(input_shape_y, element::f32, input_y); - Tensor inp_tensor_u(input_shape_u, element::f32, input_u); - Tensor inp_tensor_v(input_shape_v, element::f32, input_v); + reference_tests::Tensor inp_tensor_y(input_shape_y, element::f32, input_y); + reference_tests::Tensor inp_tensor_u(input_shape_u, element::f32, input_u); + reference_tests::Tensor inp_tensor_v(input_shape_v, element::f32, input_v); inputData = {inp_tensor_y.data, inp_tensor_u.data, inp_tensor_v.data}; - Tensor exp_tensor(out_shape, element::f32, exp_out); + reference_tests::Tensor exp_tensor(out_shape, element::f32, exp_out); refOutData = {exp_tensor.data}; function = CreateFunction3(inp_tensor_y, inp_tensor_u, inp_tensor_v); @@ -157,12 +157,12 @@ TEST_F(ReferenceConvertColorI420LayerTest, CompareWithHardcodedRefs_color4x4_f32 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255}; auto out_shape = Shape{1, 2, 2, 3}; - Tensor inp_tensor_y(input_shape_y, element::f32, input_y); - Tensor inp_tensor_u(input_shape_u, element::f32, input_u); - Tensor inp_tensor_v(input_shape_v, element::f32, input_v); + reference_tests::Tensor inp_tensor_y(input_shape_y, element::f32, input_y); + reference_tests::Tensor inp_tensor_u(input_shape_u, element::f32, input_u); + reference_tests::Tensor inp_tensor_v(input_shape_v, element::f32, input_v); inputData = {inp_tensor_y.data, inp_tensor_u.data, inp_tensor_v.data}; - Tensor exp_tensor(out_shape, element::f32, exp_out); + reference_tests::Tensor exp_tensor(out_shape, element::f32, exp_out); refOutData = {exp_tensor.data}; function = CreateFunction3(inp_tensor_y, inp_tensor_u, inp_tensor_v); diff --git a/docs/template_plugin/tests/functional/op_reference/convert_color_nv12.cpp b/docs/template_plugin/tests/functional/op_reference/convert_color_nv12.cpp index afa8342cd6d..27980d6ba05 100644 --- a/docs/template_plugin/tests/functional/op_reference/convert_color_nv12.cpp +++ b/docs/template_plugin/tests/functional/op_reference/convert_color_nv12.cpp @@ -26,7 +26,7 @@ public: public: template - static std::shared_ptr CreateFunction(const Tensor& input) { + static std::shared_ptr CreateFunction(const reference_tests::Tensor& input) { const auto in = std::make_shared(input.type, input.shape); std::shared_ptr conv; conv = std::make_shared(in); @@ -35,7 +35,7 @@ public: } template - static std::shared_ptr CreateFunction2(const Tensor& input1, const Tensor& input2) { + static std::shared_ptr CreateFunction2(const reference_tests::Tensor& input1, const reference_tests::Tensor& input2) { const auto in1 = std::make_shared(input1.type, input1.shape); const auto in2 = std::make_shared(input2.type, input2.shape); std::shared_ptr conv; @@ -50,10 +50,10 @@ TEST_F(ReferenceConvertColorNV12LayerTest, CompareWithHardcodedRefs_r_u8_single_ auto input_shape = Shape{1, 3, 2, 1}; auto exp_out = std::vector {0xff, 0, 0, 0xff, 0, 0, 0xff, 0, 0, 0xff, 0, 0}; auto out_shape = Shape{1, 2, 2, 3}; - Tensor inp_tensor(input_shape, element::u8, input); + reference_tests::Tensor inp_tensor(input_shape, element::u8, input); inputData = {inp_tensor.data}; function = CreateFunction(inp_tensor); - Tensor exp_tensor_u8(out_shape, element::u8, exp_out); + reference_tests::Tensor exp_tensor_u8(out_shape, element::u8, exp_out); refOutData = {exp_tensor_u8.data}; Exec(); } @@ -64,10 +64,10 @@ TEST_F(ReferenceConvertColorNV12LayerTest, CompareWithHardcodedRefs_color_u8_sin auto exp_out = std::vector {37, 37, 164, 215, 216, 255, 37, 37, 164, 215, 216, 255}; auto out_shape = Shape{1, 2, 2, 3}; - Tensor inp_tensor(input_shape, element::u8, input); + reference_tests::Tensor inp_tensor(input_shape, element::u8, input); inputData = {inp_tensor.data}; - Tensor exp_tensor_u8(out_shape, element::u8, exp_out); + reference_tests::Tensor exp_tensor_u8(out_shape, element::u8, exp_out); refOutData = {exp_tensor_u8.data}; function = CreateFunction(inp_tensor); @@ -81,10 +81,10 @@ TEST_F(ReferenceConvertColorNV12LayerTest, CompareWithHardcodedRefs_g_fp32_singl auto exp_out = std::vector {0, 255.f, 0, 0, 255.f, 0, 0, 255.f, 0, 0, 255.f, 0}; auto out_shape = Shape{1, 2, 2, 3}; - Tensor inp_tensor(input_shape, element::f32, input); + reference_tests::Tensor inp_tensor(input_shape, element::f32, input); inputData = {inp_tensor.data}; - Tensor exp_tensor(out_shape, element::f32, exp_out); + reference_tests::Tensor exp_tensor(out_shape, element::f32, exp_out); refOutData = {exp_tensor.data}; function = CreateFunction(inp_tensor); @@ -108,11 +108,11 @@ TEST_F(ReferenceConvertColorNV12LayerTest, CompareWithHardcodedRefs_batch_fp32_t 255., 0, 0, 255., 0, 0, 255., 0, 0, 255., 0, 0}; auto out_shape = Shape{3, 2, 2, 3}; - Tensor inp_tensor_y(input_shape_y, element::f32, input_y); - Tensor inp_tensor_uv(input_shape_uv, element::f32, input_uv); + reference_tests::Tensor inp_tensor_y(input_shape_y, element::f32, input_y); + reference_tests::Tensor inp_tensor_uv(input_shape_uv, element::f32, input_uv); inputData = {inp_tensor_y.data, inp_tensor_uv.data}; - Tensor exp_tensor(out_shape, element::f32, exp_out); + reference_tests::Tensor exp_tensor(out_shape, element::f32, exp_out); refOutData = {exp_tensor.data}; function = CreateFunction2(inp_tensor_y, inp_tensor_uv); @@ -130,11 +130,11 @@ TEST_F(ReferenceConvertColorNV12LayerTest, CompareWithHardcodedRefs_color2x2_f32 auto exp_out = std::vector {164, 37, 37, 255, 216, 215, 164, 37, 37, 255, 216, 215}; auto out_shape = Shape{1, 2, 2, 3}; - Tensor inp_tensor_y(input_shape_y, element::f32, input_y); - Tensor inp_tensor_uv(input_shape_uv, element::f32, input_uv); + reference_tests::Tensor inp_tensor_y(input_shape_y, element::f32, input_y); + reference_tests::Tensor inp_tensor_uv(input_shape_uv, element::f32, input_uv); inputData = {inp_tensor_y.data, inp_tensor_uv.data}; - Tensor exp_tensor(out_shape, element::f32, exp_out); + reference_tests::Tensor exp_tensor(out_shape, element::f32, exp_out); refOutData = {exp_tensor.data}; function = CreateFunction2(inp_tensor_y, inp_tensor_uv); diff --git a/docs/template_plugin/tests/functional/op_reference/convolution.cpp b/docs/template_plugin/tests/functional/op_reference/convolution.cpp index 0ecdce37f0d..1fc0b100554 100644 --- a/docs/template_plugin/tests/functional/op_reference/convolution.cpp +++ b/docs/template_plugin/tests/functional/op_reference/convolution.cpp @@ -58,9 +58,9 @@ struct ConvolutionParams { ov::element::Type inType; ov::element::Type filterType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor filterData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor filterData; + ov::Tensor refData; ov::Strides strides; ov::CoordinateDiff padBegin; ov::CoordinateDiff padEnd; diff --git a/docs/template_plugin/tests/functional/op_reference/convolution_backprop.cpp b/docs/template_plugin/tests/functional/op_reference/convolution_backprop.cpp index 10c46842754..398bd908414 100644 --- a/docs/template_plugin/tests/functional/op_reference/convolution_backprop.cpp +++ b/docs/template_plugin/tests/functional/op_reference/convolution_backprop.cpp @@ -58,9 +58,9 @@ struct ConvolutionBackpropParams { ov::element::Type inType; ov::element::Type filterType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor filterData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor filterData; + ov::Tensor refData; ov::Strides strides; ov::CoordinateDiff padBegin; ov::CoordinateDiff padEnd; diff --git a/docs/template_plugin/tests/functional/op_reference/cos.cpp b/docs/template_plugin/tests/functional/op_reference/cos.cpp index b0e5eed97ec..27982b69b1f 100644 --- a/docs/template_plugin/tests/functional/op_reference/cos.cpp +++ b/docs/template_plugin/tests/functional/op_reference/cos.cpp @@ -13,8 +13,8 @@ namespace reference_tests { namespace { struct CosParams { - Tensor input; - Tensor expected; + reference_tests::Tensor input; + reference_tests::Tensor expected; }; struct Builder : ParamsBuilder { diff --git a/docs/template_plugin/tests/functional/op_reference/cosh.cpp b/docs/template_plugin/tests/functional/op_reference/cosh.cpp index 809f12332a1..6f5199e9fe6 100644 --- a/docs/template_plugin/tests/functional/op_reference/cosh.cpp +++ b/docs/template_plugin/tests/functional/op_reference/cosh.cpp @@ -13,8 +13,8 @@ namespace reference_tests { namespace { struct CoshParams { - Tensor input; - Tensor expected; + reference_tests::Tensor input; + reference_tests::Tensor expected; }; struct Builder : ParamsBuilder { diff --git a/docs/template_plugin/tests/functional/op_reference/ctc_greedy_decoder.cpp b/docs/template_plugin/tests/functional/op_reference/ctc_greedy_decoder.cpp index 5d1b7b7ae2f..6d7546d60f7 100644 --- a/docs/template_plugin/tests/functional/op_reference/ctc_greedy_decoder.cpp +++ b/docs/template_plugin/tests/functional/op_reference/ctc_greedy_decoder.cpp @@ -13,15 +13,15 @@ using namespace ov; namespace { struct CTCGreedyDecoderParams { CTCGreedyDecoderParams( - const Tensor& dataTensor, const Tensor& masksTensor, int64_t ctcMergedRepeat, - const Tensor& expectedTensor, const std::string& testcaseName = "") : + const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& masksTensor, int64_t ctcMergedRepeat, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dataTensor(dataTensor), masksTensor(masksTensor), ctcMergedRepeat(ctcMergedRepeat), expectedTensor(expectedTensor), testcaseName(testcaseName) {} - Tensor dataTensor; - Tensor masksTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor masksTensor; bool ctcMergedRepeat; - Tensor expectedTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -72,41 +72,41 @@ std::vector generateParams() { using T = typename element_type_traits::value_type; std::vector params { CTCGreedyDecoderParams( - Tensor(IN_ET, {3, 1, 3}, std::vector{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}), - Tensor(IN_ET, {3, 1}, std::vector{1.0f, 1.0f, 1.0f}), + reference_tests::Tensor(IN_ET, {3, 1, 3}, std::vector{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}), + reference_tests::Tensor(IN_ET, {3, 1}, std::vector{1.0f, 1.0f, 1.0f}), false, - Tensor(IN_ET, {1, 3, 1, 1}, std::vector{1.0f, 0.0f, 1.0f}), + reference_tests::Tensor(IN_ET, {1, 3, 1, 1}, std::vector{1.0f, 0.0f, 1.0f}), "ctc_greedy_decoder"), CTCGreedyDecoderParams( - Tensor(IN_ET, {3, 2, 3}, std::vector{ + reference_tests::Tensor(IN_ET, {3, 2, 3}, std::vector{ 0.1f, 0.2f, 0.f, 0.15f, 0.25f, 0.f, 0.4f, 0.3f, 0.f, 0.45f, 0.35f, 0.f, 0.5f, 0.6f, 0.f, 0.55f, 0.65f, 0.f}), - Tensor(IN_ET, {3, 2}, std::vector{1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f}), + reference_tests::Tensor(IN_ET, {3, 2}, std::vector{1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f}), false, - Tensor(IN_ET, {2, 3, 1, 1}, std::vector{1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f}), + reference_tests::Tensor(IN_ET, {2, 3, 1, 1}, std::vector{1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f}), "ctc_greedy_decoder_multiple_batches"), CTCGreedyDecoderParams( - Tensor(IN_ET, {3, 1, 3}, std::vector{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}), - Tensor(IN_ET, {3, 1}, std::vector{1.0f, 1.0f, 0.0f}), + reference_tests::Tensor(IN_ET, {3, 1, 3}, std::vector{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}), + reference_tests::Tensor(IN_ET, {3, 1}, std::vector{1.0f, 1.0f, 0.0f}), false, - Tensor(IN_ET, {1, 3, 1, 1}, std::vector{1.0f, 0.0f, -1.0f}), + reference_tests::Tensor(IN_ET, {1, 3, 1, 1}, std::vector{1.0f, 0.0f, -1.0f}), "ctc_greedy_decoder_single_batch_short_sequence"), CTCGreedyDecoderParams( - Tensor(IN_ET, {3, 1, 3}, std::vector{0.1f, 0.2f, 0.f, 0.3f, 0.4f, 0.f, 0.6f, 0.5f, 0.f}), - Tensor(IN_ET, {3, 1}, std::vector{1.0f, 1.0f, 1.0f}), + reference_tests::Tensor(IN_ET, {3, 1, 3}, std::vector{0.1f, 0.2f, 0.f, 0.3f, 0.4f, 0.f, 0.6f, 0.5f, 0.f}), + reference_tests::Tensor(IN_ET, {3, 1}, std::vector{1.0f, 1.0f, 1.0f}), true, - Tensor(IN_ET, {1, 3, 1, 1}, std::vector{1.0f, 0.0f, -1.0f}), + reference_tests::Tensor(IN_ET, {1, 3, 1, 1}, std::vector{1.0f, 0.0f, -1.0f}), "ctc_greedy_decoder_merge"), CTCGreedyDecoderParams( - Tensor(IN_ET, {3, 1, 3}, std::vector{0.1f, 0.2f, 0.f, 0.3f, 0.4f, 0.f, 0.6f, 0.5f, 0.f}), - Tensor(IN_ET, {3, 1}, std::vector{1.0f, 1.0f, 1.0f}), + reference_tests::Tensor(IN_ET, {3, 1, 3}, std::vector{0.1f, 0.2f, 0.f, 0.3f, 0.4f, 0.f, 0.6f, 0.5f, 0.f}), + reference_tests::Tensor(IN_ET, {3, 1}, std::vector{1.0f, 1.0f, 1.0f}), false, - Tensor(IN_ET, {1, 3, 1, 1}, std::vector{1.0f, 1.0f, 0.0f}), + reference_tests::Tensor(IN_ET, {1, 3, 1, 1}, std::vector{1.0f, 1.0f, 0.0f}), "ctc_greedy_decoder_single_no_merge"), CTCGreedyDecoderParams( - Tensor(IN_ET, {2, 2, 3}, std::vector{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f, 0.7f, 0.8f, 0.f}), - Tensor(IN_ET, {2, 2}, std::vector{1.0f, 1.0f, 1.0f, 0.0f}), + reference_tests::Tensor(IN_ET, {2, 2, 3}, std::vector{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f, 0.7f, 0.8f, 0.f}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{1.0f, 1.0f, 1.0f, 0.0f}), false, - Tensor(IN_ET, {2, 2, 1, 1}, std::vector{1.0f, 1.0f, 0.0f, -1.0f}), + reference_tests::Tensor(IN_ET, {2, 2, 1, 1}, std::vector{1.0f, 1.0f, 0.0f, -1.0f}), "ctc_greedy_decoder_multiple_sequences"), }; return params; diff --git a/docs/template_plugin/tests/functional/op_reference/ctc_greedy_decoder_seq_len.cpp b/docs/template_plugin/tests/functional/op_reference/ctc_greedy_decoder_seq_len.cpp index 82020d1dd44..ec828bb8232 100644 --- a/docs/template_plugin/tests/functional/op_reference/ctc_greedy_decoder_seq_len.cpp +++ b/docs/template_plugin/tests/functional/op_reference/ctc_greedy_decoder_seq_len.cpp @@ -14,32 +14,32 @@ using namespace ov; namespace { struct CTCGreedyDecoderSeqLenParams { CTCGreedyDecoderSeqLenParams( - const Tensor& dataTensor, const Tensor& seqLenTensor, const Tensor& blankIndexTensor, int64_t mergeRepeated, - const Tensor& expectedTensor, const Tensor& expectedTensor2, const std::string& testcaseName = "") : + const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& seqLenTensor, const reference_tests::Tensor& blankIndexTensor, int64_t mergeRepeated, + const reference_tests::Tensor& expectedTensor, const reference_tests::Tensor& expectedTensor2, const std::string& testcaseName = "") : dataTensor(dataTensor), seqLenTensor(seqLenTensor), blankIndexTensor(blankIndexTensor), mergeRepeated(mergeRepeated), expectedTensor(expectedTensor), expectedTensor2(expectedTensor2), testcaseName(testcaseName) {} - Tensor dataTensor; - Tensor seqLenTensor; - Tensor blankIndexTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor seqLenTensor; + reference_tests::Tensor blankIndexTensor; bool mergeRepeated; - Tensor expectedTensor; - Tensor expectedTensor2; + reference_tests::Tensor expectedTensor; + reference_tests::Tensor expectedTensor2; std::string testcaseName; }; struct CTCGreedyDecoderSeqLenParamsNoOptionalInput { CTCGreedyDecoderSeqLenParamsNoOptionalInput( - const Tensor& dataTensor, const Tensor& seqLenTensor, int64_t mergeRepeated, - const Tensor& expectedTensor, const Tensor& expectedTensor2, const std::string& testcaseName = "") : + const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& seqLenTensor, int64_t mergeRepeated, + const reference_tests::Tensor& expectedTensor, const reference_tests::Tensor& expectedTensor2, const std::string& testcaseName = "") : dataTensor(dataTensor), seqLenTensor(seqLenTensor), mergeRepeated(mergeRepeated), expectedTensor(expectedTensor), expectedTensor2(expectedTensor2), testcaseName(testcaseName) {} - Tensor dataTensor; - Tensor seqLenTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor seqLenTensor; bool mergeRepeated; - Tensor expectedTensor; - Tensor expectedTensor2; + reference_tests::Tensor expectedTensor; + reference_tests::Tensor expectedTensor2; std::string testcaseName; }; @@ -137,39 +137,39 @@ std::vector generateParams() { using T = typename element_type_traits::value_type; std::vector params { CTCGreedyDecoderSeqLenParams( - Tensor(ET, {1, 3, 3}, std::vector{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}), - Tensor(element::i32, {1}, std::vector{2}), - Tensor(element::i32, {}, std::vector{2}), + reference_tests::Tensor(ET, {1, 3, 3}, std::vector{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}), + reference_tests::Tensor(element::i32, {1}, std::vector{2}), + reference_tests::Tensor(element::i32, {}, std::vector{2}), false, - Tensor(element::i32, {1, 3}, std::vector{1, 0, -1}), - Tensor(element::i32, {1}, std::vector{2}), + reference_tests::Tensor(element::i32, {1, 3}, std::vector{1, 0, -1}), + reference_tests::Tensor(element::i32, {1}, std::vector{2}), "evaluate_ctc_greedy_decoder_seq_len"), CTCGreedyDecoderSeqLenParams( - Tensor(ET, {1, 3, 3}, std::vector{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}), - Tensor(element::i32, {1}, std::vector{2}), - Tensor(element::i32, {}, std::vector{2}), + reference_tests::Tensor(ET, {1, 3, 3}, std::vector{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}), + reference_tests::Tensor(element::i32, {1}, std::vector{2}), + reference_tests::Tensor(element::i32, {}, std::vector{2}), true, - Tensor(element::i32, {1, 3}, std::vector{1, 0, -1}), - Tensor(element::i32, {1}, std::vector{2}), + reference_tests::Tensor(element::i32, {1, 3}, std::vector{1, 0, -1}), + reference_tests::Tensor(element::i32, {1}, std::vector{2}), "evaluate_ctc_greedy_decoder_seq_len_merge"), CTCGreedyDecoderSeqLenParams( - Tensor(ET, {2, 3, 3}, std::vector{0.1f, 0.2f, 0.f, 0.15f, 0.25f, 0.f, 0.4f, 0.3f, 0.f, + reference_tests::Tensor(ET, {2, 3, 3}, std::vector{0.1f, 0.2f, 0.f, 0.15f, 0.25f, 0.f, 0.4f, 0.3f, 0.f, 0.45f, 0.35f, 0.f, 0.5f, 0.6f, 0.f, 0.55f, 0.65f, 0.f}), - Tensor(element::i32, {2}, std::vector{1, 1}), - Tensor(element::i32, {}, std::vector{2}), + reference_tests::Tensor(element::i32, {2}, std::vector{1, 1}), + reference_tests::Tensor(element::i32, {}, std::vector{2}), false, - Tensor(element::i32, {2, 3}, std::vector{1, -1, -1, 0, -1, -1}), - Tensor(element::i32, {2}, std::vector{1, 1}), + reference_tests::Tensor(element::i32, {2, 3}, std::vector{1, -1, -1, 0, -1, -1}), + reference_tests::Tensor(element::i32, {2}, std::vector{1, 1}), "evaluate_ctc_greedy_decoder_seq_len_multiple_batches"), CTCGreedyDecoderSeqLenParams( - Tensor(ET, {3, 3, 3}, std::vector{0.1f, 0.2f, 0.f, 0.15f, 0.25f, 0.f, 0.4f, 0.3f, 0.f, + reference_tests::Tensor(ET, {3, 3, 3}, std::vector{0.1f, 0.2f, 0.f, 0.15f, 0.25f, 0.f, 0.4f, 0.3f, 0.f, 0.45f, 0.35f, 0.f, 0.5f, 0.6f, 0.f, 0.55f, 0.65f, 0.f, 0.1f, 0.2f, 0.f, 0.15f, 0.25f, 0.f, 0.4f, 0.3f, 0.f}), - Tensor(element::i32, {3}, std::vector{2, 3, 1}), - Tensor(element::i32, {}, std::vector{2}), + reference_tests::Tensor(element::i32, {3}, std::vector{2, 3, 1}), + reference_tests::Tensor(element::i32, {}, std::vector{2}), false, - Tensor(element::i32, {3, 3}, std::vector{1, 1, -1, 0, 1, 1, 1, -1, -1}), - Tensor(element::i32, {3}, std::vector{2, 3, 1}), + reference_tests::Tensor(element::i32, {3, 3}, std::vector{1, 1, -1, 0, 1, 1, 1, -1, -1}), + reference_tests::Tensor(element::i32, {3}, std::vector{2, 3, 1}), "evaluate_ctc_greedy_decoder_seq_len_multiple_batches2"), }; return params; @@ -195,11 +195,11 @@ std::vector generateParamsNoOptiona using T = typename element_type_traits::value_type; std::vector params { CTCGreedyDecoderSeqLenParamsNoOptionalInput( - Tensor(ET, {1, 3, 3}, std::vector{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}), - Tensor(element::i32, {1}, std::vector{2}), + reference_tests::Tensor(ET, {1, 3, 3}, std::vector{0.1f, 0.2f, 0.f, 0.4f, 0.3f, 0.f, 0.5f, 0.6f, 0.f}), + reference_tests::Tensor(element::i32, {1}, std::vector{2}), false, - Tensor(element::i32, {1, 3}, std::vector{1, 0, -1}), - Tensor(element::i32, {1}, std::vector{2}), + reference_tests::Tensor(element::i32, {1, 3}, std::vector{1, 0, -1}), + reference_tests::Tensor(element::i32, {1}, std::vector{2}), "evaluate_ctc_greedy_decoder_seq_len_no_optional_input"), }; return params; diff --git a/docs/template_plugin/tests/functional/op_reference/ctc_loss.cpp b/docs/template_plugin/tests/functional/op_reference/ctc_loss.cpp index 8f101318472..ade062462c0 100644 --- a/docs/template_plugin/tests/functional/op_reference/ctc_loss.cpp +++ b/docs/template_plugin/tests/functional/op_reference/ctc_loss.cpp @@ -13,8 +13,8 @@ using namespace ov; namespace { struct CTCLossParams { - CTCLossParams(const bool collapseRepeated, const bool mergeRepeated, const bool findUnique, const Tensor& logitsTensor, const Tensor& logitsLenTensor, - const Tensor& labelsTensor, const Tensor& labelsLenTensor, const Tensor& blankIdxTensor, const Tensor& expectedTensor) + CTCLossParams(const bool collapseRepeated, const bool mergeRepeated, const bool findUnique, const reference_tests::Tensor& logitsTensor, const reference_tests::Tensor& logitsLenTensor, + const reference_tests::Tensor& labelsTensor, const reference_tests::Tensor& labelsLenTensor, const reference_tests::Tensor& blankIdxTensor, const reference_tests::Tensor& expectedTensor) : preprocessCollapseRepeated(collapseRepeated), ctcMergeRepeated(mergeRepeated), unique(findUnique), @@ -28,12 +28,12 @@ struct CTCLossParams { bool preprocessCollapseRepeated; bool ctcMergeRepeated; bool unique; - Tensor logits; - Tensor logitsLen; - Tensor labels; - Tensor labelsLen; - Tensor blankIdx; - Tensor expected; + reference_tests::Tensor logits; + reference_tests::Tensor logitsLen; + reference_tests::Tensor labels; + reference_tests::Tensor labelsLen; + reference_tests::Tensor blankIdx; + reference_tests::Tensor expected; }; class ReferenceCTCLossLayerTest : public testing::TestWithParam, public CommonReferenceTest { @@ -80,89 +80,89 @@ TEST_P(ReferenceCTCLossLayerTest, CompareWithRefs) { INSTANTIATE_TEST_SUITE_P( smoke_CTCLoss_With_Hardcoded_Refs, ReferenceCTCLossLayerTest, ::testing::Values(CTCLossParams(false, false, false, // collapse repeated, merge repeated, unique - Tensor({2, 3, 3}, element::f32, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits - Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen - Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels - Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen - Tensor({}, element::i32, std::vector {2}), // blankIdx - Tensor({2}, element::f32, std::vector {1.41223f, 14.1359f})), // refOut + reference_tests::Tensor({2, 3, 3}, element::f32, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits + reference_tests::Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen + reference_tests::Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels + reference_tests::Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen + reference_tests::Tensor({}, element::i32, std::vector {2}), // blankIdx + reference_tests::Tensor({2}, element::f32, std::vector {1.41223f, 14.1359f})), // refOut CTCLossParams(false, false, true, // collapse repeated, merge repeated, unique - Tensor({2, 3, 3}, element::f32, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits - Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen - Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels - Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen - Tensor({}, element::i32, std::vector {2}), // blankIdx - Tensor({2}, element::f32, std::vector {1.41223f, 14.1359f})), // refOut + reference_tests::Tensor({2, 3, 3}, element::f32, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits + reference_tests::Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen + reference_tests::Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels + reference_tests::Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen + reference_tests::Tensor({}, element::i32, std::vector {2}), // blankIdx + reference_tests::Tensor({2}, element::f32, std::vector {1.41223f, 14.1359f})), // refOut CTCLossParams(false, true, false, // collapse repeated, merge repeated, unique - Tensor({2, 3, 3}, element::f32, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits - Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen - Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels - Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen - Tensor({}, element::i32, std::vector {2}), // blankIdx - Tensor({2}, element::f32, std::vector {1.41156f, 13.2745f})), // refOut + reference_tests::Tensor({2, 3, 3}, element::f32, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits + reference_tests::Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen + reference_tests::Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels + reference_tests::Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen + reference_tests::Tensor({}, element::i32, std::vector {2}), // blankIdx + reference_tests::Tensor({2}, element::f32, std::vector {1.41156f, 13.2745f})), // refOut CTCLossParams(true, false, false, // collapse repeated, merge repeated, unique - Tensor({2, 3, 3}, element::f32, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits - Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen - Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels - Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen - Tensor({}, element::i32, std::vector {2}), // blankIdx - Tensor({2}, element::f32, std::vector {1.41223f, 14.1359f})), // refOut + reference_tests::Tensor({2, 3, 3}, element::f32, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits + reference_tests::Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen + reference_tests::Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels + reference_tests::Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen + reference_tests::Tensor({}, element::i32, std::vector {2}), // blankIdx + reference_tests::Tensor({2}, element::f32, std::vector {1.41223f, 14.1359f})), // refOut CTCLossParams(false, true, true, // collapse repeated, merge repeated, unique - Tensor({2, 3, 3}, element::f32, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits - Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen - Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels - Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen - Tensor({}, element::i32, std::vector {2}), // blankIdx - Tensor({2}, element::f32, std::vector {1.41156f, 13.2745f})), // refOut + reference_tests::Tensor({2, 3, 3}, element::f32, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits + reference_tests::Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen + reference_tests::Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels + reference_tests::Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen + reference_tests::Tensor({}, element::i32, std::vector {2}), // blankIdx + reference_tests::Tensor({2}, element::f32, std::vector {1.41156f, 13.2745f})), // refOut CTCLossParams(true, true, true, // collapse repeated, merge repeated, unique - Tensor({2, 3, 3}, element::f32, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits - Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen - Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels - Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen - Tensor({}, element::i32, std::vector {2}), // blankIdx - Tensor({2}, element::f32, std::vector {1.41223f, 13.2745f})), // refOut + reference_tests::Tensor({2, 3, 3}, element::f32, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits + reference_tests::Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen + reference_tests::Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels + reference_tests::Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen + reference_tests::Tensor({}, element::i32, std::vector {2}), // blankIdx + reference_tests::Tensor({2}, element::f32, std::vector {1.41223f, 13.2745f})), // refOut // floating point type - float16 CTCLossParams(false, false, false, // collapse repeated, merge repeated, unique - Tensor({2, 3, 3}, element::f16, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits - Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen - Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels - Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen - Tensor({}, element::i32, std::vector {2}), // blankIdx - Tensor({2}, element::f16, std::vector {1.41223f, 14.1359f})), // refOut + reference_tests::Tensor({2, 3, 3}, element::f16, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits + reference_tests::Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen + reference_tests::Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels + reference_tests::Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen + reference_tests::Tensor({}, element::i32, std::vector {2}), // blankIdx + reference_tests::Tensor({2}, element::f16, std::vector {1.41223f, 14.1359f})), // refOut CTCLossParams(false, false, true, // collapse repeated, merge repeated, unique - Tensor({2, 3, 3}, element::f16, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits - Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen - Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels - Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen - Tensor({}, element::i32, std::vector {2}), // blankIdx - Tensor({2}, element::f16, std::vector {1.41223f, 14.1359f})), // refOut + reference_tests::Tensor({2, 3, 3}, element::f16, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits + reference_tests::Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen + reference_tests::Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels + reference_tests::Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen + reference_tests::Tensor({}, element::i32, std::vector {2}), // blankIdx + reference_tests::Tensor({2}, element::f16, std::vector {1.41223f, 14.1359f})), // refOut CTCLossParams(false, true, false, // collapse repeated, merge repeated, unique - Tensor({2, 3, 3}, element::f16, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits - Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen - Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels - Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen - Tensor({}, element::i32, std::vector {2}), // blankIdx - Tensor({2}, element::f16, std::vector {1.41156f, 13.2745f})), // refOut + reference_tests::Tensor({2, 3, 3}, element::f16, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits + reference_tests::Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen + reference_tests::Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels + reference_tests::Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen + reference_tests::Tensor({}, element::i32, std::vector {2}), // blankIdx + reference_tests::Tensor({2}, element::f16, std::vector {1.41156f, 13.2745f})), // refOut CTCLossParams(true, false, false, // collapse repeated, merge repeated, unique - Tensor({2, 3, 3}, element::f16, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits - Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen - Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels - Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen - Tensor({}, element::i32, std::vector {2}), // blankIdx - Tensor({2}, element::f16, std::vector {1.41223f, 14.1359f})), // refOut + reference_tests::Tensor({2, 3, 3}, element::f16, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits + reference_tests::Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen + reference_tests::Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels + reference_tests::Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen + reference_tests::Tensor({}, element::i32, std::vector {2}), // blankIdx + reference_tests::Tensor({2}, element::f16, std::vector {1.41223f, 14.1359f})), // refOut CTCLossParams(false, true, true, // collapse repeated, merge repeated, unique - Tensor({2, 3, 3}, element::f16, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits - Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen - Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels - Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen - Tensor({}, element::i32, std::vector {2}), // blankIdx - Tensor({2}, element::f16, std::vector {1.41156f, 13.2745f})), // refOut + reference_tests::Tensor({2, 3, 3}, element::f16, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits + reference_tests::Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen + reference_tests::Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels + reference_tests::Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen + reference_tests::Tensor({}, element::i32, std::vector {2}), // blankIdx + reference_tests::Tensor({2}, element::f16, std::vector {1.41156f, 13.2745f})), // refOut CTCLossParams(true, true, true, // collapse repeated, merge repeated, unique - Tensor({2, 3, 3}, element::f16, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits - Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen - Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels - Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen - Tensor({}, element::i32, std::vector {2}), // blankIdx - Tensor({2}, element::f16, std::vector {1.41223f, 13.2745f}))), // refOut + reference_tests::Tensor({2, 3, 3}, element::f16, std::vector {0, 1, 8, 5, 5, 2, 0, 7, 7, 10, 4, 5, 9, 0, 0, 5, 7, 0}), // logits + reference_tests::Tensor({2}, element::i32, std::vector {3, 3}), // logitsLen + reference_tests::Tensor({2, 3}, element::i32, std::vector {0, 1, 2, 1, 1, 1}), // labels + reference_tests::Tensor({2}, element::i32, std::vector {2, 1}), // labelsLen + reference_tests::Tensor({}, element::i32, std::vector {2}), // blankIdx + reference_tests::Tensor({2}, element::f16, std::vector {1.41223f, 13.2745f}))), // refOut ReferenceCTCLossLayerTest::getTestCaseName); } // namespace diff --git a/docs/template_plugin/tests/functional/op_reference/cum_sum.cpp b/docs/template_plugin/tests/functional/op_reference/cum_sum.cpp index e359693af1f..3ac7bcd4a72 100644 --- a/docs/template_plugin/tests/functional/op_reference/cum_sum.cpp +++ b/docs/template_plugin/tests/functional/op_reference/cum_sum.cpp @@ -49,9 +49,9 @@ struct CumSumParams { element::Type axisType; element::Type inType; element::Type outType; - ov::runtime::Tensor axisData; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor axisData; + ov::Tensor inputData; + ov::Tensor refData; bool testDefaults = false; }; diff --git a/docs/template_plugin/tests/functional/op_reference/deformable_convolution.cpp b/docs/template_plugin/tests/functional/op_reference/deformable_convolution.cpp index b97998d9fde..e6b9fcf1237 100644 --- a/docs/template_plugin/tests/functional/op_reference/deformable_convolution.cpp +++ b/docs/template_plugin/tests/functional/op_reference/deformable_convolution.cpp @@ -87,11 +87,11 @@ struct DeformableConvolutionParams { ov::element::Type offsetType; ov::element::Type outType; ov::element::Type maskType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor filterData; - ov::runtime::Tensor offsetData; - ov::runtime::Tensor refData; - ov::runtime::Tensor maskData; + ov::Tensor inputData; + ov::Tensor filterData; + ov::Tensor offsetData; + ov::Tensor refData; + ov::Tensor maskData; ov::Strides strides; ov::CoordinateDiff padBegin; ov::CoordinateDiff padEnd; diff --git a/docs/template_plugin/tests/functional/op_reference/deformable_psroi_pooling.cpp b/docs/template_plugin/tests/functional/op_reference/deformable_psroi_pooling.cpp index 59d62bdb197..f3cfd0df1e4 100644 --- a/docs/template_plugin/tests/functional/op_reference/deformable_psroi_pooling.cpp +++ b/docs/template_plugin/tests/functional/op_reference/deformable_psroi_pooling.cpp @@ -116,10 +116,10 @@ struct DeformablePSROIPoolingParams { ov::element::Type roisType; ov::element::Type offsetsType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor roisData; - ov::runtime::Tensor offsetsData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor roisData; + ov::Tensor offsetsData; + ov::Tensor refData; std::string testcaseName; }; diff --git a/docs/template_plugin/tests/functional/op_reference/depth_to_space.cpp b/docs/template_plugin/tests/functional/op_reference/depth_to_space.cpp index 7c69d347264..20df31fd246 100644 --- a/docs/template_plugin/tests/functional/op_reference/depth_to_space.cpp +++ b/docs/template_plugin/tests/functional/op_reference/depth_to_space.cpp @@ -12,15 +12,15 @@ using namespace ov; namespace { struct DepthToSpaceParams { - DepthToSpaceParams(const Tensor& dataTensor, const std::string mode, const int32_t blockSize, - const Tensor& expectedTensor, const std::string& testcaseName = "") : + DepthToSpaceParams(const reference_tests::Tensor& dataTensor, const std::string mode, const int32_t blockSize, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dataTensor(dataTensor), mode(mode), blockSize(blockSize), expectedTensor(expectedTensor), testcaseName(testcaseName) {} - Tensor dataTensor; + reference_tests::Tensor dataTensor; std::string mode; int32_t blockSize; - Tensor expectedTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -68,61 +68,61 @@ std::vector generateDepthToSpaceParams() { std::vector depthToSpaceParams { // depth_to_space_block_first_K1_BS2 DepthToSpaceParams( - Tensor({1, 8, 2}, IN_ET, std::vector{0, 2, 8, 10, 16, 18, 24, 26, 1, 3, 9, 11, 17, 19, 25, 27}), + reference_tests::Tensor({1, 8, 2}, IN_ET, std::vector{0, 2, 8, 10, 16, 18, 24, 26, 1, 3, 9, 11, 17, 19, 25, 27}), "BLOCKS_FIRST", 2, - Tensor({1, 4, 4}, IN_ET, std::vector{0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27}), + reference_tests::Tensor({1, 4, 4}, IN_ET, std::vector{0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27}), "depth_to_space_block_first_K1_BS2"), // depth_to_space_block_first_K2_BS2 DepthToSpaceParams( - Tensor({1, 8, 2, 2}, IN_ET, std::vector{0, 2, 8, 10, 16, 18, 24, 26, 1, 3, 9, + reference_tests::Tensor({1, 8, 2, 2}, IN_ET, std::vector{0, 2, 8, 10, 16, 18, 24, 26, 1, 3, 9, 11, 17, 19, 25, 27, 4, 6, 12, 14, 20, 22, 28, 30, 5, 7, 13, 15, 21, 23, 29, 31}), "BLOCKS_FIRST", 2, - Tensor({1, 2, 4, 4}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({1, 2, 4, 4}, IN_ET, 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, 24, 25, 26, 27, 28, 29, 30, 31}), "depth_to_space_block_first_K2_BS2"), // depth_to_space_block_first_K2_BS4 DepthToSpaceParams( - Tensor({1, 16, 2, 1}, IN_ET, std::vector{0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, + reference_tests::Tensor({1, 16, 2, 1}, IN_ET, std::vector{0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23, 8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31}), "BLOCKS_FIRST", 4, - Tensor({1, 1, 8, 4}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({1, 1, 8, 4}, IN_ET, 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, 24, 25, 26, 27, 28, 29, 30, 31}), "depth_to_space_block_first_K2_BS4"), // depth_to_space_depth_first_1K_BS2 DepthToSpaceParams( - Tensor({1, 8, 2}, IN_ET, std::vector{0, 2, 1, 3, 4, 6, 5, 7, 8, 10, 9, 11, 12, 14, 13, 15}), + reference_tests::Tensor({1, 8, 2}, IN_ET, std::vector{0, 2, 1, 3, 4, 6, 5, 7, 8, 10, 9, 11, 12, 14, 13, 15}), "DEPTH_FIRST", 2, - Tensor({1, 4, 4}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}), + reference_tests::Tensor({1, 4, 4}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}), "depth_to_space_depth_first_1K_BS2"), // depth_to_space_depth_first_2K_BS2 DepthToSpaceParams( - Tensor({1, 8, 2, 2}, IN_ET, std::vector{0, 2, 8, 10, 16, 18, 24, 26, 1, 3, 9, + reference_tests::Tensor({1, 8, 2, 2}, IN_ET, std::vector{0, 2, 8, 10, 16, 18, 24, 26, 1, 3, 9, 11, 17, 19, 25, 27, 4, 6, 12, 14, 20, 22, 28, 30, 5, 7, 13, 15, 21, 23, 29, 31}), "DEPTH_FIRST", 2, - Tensor({1, 2, 4, 4}, IN_ET, std::vector{0, 16, 2, 18, 1, 17, 3, 19, 8, 24, 10, 26, 9, 25, 11, 27, + reference_tests::Tensor({1, 2, 4, 4}, IN_ET, std::vector{0, 16, 2, 18, 1, 17, 3, 19, 8, 24, 10, 26, 9, 25, 11, 27, 4, 20, 6, 22, 5, 21, 7, 23, 12, 28, 14, 30, 13, 29, 15, 31}), "depth_to_space_depth_first_2K_BS2"), // depth_to_space_depth_first_2K_BS4 DepthToSpaceParams( - Tensor({1, 16, 2, 1}, IN_ET, std::vector{0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, + reference_tests::Tensor({1, 16, 2, 1}, IN_ET, std::vector{0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23, 8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31}), "DEPTH_FIRST", 4, - Tensor({1, 1, 8, 4}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({1, 1, 8, 4}, IN_ET, 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, 24, 25, 26, 27, 28, 29, 30, 31}), "depth_to_space_depth_first_2K_BS4"), }; diff --git a/docs/template_plugin/tests/functional/op_reference/detection_output.cpp b/docs/template_plugin/tests/functional/op_reference/detection_output.cpp index eb5ba1a8fe9..8e9f04f3f84 100644 --- a/docs/template_plugin/tests/functional/op_reference/detection_output.cpp +++ b/docs/template_plugin/tests/functional/op_reference/detection_output.cpp @@ -142,12 +142,12 @@ template ov::PartialShape auxLocShape; ov::PartialShape auxConfShape; ov::element::Type inType; - ov::runtime::Tensor locData; - ov::runtime::Tensor confData; - ov::runtime::Tensor priorBoxesData; - ov::runtime::Tensor refData; - ov::runtime::Tensor auxLocData; - ov::runtime::Tensor auxConfData; + ov::Tensor locData; + ov::Tensor confData; + ov::Tensor priorBoxesData; + ov::Tensor refData; + ov::Tensor auxLocData; + ov::Tensor auxConfData; std::string testcaseName; }; diff --git a/docs/template_plugin/tests/functional/op_reference/dft.cpp b/docs/template_plugin/tests/functional/op_reference/dft.cpp index 866a9ff9f59..d065b64f15e 100644 --- a/docs/template_plugin/tests/functional/op_reference/dft.cpp +++ b/docs/template_plugin/tests/functional/op_reference/dft.cpp @@ -37,8 +37,8 @@ struct DFTParams { Shape m_expected_shape; element::Type_t m_input_type; element::Type_t m_expected_type; - runtime::Tensor m_input_value; - runtime::Tensor m_expected_value; + ov::Tensor m_input_value; + ov::Tensor m_expected_value; std::shared_ptr m_axes; std::shared_ptr m_signal; }; diff --git a/docs/template_plugin/tests/functional/op_reference/divide.cpp b/docs/template_plugin/tests/functional/op_reference/divide.cpp index d9880e99a97..741b0d9d1ef 100644 --- a/docs/template_plugin/tests/functional/op_reference/divide.cpp +++ b/docs/template_plugin/tests/functional/op_reference/divide.cpp @@ -31,9 +31,9 @@ struct DivideParams { PartialShape pshape2; element::Type inType; element::Type outType; - runtime::Tensor inputData1; - runtime::Tensor inputData2; - runtime::Tensor refData; + ov::Tensor inputData1; + ov::Tensor inputData2; + ov::Tensor refData; }; struct DivideRoundingParams : public DivideParams { diff --git a/docs/template_plugin/tests/functional/op_reference/einsum.cpp b/docs/template_plugin/tests/functional/op_reference/einsum.cpp index 25f298d46c7..a4c6794eaca 100644 --- a/docs/template_plugin/tests/functional/op_reference/einsum.cpp +++ b/docs/template_plugin/tests/functional/op_reference/einsum.cpp @@ -13,9 +13,9 @@ using namespace ov; namespace { struct EinsumParams { - std::vector inputs; + std::vector inputs; std::string equation; - Tensor expectedResult; + reference_tests::Tensor expectedResult; std::string testcaseName; }; diff --git a/docs/template_plugin/tests/functional/op_reference/elu.cpp b/docs/template_plugin/tests/functional/op_reference/elu.cpp index 1c0c53fc55d..1d5ca905b00 100644 --- a/docs/template_plugin/tests/functional/op_reference/elu.cpp +++ b/docs/template_plugin/tests/functional/op_reference/elu.cpp @@ -27,8 +27,8 @@ struct EluParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceEluLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/embedding_segments_sum.cpp b/docs/template_plugin/tests/functional/op_reference/embedding_segments_sum.cpp index b5dcc95e77d..32f72850187 100644 --- a/docs/template_plugin/tests/functional/op_reference/embedding_segments_sum.cpp +++ b/docs/template_plugin/tests/functional/op_reference/embedding_segments_sum.cpp @@ -40,11 +40,11 @@ struct EmbeddingSegmentsSumParams { ov::PartialShape _iShape; ov::element::Type _iType; - ov::runtime::Tensor _iData; + ov::Tensor _iData; ov::PartialShape _refShape; ov::element::Type _refType; - ov::runtime::Tensor _refData; + ov::Tensor _refData; std::shared_ptr _indices; std::shared_ptr _segmentIds; diff --git a/docs/template_plugin/tests/functional/op_reference/embeddingbag_offsetssum.cpp b/docs/template_plugin/tests/functional/op_reference/embeddingbag_offsetssum.cpp index 6a02ea3e8f8..ce3968719d6 100644 --- a/docs/template_plugin/tests/functional/op_reference/embeddingbag_offsetssum.cpp +++ b/docs/template_plugin/tests/functional/op_reference/embeddingbag_offsetssum.cpp @@ -37,11 +37,11 @@ struct EmbeddingBagOffsetsSumParams { } ov::PartialShape _iShape; ov::element::Type _iType; - ov::runtime::Tensor _iData; + ov::Tensor _iData; ov::PartialShape _refShape; ov::element::Type _refType; - ov::runtime::Tensor _refData; + ov::Tensor _refData; std::shared_ptr _indices; std::shared_ptr _offsets; diff --git a/docs/template_plugin/tests/functional/op_reference/embeddingbag_packedsum.cpp b/docs/template_plugin/tests/functional/op_reference/embeddingbag_packedsum.cpp index 3d014698b7a..1af37dfeeed 100644 --- a/docs/template_plugin/tests/functional/op_reference/embeddingbag_packedsum.cpp +++ b/docs/template_plugin/tests/functional/op_reference/embeddingbag_packedsum.cpp @@ -33,11 +33,11 @@ struct EmbeddingBagPackedSumParams { } ov::PartialShape _iShape; ov::element::Type _iType; - ov::runtime::Tensor _iData; + ov::Tensor _iData; ov::PartialShape _refShape; ov::element::Type _refType; - ov::runtime::Tensor _refData; + ov::Tensor _refData; std::shared_ptr _indices; std::shared_ptr _perSampleWeights; // Optional, default is tensor of ones. diff --git a/docs/template_plugin/tests/functional/op_reference/erf.cpp b/docs/template_plugin/tests/functional/op_reference/erf.cpp index 99ef792ed92..ff22698515a 100644 --- a/docs/template_plugin/tests/functional/op_reference/erf.cpp +++ b/docs/template_plugin/tests/functional/op_reference/erf.cpp @@ -37,8 +37,8 @@ struct ErfParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceErfLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/exp.cpp b/docs/template_plugin/tests/functional/op_reference/exp.cpp index 907202ff1c8..c50f86818c3 100644 --- a/docs/template_plugin/tests/functional/op_reference/exp.cpp +++ b/docs/template_plugin/tests/functional/op_reference/exp.cpp @@ -26,8 +26,8 @@ struct ExpParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceExpLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/experimental_detectron_detection_output.cpp b/docs/template_plugin/tests/functional/op_reference/experimental_detectron_detection_output.cpp index e93f71e344f..0f5841fc321 100644 --- a/docs/template_plugin/tests/functional/op_reference/experimental_detectron_detection_output.cpp +++ b/docs/template_plugin/tests/functional/op_reference/experimental_detectron_detection_output.cpp @@ -46,13 +46,13 @@ struct ExperimentalDOParams { PartialShape imageSizeInfoShape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor roisData; - ov::runtime::Tensor deltasData; - ov::runtime::Tensor scoresData; - ov::runtime::Tensor imageSizeInfoData; - ov::runtime::Tensor refBoxesData; - ov::runtime::Tensor refClassesData; - ov::runtime::Tensor refScoresData; + ov::Tensor roisData; + ov::Tensor deltasData; + ov::Tensor scoresData; + ov::Tensor imageSizeInfoData; + ov::Tensor refBoxesData; + ov::Tensor refClassesData; + ov::Tensor refScoresData; std::string testcaseName; }; diff --git a/docs/template_plugin/tests/functional/op_reference/experimental_detectron_detection_prior_grid.cpp b/docs/template_plugin/tests/functional/op_reference/experimental_detectron_detection_prior_grid.cpp index 7b8b94028fd..aa8cd4a5eea 100644 --- a/docs/template_plugin/tests/functional/op_reference/experimental_detectron_detection_prior_grid.cpp +++ b/docs/template_plugin/tests/functional/op_reference/experimental_detectron_detection_prior_grid.cpp @@ -56,10 +56,10 @@ struct ExperimentalPGGParams { size_t actualComparisonSize; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor priorsData; - ov::runtime::Tensor featureMapData; - ov::runtime::Tensor imageSizeInfoData; - ov::runtime::Tensor refData; + ov::Tensor priorsData; + ov::Tensor featureMapData; + ov::Tensor imageSizeInfoData; + ov::Tensor refData; std::string testcaseName; }; diff --git a/docs/template_plugin/tests/functional/op_reference/experimental_detectron_generate_proposals.cpp b/docs/template_plugin/tests/functional/op_reference/experimental_detectron_generate_proposals.cpp index 6d12b66eaaa..d0978873e7b 100644 --- a/docs/template_plugin/tests/functional/op_reference/experimental_detectron_generate_proposals.cpp +++ b/docs/template_plugin/tests/functional/op_reference/experimental_detectron_generate_proposals.cpp @@ -45,12 +45,12 @@ struct ExperimentalGPParams { PartialShape scoresShape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor imageSizeInfoData; - ov::runtime::Tensor anchorsData; - ov::runtime::Tensor deltasData; - ov::runtime::Tensor scoresData; - ov::runtime::Tensor refRoisData; - ov::runtime::Tensor refScoresData; + ov::Tensor imageSizeInfoData; + ov::Tensor anchorsData; + ov::Tensor deltasData; + ov::Tensor scoresData; + ov::Tensor refRoisData; + ov::Tensor refScoresData; std::string testcaseName; }; diff --git a/docs/template_plugin/tests/functional/op_reference/experimental_detectron_roi_feature_extractor.cpp b/docs/template_plugin/tests/functional/op_reference/experimental_detectron_roi_feature_extractor.cpp index 57909d419df..2d354a62db1 100644 --- a/docs/template_plugin/tests/functional/op_reference/experimental_detectron_roi_feature_extractor.cpp +++ b/docs/template_plugin/tests/functional/op_reference/experimental_detectron_roi_feature_extractor.cpp @@ -11,15 +11,15 @@ using namespace ov; using namespace reference_tests; struct ExperimentalROIParams { - ExperimentalROIParams(const std::vector& experimental_detectron_roi_feature_inputs, - const std::vector& expected_results, + ExperimentalROIParams(const std::vector& experimental_detectron_roi_feature_inputs, + const std::vector& expected_results, const std::string& test_case_name) : inputs{experimental_detectron_roi_feature_inputs}, expected_results{expected_results}, test_case_name{test_case_name} {} - std::vector inputs; - std::vector expected_results; + std::vector inputs; + std::vector expected_results; std::string test_case_name; }; @@ -44,7 +44,7 @@ public: } private: - std::shared_ptr create_function(const std::vector& inputs) { + std::shared_ptr create_function(const std::vector& inputs) { op::v6::ExperimentalDetectronROIFeatureExtractor::Attributes attrs; attrs.aligned = false; attrs.output_size = 3; @@ -76,13 +76,13 @@ INSTANTIATE_TEST_SUITE_P( ReferenceExperimentalROILayerTest, ::testing::Values( ExperimentalROIParams( - std::vector{Tensor(Shape{2, 4}, + std::vector{reference_tests::Tensor(Shape{2, 4}, ov::element::f32, std::vector{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0}), - Tensor(Shape{1, 2, 2, 3}, + reference_tests::Tensor(Shape{1, 2, 2, 3}, ov::element::f32, std::vector{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0})}, - std::vector{Tensor(Shape{2, 2, 3, 3}, + std::vector{reference_tests::Tensor(Shape{2, 2, 3, 3}, ov::element::f32, std::vector{1.416667, 1.75, @@ -120,18 +120,18 @@ INSTANTIATE_TEST_SUITE_P( 5.083333, 5.25, 5.416667}), - Tensor(Shape{2, 4}, + reference_tests::Tensor(Shape{2, 4}, ov::element::f32, std::vector{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0})}, "experimental_detectron_roi_feature_eval_f32"), ExperimentalROIParams( - std::vector{Tensor(Shape{2, 4}, + std::vector{reference_tests::Tensor(Shape{2, 4}, ov::element::f16, std::vector{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0}), - Tensor(Shape{1, 2, 2, 3}, + reference_tests::Tensor(Shape{1, 2, 2, 3}, ov::element::f16, std::vector{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0})}, - std::vector{Tensor(Shape{2, 2, 3, 3}, + std::vector{reference_tests::Tensor(Shape{2, 2, 3, 3}, ov::element::f16, std::vector{1.416667, 1.75, @@ -169,18 +169,18 @@ INSTANTIATE_TEST_SUITE_P( 5.083333, 5.25, 5.416667}), - Tensor(Shape{2, 4}, + reference_tests::Tensor(Shape{2, 4}, ov::element::f16, std::vector{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0})}, "experimental_detectron_roi_feature_eval_f16"), ExperimentalROIParams( - std::vector{Tensor(Shape{2, 4}, + std::vector{reference_tests::Tensor(Shape{2, 4}, ov::element::bf16, std::vector{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0}), - Tensor(Shape{1, 2, 2, 3}, + reference_tests::Tensor(Shape{1, 2, 2, 3}, ov::element::bf16, std::vector{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0})}, - std::vector{Tensor(Shape{2, 2, 3, 3}, + std::vector{reference_tests::Tensor(Shape{2, 2, 3, 3}, ov::element::bf16, std::vector{1.416667, 1.75, @@ -218,7 +218,7 @@ INSTANTIATE_TEST_SUITE_P( 5.083333, 5.25, 5.416667}), - Tensor(Shape{2, 4}, + reference_tests::Tensor(Shape{2, 4}, ov::element::bf16, std::vector{0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0})}, "experimental_detectron_roi_feature_eval_bf16"))); diff --git a/docs/template_plugin/tests/functional/op_reference/experimental_detectron_topkrois.cpp b/docs/template_plugin/tests/functional/op_reference/experimental_detectron_topkrois.cpp index d5cf6742df0..f4901fb9d0c 100644 --- a/docs/template_plugin/tests/functional/op_reference/experimental_detectron_topkrois.cpp +++ b/docs/template_plugin/tests/functional/op_reference/experimental_detectron_topkrois.cpp @@ -13,15 +13,15 @@ using namespace ov; namespace { struct ExperimentalDetectronTopKROIsParams { ExperimentalDetectronTopKROIsParams( - const Tensor& dataTensor, const Tensor& probsTensor, const int32_t numRois, - const Tensor& expectedTensor, const std::string& testcaseName = "") : + const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& probsTensor, const int32_t numRois, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dataTensor(dataTensor), probsTensor(probsTensor), numRois(numRois), expectedTensor(expectedTensor), testcaseName(testcaseName) {} - Tensor dataTensor; - Tensor probsTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor probsTensor; int32_t numRois; - Tensor expectedTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -72,17 +72,17 @@ std::vector generateParams() { using T = typename element_type_traits::value_type; std::vector params { ExperimentalDetectronTopKROIsParams( - Tensor(ET, {2, 4}, std::vector{1.0f, 1.0f, 3.0f, 4.0f, 2.0f, 1.0f, 5.0f, 7.0f}), - Tensor(ET, {2}, std::vector{0.5f, 0.3f}), + reference_tests::Tensor(ET, {2, 4}, std::vector{1.0f, 1.0f, 3.0f, 4.0f, 2.0f, 1.0f, 5.0f, 7.0f}), + reference_tests::Tensor(ET, {2}, std::vector{0.5f, 0.3f}), 1, - Tensor(ET, {1, 4}, std::vector{1.0, 1.0, 3.0, 4.0}), + reference_tests::Tensor(ET, {1, 4}, std::vector{1.0, 1.0, 3.0, 4.0}), "experimental_detectron_topk_rois_eval"), ExperimentalDetectronTopKROIsParams( - Tensor(ET, {4, 4}, std::vector{1.0f, 1.0f, 4.0f, 5.0f, 3.0f, 2.0f, 7.0f, 9.0f, + reference_tests::Tensor(ET, {4, 4}, std::vector{1.0f, 1.0f, 4.0f, 5.0f, 3.0f, 2.0f, 7.0f, 9.0f, 10.0f, 15.0f, 13.0f, 17.0f, 13.0f, 10.0f, 18.0f, 15.0f}), - Tensor(ET, {4}, std::vector{0.1f, 0.7f, 0.5f, 0.9f}), + reference_tests::Tensor(ET, {4}, std::vector{0.1f, 0.7f, 0.5f, 0.9f}), 2, - Tensor(ET, {2, 4}, std::vector{13.0f, 10.0f, 18.0f, 15.0f, 3.0f, 2.0f, 7.0f, 9.0f}), + reference_tests::Tensor(ET, {2, 4}, std::vector{13.0f, 10.0f, 18.0f, 15.0f, 3.0f, 2.0f, 7.0f, 9.0f}), "experimental_detectron_topk_rois_eval"), }; return params; diff --git a/docs/template_plugin/tests/functional/op_reference/extract_image_patches.cpp b/docs/template_plugin/tests/functional/op_reference/extract_image_patches.cpp index 85fd640d408..12468352ea2 100644 --- a/docs/template_plugin/tests/functional/op_reference/extract_image_patches.cpp +++ b/docs/template_plugin/tests/functional/op_reference/extract_image_patches.cpp @@ -13,12 +13,12 @@ using namespace ov; namespace { struct ExtractImagePatchesParams { - Tensor data; + reference_tests::Tensor data; Shape sizes; Strides strides; Shape rates; op::PadType autoPad; - Tensor expectedResult; + reference_tests::Tensor expectedResult; std::string testcaseName; }; diff --git a/docs/template_plugin/tests/functional/op_reference/fake_quantize.cpp b/docs/template_plugin/tests/functional/op_reference/fake_quantize.cpp index f11c6b674e1..86bdc6e4c33 100644 --- a/docs/template_plugin/tests/functional/op_reference/fake_quantize.cpp +++ b/docs/template_plugin/tests/functional/op_reference/fake_quantize.cpp @@ -44,8 +44,8 @@ struct FakeQuantizeParams { Shape m_expected_shape; element::Type m_input_type; element::Type m_expected_type; - runtime::Tensor m_input_data; - runtime::Tensor m_expected_data; + ov::Tensor m_input_data; + ov::Tensor m_expected_data; std::shared_ptr m_input_low; std::shared_ptr m_input_high; std::shared_ptr m_output_low; diff --git a/docs/template_plugin/tests/functional/op_reference/floor.cpp b/docs/template_plugin/tests/functional/op_reference/floor.cpp index 989b39df8f5..a021d47beb0 100644 --- a/docs/template_plugin/tests/functional/op_reference/floor.cpp +++ b/docs/template_plugin/tests/functional/op_reference/floor.cpp @@ -26,8 +26,8 @@ struct FloorParams { PartialShape pshape; element::Type inType; element::Type outType; - runtime::Tensor inputData; - runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceFloorLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/floor_mod.cpp b/docs/template_plugin/tests/functional/op_reference/floor_mod.cpp index eb2f2dfd1c7..1c2dd2ca81f 100644 --- a/docs/template_plugin/tests/functional/op_reference/floor_mod.cpp +++ b/docs/template_plugin/tests/functional/op_reference/floor_mod.cpp @@ -31,9 +31,9 @@ struct FloorModParams { PartialShape pshape2; element::Type inType; element::Type outType; - runtime::Tensor inputData1; - runtime::Tensor inputData2; - runtime::Tensor refData; + ov::Tensor inputData1; + ov::Tensor inputData2; + ov::Tensor refData; }; class ReferenceFloorModLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/gather.cpp b/docs/template_plugin/tests/functional/op_reference/gather.cpp index fc76b054cd0..a8ad2895e75 100644 --- a/docs/template_plugin/tests/functional/op_reference/gather.cpp +++ b/docs/template_plugin/tests/functional/op_reference/gather.cpp @@ -15,15 +15,15 @@ using namespace ov; namespace { struct GatherParams { GatherParams( - const Tensor& dataTensor, const Tensor& indicesTensor, const Tensor& axisTensor, - const Tensor& expectedTensor, const std::string& testcaseName = "") : + const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& indicesTensor, const reference_tests::Tensor& axisTensor, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dataTensor(dataTensor), indicesTensor(indicesTensor), axisTensor(axisTensor), expectedTensor(expectedTensor), testcaseName(testcaseName) {} - Tensor dataTensor; - Tensor indicesTensor; - Tensor axisTensor; - Tensor expectedTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor indicesTensor; + reference_tests::Tensor axisTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -73,16 +73,16 @@ TEST_P(ReferenceGatherTest, CompareWithRefs) { struct GatherParamsV7 { GatherParamsV7( - const Tensor& dataTensor, const Tensor& indicesTensor, const Tensor& axisTensor, int64_t batchDims, - const Tensor& expectedTensor, const std::string& testcaseName = "") : + const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& indicesTensor, const reference_tests::Tensor& axisTensor, int64_t batchDims, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dataTensor(dataTensor), indicesTensor(indicesTensor), axisTensor(axisTensor), batchDims(batchDims), expectedTensor(expectedTensor), testcaseName(testcaseName) {} - Tensor dataTensor; - Tensor indicesTensor; - Tensor axisTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor indicesTensor; + reference_tests::Tensor axisTensor; int64_t batchDims; - Tensor expectedTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -155,25 +155,25 @@ std::vector generateParams() { using T_A = typename element_type_traits::value_type; std::vector params { GatherParams( - Tensor(ET, {3, 2}, std::vector{ + reference_tests::Tensor(ET, {3, 2}, std::vector{ 10, 11, 20, 21, 30, 31}), - Tensor(ET_I, {2, 2, 3, 4}, std::vector{ + reference_tests::Tensor(ET_I, {2, 2, 3, 4}, std::vector{ 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}), - Tensor(ET_A, {}, std::vector{0}), - Tensor(ET, {2, 2, 3, 4, 2}, std::vector{ + reference_tests::Tensor(ET_A, {}, std::vector{0}), + reference_tests::Tensor(ET, {2, 2, 3, 4, 2}, std::vector{ 10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31, 10, 11, 20, 21, 20, 21, 30, 31}), "gather_4d_indices_axis_0"), GatherParams( - Tensor(ET, {3, 2}, std::vector{ + reference_tests::Tensor(ET, {3, 2}, std::vector{ 10, 11, 20, 21, 30, 31}), - Tensor(ET_I, {2, 2}, std::vector{ + reference_tests::Tensor(ET_I, {2, 2}, std::vector{ 0, 1, 1, 2}), - Tensor(ET_A, {}, std::vector{0}), - Tensor(ET, {2, 2, 2}, std::vector{ + reference_tests::Tensor(ET_A, {}, std::vector{0}), + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{ 10, 11, 20, 21, 20, 21, 30, 31}), "gather_axis_0"), }; @@ -187,11 +187,11 @@ std::vector generateParamsFloatValue() { using T_A = typename element_type_traits::value_type; std::vector params { GatherParams( - Tensor(ET, {3, 2}, std::vector{ + reference_tests::Tensor(ET, {3, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, 3.0f, 3.1f}), - Tensor(ET_I, {2, 2, 3, 4}, std::vector{ + reference_tests::Tensor(ET_I, {2, 2, 3, 4}, std::vector{ 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, @@ -208,8 +208,8 @@ std::vector generateParamsFloatValue() { 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2}), - Tensor(ET_A, {}, std::vector{0}), - Tensor(ET, {2, 2, 3, 4, 2}, std::vector{ + reference_tests::Tensor(ET_A, {}, std::vector{0}), + reference_tests::Tensor(ET, {2, 2, 3, 4, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, 2.0f, 2.1f, @@ -276,11 +276,11 @@ std::vector generateParamsFloatValue() { 3.0f, 3.1f}), "gather_4d_indices_axis_0_2d_input"), GatherParams( - Tensor(ET, {3, 2}, std::vector{ + reference_tests::Tensor(ET, {3, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, 3.0f, 3.1f}), - Tensor(ET_I, {2, 3, 4}, std::vector{ + reference_tests::Tensor(ET_I, {2, 3, 4}, std::vector{ 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, @@ -288,8 +288,8 @@ std::vector generateParamsFloatValue() { 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2}), - Tensor(ET_A, {}, std::vector{0}), - Tensor(ET, {2, 3, 4, 2}, std::vector{ + reference_tests::Tensor(ET_A, {}, std::vector{0}), + reference_tests::Tensor(ET, {2, 3, 4, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, 2.0f, 2.1f, @@ -322,14 +322,14 @@ std::vector generateParamsFloatValue() { 3.0f, 3.1f}), "gather_3d_indices_axis_0_2d_input"), GatherParams( - Tensor(ET, {3, 2}, std::vector{ + reference_tests::Tensor(ET, {3, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, 3.0f, 3.1f}), - Tensor(ET_I, {2, 2}, std::vector{ + reference_tests::Tensor(ET_I, {2, 2}, std::vector{ 0, 1, 1, 2}), - Tensor(ET_A, {}, std::vector{0}), - Tensor(ET, {2, 2, 2}, std::vector{ + reference_tests::Tensor(ET_A, {}, std::vector{0}), + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, @@ -337,14 +337,14 @@ std::vector generateParamsFloatValue() { 3.0f, 3.1f}), "gather_2d_indices_axis_0_2d_input"), GatherParams( - Tensor(ET, {3, 2}, std::vector{ + reference_tests::Tensor(ET, {3, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, 3.0f, 3.1f}), - Tensor(ET_I, {2, 2}, std::vector{ + reference_tests::Tensor(ET_I, {2, 2}, std::vector{ 0, -2, 1, 2}), - Tensor(ET_A, {}, std::vector{0}), - Tensor(ET, {2, 2, 2}, std::vector{ + reference_tests::Tensor(ET_A, {}, std::vector{0}), + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, @@ -352,37 +352,37 @@ std::vector generateParamsFloatValue() { 3.0f, 3.1f}), "gather_2d_negative_and_positive_indices_axis_0_2d_input"), GatherParams( - Tensor(ET, {3}, std::vector{ + reference_tests::Tensor(ET, {3}, std::vector{ 1.0f, 2.0f, 3.0f}), - Tensor(ET_I, {2}, std::vector{ + reference_tests::Tensor(ET_I, {2}, std::vector{ 1, 0}), - Tensor(ET_A, {}, std::vector{0}), - Tensor(ET, {2}, std::vector{ + reference_tests::Tensor(ET_A, {}, std::vector{0}), + reference_tests::Tensor(ET, {2}, std::vector{ 2.0f, 1.0f}), "gather_1d_indices_axis_0_1d_input"), GatherParams( - Tensor(ET, {3, 2}, std::vector{ + reference_tests::Tensor(ET, {3, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, 3.0f, 3.1f}), - Tensor(ET_I, {}, std::vector{1}), - Tensor(ET_A, {}, std::vector{0}), - Tensor(ET, {2}, std::vector{ + reference_tests::Tensor(ET_I, {}, std::vector{1}), + reference_tests::Tensor(ET_A, {}, std::vector{0}), + reference_tests::Tensor(ET, {2}, std::vector{ 2.0f, 2.1f}), "gather_scalar_indices_axis_0_2d_input"), GatherParams( - Tensor(ET, {3, 3}, std::vector{ + reference_tests::Tensor(ET, {3, 3}, std::vector{ 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f, 3.0f, 3.1f, 3.2f}), - Tensor(ET_I, {1, 2}, std::vector{ + reference_tests::Tensor(ET_I, {1, 2}, std::vector{ 0, 2}), - Tensor(ET_A, {}, std::vector{1}), - Tensor(ET, {3, 1, 2}, std::vector{ + reference_tests::Tensor(ET_A, {}, std::vector{1}), + reference_tests::Tensor(ET, {3, 1, 2}, std::vector{ 1.0f, 1.2f, 2.0f, 2.2f, 3.0f, 3.2f}), "gather_2d_indices_axis_1_2d_input"), GatherParams( - Tensor(ET, {2, 2, 3, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 2, 3, 3}, std::vector{ 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f, 3.0f, 3.1f, 3.2f, @@ -399,10 +399,10 @@ std::vector generateParamsFloatValue() { 111.0f, 111.1f, 111.2f, 112.0f, 112.1f, 112.2f, 113.0f, 113.1f, 113.2f}), - Tensor(ET_I, {2}, std::vector{ + reference_tests::Tensor(ET_I, {2}, std::vector{ 0, 2}), - Tensor(ET_A, {}, std::vector{2}), - Tensor(ET, {2, 2, 2, 3}, std::vector{ + reference_tests::Tensor(ET_A, {}, std::vector{2}), + reference_tests::Tensor(ET, {2, 2, 2, 3}, std::vector{ 1.0f, 1.1f, 1.2f, 3.0f, 3.1f, 3.2f, @@ -417,11 +417,11 @@ std::vector generateParamsFloatValue() { 113.0f, 113.1f, 113.2f}), "gather_1d_indices_axis_2_4d_input"), GatherParams( - Tensor(ET, {3, 3}, std::vector{ + reference_tests::Tensor(ET, {3, 3}, std::vector{ 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f, 3.0f, 3.1f, 3.2f}), - Tensor(ET_I, {}, std::vector{0}), - Tensor(ET_A, {}, std::vector{1}), - Tensor(ET, {3}, std::vector{ + reference_tests::Tensor(ET_I, {}, std::vector{0}), + reference_tests::Tensor(ET_A, {}, std::vector{1}), + reference_tests::Tensor(ET, {3}, std::vector{ 1.0f, 2.0f, 3.0f}), "gather_scalar_indices_axis_1_2d_input"), }; @@ -461,38 +461,38 @@ std::vector generateParamsV7() { using T_A = typename element_type_traits::value_type; std::vector params { GatherParamsV7( - Tensor(ET, {3}, std::vector{ + reference_tests::Tensor(ET, {3}, std::vector{ 1, 2, 3}), - Tensor(ET_I, {2}, std::vector{ + reference_tests::Tensor(ET_I, {2}, std::vector{ 2, 0}), - Tensor(ET_A, {}, std::vector{0}), + reference_tests::Tensor(ET_A, {}, std::vector{0}), 0, - Tensor(ET, {2}, std::vector{ + reference_tests::Tensor(ET, {2}, std::vector{ 3, 1}), "gather_v7_1d"), GatherParamsV7( - Tensor(ET, {3, 2}, std::vector{ + reference_tests::Tensor(ET, {3, 2}, std::vector{ 10, 11, 20, 21, 30, 31}), - Tensor(ET_I, {2, 2}, std::vector{ + reference_tests::Tensor(ET_I, {2, 2}, std::vector{ 0, 1, 1, 2}), - Tensor(ET_A, {}, std::vector{0}), + reference_tests::Tensor(ET_A, {}, std::vector{0}), 0, - Tensor(ET, {2, 2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{ 10, 11, 20, 21, 20, 21, 30, 31}), "gather_v7_axis_0"), GatherParamsV7( - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 1, 2, 3, 4, 5, 6}), - Tensor(ET_I, {2, 2, 2}, std::vector{ + reference_tests::Tensor(ET_I, {2, 2, 2}, std::vector{ 0, 1, 1, 2, 2, 0, 1, 2}), - Tensor(ET_A, {}, std::vector{1}), + reference_tests::Tensor(ET_A, {}, std::vector{1}), 1, - Tensor(ET, {2, 2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{ 1, 2, 2, 3, @@ -500,33 +500,33 @@ std::vector generateParamsV7() { 5, 6}), "gather_v7_data_int32_3d_indices_axis_1_batch_dims_1"), GatherParamsV7( - Tensor(ET, {2, 5}, std::vector{ + reference_tests::Tensor(ET, {2, 5}, std::vector{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}), - Tensor(ET_I, {2, 3}, std::vector{ + reference_tests::Tensor(ET_I, {2, 3}, std::vector{ 0, 0, 4, 4, 0, 0}), - Tensor(ET_A, {}, std::vector{1}), + reference_tests::Tensor(ET_A, {}, std::vector{1}), 1, - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 1, 1, 5, 10, 6, 6}), "gather_v7_data_int32_2d_indices_axis_1_batch_dims_1"), GatherParamsV7( - Tensor(ET, {2, 5}, std::vector{ + reference_tests::Tensor(ET, {2, 5}, std::vector{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}), - Tensor(ET_I, {2, 3}, std::vector{ + reference_tests::Tensor(ET_I, {2, 3}, std::vector{ 0, 0, 4, 4, 0, 0}), - Tensor(ET_A, {}, std::vector{1}), + reference_tests::Tensor(ET_A, {}, std::vector{1}), -1, - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 1, 1, 5, 10, 6, 6}), "gather_v7_data_int32_2d_indices_axis_1_negative_batch_dims"), GatherParamsV7( - Tensor(ET, {2, 1, 5, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 1, 5, 4}, std::vector{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, @@ -538,12 +538,12 @@ std::vector generateParamsV7() { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40}), - Tensor(ET_I, {2, 3}, std::vector{ + reference_tests::Tensor(ET_I, {2, 3}, std::vector{ 1, 2, 4, 4, 3, 2}), - Tensor(ET_A, {}, std::vector{2}), + reference_tests::Tensor(ET_A, {}, std::vector{2}), 1, - Tensor(ET, {2, 1, 3, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 1, 3, 4}, std::vector{ 5, 6, 7, 8, 9, 10, 11, 12, 17, 18, 19, 20, @@ -560,13 +560,13 @@ template <> std::vector generateParamsV7() { std::vector params { GatherParamsV7( - Tensor(element::boolean, {3, 2}, std::vector{ + reference_tests::Tensor(element::boolean, {3, 2}, std::vector{ 1, 1, 1, 0, 0, 1}), - Tensor(element::i32, {2, 2}, std::vector{ + reference_tests::Tensor(element::i32, {2, 2}, std::vector{ 0, 1, 1, 2}), - Tensor(element::i64, {}, std::vector{0}), + reference_tests::Tensor(element::i64, {}, std::vector{0}), 0, - Tensor(element::boolean, {2, 2, 2}, std::vector{ + reference_tests::Tensor(element::boolean, {2, 2, 2}, std::vector{ 1, 1, 1, 0, 1, 0, 0, 1}), "gather_v7_axis_0_bool"), }; @@ -580,11 +580,11 @@ std::vector generateParamsFloatValueV7() { using T_A = typename element_type_traits::value_type; std::vector params { GatherParamsV7( - Tensor(ET, {3, 2}, std::vector{ + reference_tests::Tensor(ET, {3, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, 3.0f, 3.1f}), - Tensor(ET_I, {2, 2, 3, 4}, std::vector{ + reference_tests::Tensor(ET_I, {2, 2, 3, 4}, std::vector{ 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, @@ -601,9 +601,9 @@ std::vector generateParamsFloatValueV7() { 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2}), - Tensor(ET_A, {}, std::vector{0}), + reference_tests::Tensor(ET_A, {}, std::vector{0}), 0, - Tensor(ET, {2, 2, 3, 4, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2, 3, 4, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, 2.0f, 2.1f, @@ -670,11 +670,11 @@ std::vector generateParamsFloatValueV7() { 3.0f, 3.1f}), "gather_v7_4d_indices_axis_0_2d_input"), GatherParamsV7( - Tensor(ET, {3, 2}, std::vector{ + reference_tests::Tensor(ET, {3, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, 3.0f, 3.1f}), - Tensor(ET_I, {2, 3, 4}, std::vector{ + reference_tests::Tensor(ET_I, {2, 3, 4}, std::vector{ 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, @@ -682,9 +682,9 @@ std::vector generateParamsFloatValueV7() { 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2}), - Tensor(ET_A, {}, std::vector{0}), + reference_tests::Tensor(ET_A, {}, std::vector{0}), 0, - Tensor(ET, {2, 3, 4, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 4, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, 2.0f, 2.1f, @@ -717,15 +717,15 @@ std::vector generateParamsFloatValueV7() { 3.0f, 3.1f}), "gather_v7_3d_indices_axis_0_2d_input"), GatherParamsV7( - Tensor(ET, {3, 2}, std::vector{ + reference_tests::Tensor(ET, {3, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, 3.0f, 3.1f}), - Tensor(ET_I, {2, 2}, std::vector{ + reference_tests::Tensor(ET_I, {2, 2}, std::vector{ 0, 1, 1, 2}), - Tensor(ET_A, {}, std::vector{0}), + reference_tests::Tensor(ET_A, {}, std::vector{0}), 0, - Tensor(ET, {2, 2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, @@ -733,15 +733,15 @@ std::vector generateParamsFloatValueV7() { 3.0f, 3.1f}), "gather_v7_2d_indices_axis_0_2d_input"), GatherParamsV7( - Tensor(ET, {3, 2}, std::vector{ + reference_tests::Tensor(ET, {3, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, 3.0f, 3.1f}), - Tensor(ET_I, {2, 2}, std::vector{ + reference_tests::Tensor(ET_I, {2, 2}, std::vector{ 0, -2, 1, 2}), - Tensor(ET_A, {}, std::vector{0}), + reference_tests::Tensor(ET_A, {}, std::vector{0}), 0, - Tensor(ET, {2, 2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, @@ -749,40 +749,40 @@ std::vector generateParamsFloatValueV7() { 3.0f, 3.1f}), "gather_v7_2d_negative_and_positive_indices_axis_0_2d_input"), GatherParamsV7( - Tensor(ET, {3}, std::vector{ + reference_tests::Tensor(ET, {3}, std::vector{ 1.0f, 2.0f, 3.0f}), - Tensor(ET_I, {2}, std::vector{ + reference_tests::Tensor(ET_I, {2}, std::vector{ 1, 0}), - Tensor(ET_A, {}, std::vector{0}), + reference_tests::Tensor(ET_A, {}, std::vector{0}), 0, - Tensor(ET, {2}, std::vector{ + reference_tests::Tensor(ET, {2}, std::vector{ 2.0f, 1.0f}), "gather_v7_1d_indices_axis_0_1d_input"), GatherParamsV7( - Tensor(ET, {3, 2}, std::vector{ + reference_tests::Tensor(ET, {3, 2}, std::vector{ 1.0f, 1.1f, 2.0f, 2.1f, 3.0f, 3.1f}), - Tensor(ET_I, {}, std::vector{1}), - Tensor(ET_A, {}, std::vector{0}), + reference_tests::Tensor(ET_I, {}, std::vector{1}), + reference_tests::Tensor(ET_A, {}, std::vector{0}), 0, - Tensor(ET, {2}, std::vector{ + reference_tests::Tensor(ET, {2}, std::vector{ 2.0f, 2.1f}), "gather_v7_scalar_indices_axis_0_2d_input"), GatherParamsV7( - Tensor(ET, {3, 3}, std::vector{ + reference_tests::Tensor(ET, {3, 3}, std::vector{ 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f, 3.0f, 3.1f, 3.2f}), - Tensor(ET_I, {1, 2}, std::vector{ + reference_tests::Tensor(ET_I, {1, 2}, std::vector{ 0, 2}), - Tensor(ET_A, {}, std::vector{1}), + reference_tests::Tensor(ET_A, {}, std::vector{1}), 0, - Tensor(ET, {3, 1, 2}, std::vector{ + reference_tests::Tensor(ET, {3, 1, 2}, std::vector{ 1.0f, 1.2f, 2.0f, 2.2f, 3.0f, 3.2f}), "gather_v7_2d_indices_axis_1_2d_input"), GatherParamsV7( - Tensor(ET, {2, 2, 3, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 2, 3, 3}, std::vector{ 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f, 3.0f, 3.1f, 3.2f, @@ -799,11 +799,11 @@ std::vector generateParamsFloatValueV7() { 111.0f, 111.1f, 111.2f, 112.0f, 112.1f, 112.2f, 113.0f, 113.1f, 113.2f}), - Tensor(ET_I, {2}, std::vector{ + reference_tests::Tensor(ET_I, {2}, std::vector{ 0, 2}), - Tensor(ET_A, {}, std::vector{2}), + reference_tests::Tensor(ET_A, {}, std::vector{2}), 0, - Tensor(ET, {2, 2, 2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 2, 2, 3}, std::vector{ 1.0f, 1.1f, 1.2f, 3.0f, 3.1f, 3.2f, @@ -818,16 +818,16 @@ std::vector generateParamsFloatValueV7() { 113.0f, 113.1f, 113.2f}), "gather_v7_1d_indices_axis_2_4d_input"), GatherParamsV7( - Tensor(ET, {3, 3}, std::vector{ + reference_tests::Tensor(ET, {3, 3}, std::vector{ 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f, 3.0f, 3.1f, 3.2f}), - Tensor(ET_I, {}, std::vector{0}), - Tensor(ET_A, {}, std::vector{1}), + reference_tests::Tensor(ET_I, {}, std::vector{0}), + reference_tests::Tensor(ET_A, {}, std::vector{1}), 0, - Tensor(ET, {3}, std::vector{ + reference_tests::Tensor(ET, {3}, std::vector{ 1.0f, 2.0f, 3.0f}), "gather_v7_scalar_indices_axis_1_2d_input"), GatherParamsV7( - Tensor(ET, {2, 5, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 5, 2}, std::vector{ 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, @@ -839,15 +839,15 @@ std::vector generateParamsFloatValueV7() { 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f}), - Tensor(ET_I, {2, 2, 3}, std::vector{ + reference_tests::Tensor(ET_I, {2, 2, 3}, std::vector{ 0, 0, 4, 4, 0, 0, 1, 2, 4, 4, 3, 2}), - Tensor(ET_A, {}, std::vector{1}), + reference_tests::Tensor(ET_A, {}, std::vector{1}), 1, - Tensor(ET, {2, 2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2, 3, 2}, std::vector{ 1.0f, 2.0f, 1.0f, 2.0f, 9.0f, 10.0f, @@ -903,13 +903,13 @@ std::vector generateParamsV8() { using T_A = typename element_type_traits::value_type; std::vector params { GatherParamsV7( - Tensor(ET, {5}, std::vector{ + reference_tests::Tensor(ET, {5}, std::vector{ 1, 2, 3, 4, 5}), - Tensor(ET_I, {3}, std::vector{ + reference_tests::Tensor(ET_I, {3}, std::vector{ 0, -2, -1}), - Tensor(ET_A, {}, std::vector{0}), + reference_tests::Tensor(ET_A, {}, std::vector{0}), 0, - Tensor(ET, {3}, std::vector{ + reference_tests::Tensor(ET, {3}, std::vector{ 1, 4, 5}), "gather_v8_1d_negative_indices"), }; diff --git a/docs/template_plugin/tests/functional/op_reference/gather_elements.cpp b/docs/template_plugin/tests/functional/op_reference/gather_elements.cpp index 4440833c2d2..755f7cf8421 100644 --- a/docs/template_plugin/tests/functional/op_reference/gather_elements.cpp +++ b/docs/template_plugin/tests/functional/op_reference/gather_elements.cpp @@ -13,15 +13,15 @@ using namespace ov; namespace { struct GatherElementsParams { GatherElementsParams( - const Tensor& dataTensor, const Tensor& indicesTensor, int64_t axis, - const Tensor& expectedTensor, const std::string& testcaseName = "") : + const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& indicesTensor, int64_t axis, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dataTensor(dataTensor), indicesTensor(indicesTensor), axis(axis), expectedTensor(expectedTensor), testcaseName(testcaseName) {} - Tensor dataTensor; - Tensor indicesTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor indicesTensor; int64_t axis; - Tensor expectedTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -87,53 +87,53 @@ std::vector generateParams() { using T = typename element_type_traits::value_type; std::vector params { GatherElementsParams( - Tensor(IN_ET, {3}, std::vector{1, 2, 3}), - Tensor(element::i32, {7}, std::vector{1, 2, 0, 2, 0, 0, 2}), + reference_tests::Tensor(IN_ET, {3}, std::vector{1, 2, 3}), + reference_tests::Tensor(element::i32, {7}, std::vector{1, 2, 0, 2, 0, 0, 2}), 0, - Tensor(IN_ET, {7}, std::vector{2, 3, 1, 3, 1, 1, 3}), + reference_tests::Tensor(IN_ET, {7}, std::vector{2, 3, 1, 3, 1, 1, 3}), "evaluate_1D_gather_elements_3_indices_int32"), GatherElementsParams( - Tensor(IN_ET, {2, 2}, std::vector{1, 2, 3, 4}), - Tensor(element::i32, {2, 2}, std::vector{0, 1, 0, 0}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{1, 2, 3, 4}), + reference_tests::Tensor(element::i32, {2, 2}, std::vector{0, 1, 0, 0}), 0, - Tensor(IN_ET, {2, 2}, std::vector{1, 4, 1, 2}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{1, 4, 1, 2}), "evaluate_2D_gather_elements_2x2_indices_int32_axis_0"), GatherElementsParams( - Tensor(IN_ET, {2, 2}, std::vector{1, 2, 3, 4}), - Tensor(element::i32, {2, 2}, std::vector{0, 1, 0, 0}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{1, 2, 3, 4}), + reference_tests::Tensor(element::i32, {2, 2}, std::vector{0, 1, 0, 0}), 1, - Tensor(IN_ET, {2, 2}, std::vector{1, 2, 3, 3}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{1, 2, 3, 3}), "evaluate_2D_gather_elements_2x2_indices_int32_axis_1"), GatherElementsParams( - Tensor(IN_ET, {2, 2}, std::vector{1, 2, 3, 4}), - Tensor(element::i32, {2, 2}, std::vector{0, 1, 0, 0}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{1, 2, 3, 4}), + reference_tests::Tensor(element::i32, {2, 2}, std::vector{0, 1, 0, 0}), -1, - Tensor(IN_ET, {2, 2}, std::vector{1, 2, 3, 3}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{1, 2, 3, 3}), "evaluate_2D_gather_elements_2x2_indices_int32_axis_minus_1"), GatherElementsParams( - Tensor(IN_ET, {3, 3}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9}), - Tensor(element::i32, {2, 3}, std::vector{1, 2, 0, 2, 0, 0}), + reference_tests::Tensor(IN_ET, {3, 3}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9}), + reference_tests::Tensor(element::i32, {2, 3}, std::vector{1, 2, 0, 2, 0, 0}), 0, - Tensor(IN_ET, {2, 3}, std::vector{4, 8, 3, 7, 2, 3}), + reference_tests::Tensor(IN_ET, {2, 3}, std::vector{4, 8, 3, 7, 2, 3}), "evaluate_2D_gather_elements_2x3_indices_int32"), GatherElementsParams( - Tensor(IN_ET, {3, 2, 2}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), - Tensor(element::i32, {3, 2, 2}, std::vector{1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1}), + reference_tests::Tensor(IN_ET, {3, 2, 2}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), + reference_tests::Tensor(element::i32, {3, 2, 2}, std::vector{1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1}), -1, - Tensor(IN_ET, {3, 2, 2}, std::vector{2, 1, 3, 4, 6, 6, 8, 7, 9, 9, 12, 12}), + reference_tests::Tensor(IN_ET, {3, 2, 2}, std::vector{2, 1, 3, 4, 6, 6, 8, 7, 9, 9, 12, 12}), "evaluate_3D_gather_elements_3x2x2_indices_int32"), GatherElementsParams( - Tensor(IN_ET, {3, 2, 2, 2}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, + reference_tests::Tensor(IN_ET, {3, 2, 2, 2}, std::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}), - Tensor(element::i32, {3, 2, 2, 4}, std::vector{1, 0, 0, 0, 0, 1, 1, 0, + reference_tests::Tensor(element::i32, {3, 2, 2, 4}, std::vector{1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0}), -1, - Tensor(IN_ET, {3, 2, 2, 4}, std::vector{2, 1, 1, 1, 3, 4, 4, 3, + reference_tests::Tensor(IN_ET, {3, 2, 2, 4}, std::vector{2, 1, 1, 1, 3, 4, 4, 3, 6, 6, 6, 6, 8, 7, 7, 8, 9, 9, 9, 10, 12, 12, 12, 11, 13, 13, 13, 13, 16, 15, 16, 15, @@ -141,22 +141,22 @@ std::vector generateParams() { 22, 21, 21, 22, 23, 23, 23, 23}), "evaluate_4D_gather_elements_3x2x2x2_indices_int64"), GatherElementsParams( - Tensor(IN_ET, {3, 2, 2}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), - Tensor(element::i32, {3, 2, 2}, std::vector{1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1}), + reference_tests::Tensor(IN_ET, {3, 2, 2}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), + reference_tests::Tensor(element::i32, {3, 2, 2}, std::vector{1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1}), -1, - Tensor(IN_ET, {3, 2, 2}, std::vector{2, 1, 3, 4, 6, 6, 8, 7, 9, 9, 12, 12}), + reference_tests::Tensor(IN_ET, {3, 2, 2}, std::vector{2, 1, 3, 4, 6, 6, 8, 7, 9, 9, 12, 12}), "evaluate_3D_gather_elements_3x2x2_indices_int64"), GatherElementsParams( - Tensor(IN_ET, {3, 3}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9}), - Tensor(element::i32, {2, 3}, std::vector{1, 2, 0, 2, 0, 0}), + reference_tests::Tensor(IN_ET, {3, 3}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9}), + reference_tests::Tensor(element::i32, {2, 3}, std::vector{1, 2, 0, 2, 0, 0}), 0, - Tensor(IN_ET, {2, 3}, std::vector{4, 8, 3, 7, 2, 3}), + reference_tests::Tensor(IN_ET, {2, 3}, std::vector{4, 8, 3, 7, 2, 3}), "evaluate_2D_gather_elements_2x3_data_float32"), GatherElementsParams( - Tensor(IN_ET, {2, 2, 1}, std::vector{5, 4, 1, 4}), - Tensor(element::i32, {4, 2, 1}, std::vector{0, 0, 1, 1, 1, 1, 0, 1}), + reference_tests::Tensor(IN_ET, {2, 2, 1}, std::vector{5, 4, 1, 4}), + reference_tests::Tensor(element::i32, {4, 2, 1}, std::vector{0, 0, 1, 1, 1, 1, 0, 1}), 0, - Tensor(IN_ET, {4, 2, 1}, std::vector{5, 4, 1, 4, 1, 4, 5, 4}), + reference_tests::Tensor(IN_ET, {4, 2, 1}, std::vector{5, 4, 1, 4, 1, 4, 5, 4}), "evaluate_2D_gather_elements_2x2x1_data_float32"), }; return params; @@ -166,10 +166,10 @@ template <> std::vector generateParams() { std::vector params { GatherElementsParams( - Tensor(element::boolean, {3, 2}, std::vector{true, false, true, true, false, false}), - Tensor(element::i32, {2, 2}, std::vector{0, 1, 0, 2}), + reference_tests::Tensor(element::boolean, {3, 2}, std::vector{true, false, true, true, false, false}), + reference_tests::Tensor(element::i32, {2, 2}, std::vector{0, 1, 0, 2}), 0, - Tensor(element::boolean, {2, 2}, std::vector{true, true, true, false}), + reference_tests::Tensor(element::boolean, {2, 2}, std::vector{true, true, true, false}), "evaluate_2D_gather_elements_3x2_data_bool"), }; return params; @@ -178,16 +178,16 @@ std::vector generateParams() { std::vector generateParamsNegative() { std::vector params { GatherElementsParams( - Tensor(element::i32, {3}, std::vector{1, 2, 3}), - Tensor(element::i32, {7}, std::vector{1, 2, 0, 2, 0, 0, 8}), + reference_tests::Tensor(element::i32, {3}, std::vector{1, 2, 3}), + reference_tests::Tensor(element::i32, {7}, std::vector{1, 2, 0, 2, 0, 0, 8}), 0, - Tensor(element::i32, {7}, std::vector{2, 3, 1, 3, 1, 1, 3}), + reference_tests::Tensor(element::i32, {7}, std::vector{2, 3, 1, 3, 1, 1, 3}), "evaluate_1D_gather_elements_negative_test"), GatherElementsParams( - Tensor(element::i32, {3, 3}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9}), - Tensor(element::i32, {2, 3}, std::vector{1, 3, 0, 2, 0, 0}), + reference_tests::Tensor(element::i32, {3, 3}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9}), + reference_tests::Tensor(element::i32, {2, 3}, std::vector{1, 3, 0, 2, 0, 0}), 0, - Tensor(element::i32, {2, 3}, std::vector{4, 8, 3, 7, 2, 3}), + reference_tests::Tensor(element::i32, {2, 3}, std::vector{4, 8, 3, 7, 2, 3}), "evaluate_2D_gather_elements_negative_test"), }; return params; diff --git a/docs/template_plugin/tests/functional/op_reference/gather_nd.cpp b/docs/template_plugin/tests/functional/op_reference/gather_nd.cpp index b77569aa2d4..1804ef912a9 100644 --- a/docs/template_plugin/tests/functional/op_reference/gather_nd.cpp +++ b/docs/template_plugin/tests/functional/op_reference/gather_nd.cpp @@ -13,15 +13,15 @@ using namespace ov; namespace { struct GatherNDParams { GatherNDParams( - const Tensor& dataTensor, const Tensor& indicesTensor, int64_t batchDims, - const Tensor& expectedTensor, const std::string& testcaseName = "") : + const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& indicesTensor, int64_t batchDims, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dataTensor(dataTensor), indicesTensor(indicesTensor), batchDims(batchDims), expectedTensor(expectedTensor), testcaseName(testcaseName) {} - Tensor dataTensor; - Tensor indicesTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor indicesTensor; int32_t batchDims; - Tensor expectedTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -79,102 +79,102 @@ std::vector generateParams() { using T = typename element_type_traits::value_type; std::vector params { GatherNDParams( - Tensor(IN_ET, {3, 3}, std::vector{10, 11, 12, 13, 14, 15, 16, 17, 18}), - Tensor(element::i32, {2}, std::vector{1, 2}), + reference_tests::Tensor(IN_ET, {3, 3}, std::vector{10, 11, 12, 13, 14, 15, 16, 17, 18}), + reference_tests::Tensor(element::i32, {2}, std::vector{1, 2}), 0, - Tensor(IN_ET, {}, std::vector{15}), + reference_tests::Tensor(IN_ET, {}, std::vector{15}), "gather_nd_single_indices"), GatherNDParams( - Tensor(IN_ET, {2, 2}, std::vector{10, 11, 12, 13}), - Tensor(element::i32, {2, 2}, std::vector{0, 0, 1, 1}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{10, 11, 12, 13}), + reference_tests::Tensor(element::i32, {2, 2}, std::vector{0, 0, 1, 1}), 0, - Tensor(IN_ET, {2}, std::vector{10, 13}), + reference_tests::Tensor(IN_ET, {2}, std::vector{10, 13}), "gather_nd_scalar_from_2d"), GatherNDParams( - Tensor(IN_ET, {2, 2}, std::vector{10, 11, 12, 13}), - Tensor(element::i32, {2, 1}, std::vector{1, 0}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{10, 11, 12, 13}), + reference_tests::Tensor(element::i32, {2, 1}, std::vector{1, 0}), 0, - Tensor(IN_ET, {2, 2}, std::vector{12, 13, 10, 11}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{12, 13, 10, 11}), "gather_nd_1d_from_2d"), GatherNDParams( - Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), - Tensor(element::i32, {2, 3}, std::vector{0, 0, 1, 1, 0, 1}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), + reference_tests::Tensor(element::i32, {2, 3}, std::vector{0, 0, 1, 1, 0, 1}), 0, - Tensor(IN_ET, {2}, std::vector{11, 21}), + reference_tests::Tensor(IN_ET, {2}, std::vector{11, 21}), "gather_nd_scalar_from_3d"), GatherNDParams( - Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), - Tensor(element::i32, {2, 2}, std::vector{0, 1, 1, 0}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), + reference_tests::Tensor(element::i32, {2, 2}, std::vector{0, 1, 1, 0}), 0, - Tensor(IN_ET, {2, 2}, std::vector{12, 13, 20, 21}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{12, 13, 20, 21}), "gather_nd_1d_from_3d"), GatherNDParams( - Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), - Tensor(element::i32, {1, 1}, std::vector{1}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), + reference_tests::Tensor(element::i32, {1, 1}, std::vector{1}), 0, - Tensor(IN_ET, {1, 2, 2}, std::vector{20, 21, 22, 23}), + reference_tests::Tensor(IN_ET, {1, 2, 2}, std::vector{20, 21, 22, 23}), "gather_nd_2d_from_3d"), GatherNDParams( - Tensor(IN_ET, {2, 2}, std::vector{10, 11, 12, 13}), - Tensor(element::i32, {2, 1, 2}, std::vector{0, 0, 0, 1}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{10, 11, 12, 13}), + reference_tests::Tensor(element::i32, {2, 1, 2}, std::vector{0, 0, 0, 1}), 0, - Tensor(IN_ET, {2, 1}, std::vector{10, 11}), + reference_tests::Tensor(IN_ET, {2, 1}, std::vector{10, 11}), "gather_nd_batch_scalar_from_2d"), GatherNDParams( - Tensor(IN_ET, {2, 2}, std::vector{10, 11, 12, 13}), - Tensor(element::i32, {2, 1, 1}, std::vector{1, 0}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{10, 11, 12, 13}), + reference_tests::Tensor(element::i32, {2, 1, 1}, std::vector{1, 0}), 0, - Tensor(IN_ET, {2, 1, 2}, std::vector{12, 13, 10, 11}), + reference_tests::Tensor(IN_ET, {2, 1, 2}, std::vector{12, 13, 10, 11}), "gather_nd_batch_1d_from_2d"), GatherNDParams( - Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), - Tensor(element::i32, {2, 2, 3}, std::vector{0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), + reference_tests::Tensor(element::i32, {2, 2, 3}, std::vector{0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0}), 0, - Tensor(IN_ET, {2, 2}, std::vector{11, 21, 13, 22}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{11, 21, 13, 22}), "gather_nd_batch_scalar_from_3d"), GatherNDParams( - Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), - Tensor(element::i32, {2, 2, 2}, std::vector{0, 1, 1, 0, 0, 0, 1, 1}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), + reference_tests::Tensor(element::i32, {2, 2, 2}, std::vector{0, 1, 1, 0, 0, 0, 1, 1}), 0, - Tensor(IN_ET, {2, 2, 2}, std::vector{12, 13, 20, 21, 10, 11, 22, 23}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{12, 13, 20, 21, 10, 11, 22, 23}), "gather_nd_batch_1d_from_3d"), GatherNDParams( - Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), - Tensor(element::i32, {2, 2, 2}, std::vector{0, -1, -1, 0, 0, 0, 1, 1}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), + reference_tests::Tensor(element::i32, {2, 2, 2}, std::vector{0, -1, -1, 0, 0, 0, 1, 1}), 0, - Tensor(IN_ET, {2, 2, 2}, std::vector{12, 13, 20, 21, 10, 11, 22, 23}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{12, 13, 20, 21, 10, 11, 22, 23}), "gather_nd_batch_1d_from_3d_negative"), GatherNDParams( - Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), - Tensor(element::i32, {2, 1, 1}, std::vector{1, 0}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), + reference_tests::Tensor(element::i32, {2, 1, 1}, std::vector{1, 0}), 0, - Tensor(IN_ET, {2, 1, 2, 2}, std::vector{20, 21, 22, 23, 10, 11, 12, 13}), + reference_tests::Tensor(IN_ET, {2, 1, 2, 2}, std::vector{20, 21, 22, 23, 10, 11, 12, 13}), "gather_nd_batch_2d_from_3d"), GatherNDParams( - Tensor(IN_ET, {2, 3, 4}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + reference_tests::Tensor(IN_ET, {2, 3, 4}, std::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}), - Tensor(element::i32, {2, 1}, std::vector{1, 0}), + reference_tests::Tensor(element::i32, {2, 1}, std::vector{1, 0}), 1, - Tensor(IN_ET, {2, 4}, std::vector{5, 6, 7, 8, 13, 14, 15, 16}), + reference_tests::Tensor(IN_ET, {2, 4}, std::vector{5, 6, 7, 8, 13, 14, 15, 16}), "gather_nd_batch_dims1"), GatherNDParams( - Tensor(IN_ET, {2, 3, 4, 2}, std::vector{ + reference_tests::Tensor(IN_ET, {2, 3, 4, 2}, std::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}), - Tensor(element::i32, {2, 3, 3, 2}, std::vector{ + reference_tests::Tensor(element::i32, {2, 3, 3, 2}, std::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}), 2, - Tensor(IN_ET, {6, 3}, std::vector{ + reference_tests::Tensor(IN_ET, {6, 3}, std::vector{ 3, 8, 6, 10, 12, 13, 23, 24, 22, 29, 28, 32, 36, 37, 37, 41, 48, 48}), "gather_nd_batch_dims2"), GatherNDParams( - Tensor(IN_ET, {2, 3, 4}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + reference_tests::Tensor(IN_ET, {2, 3, 4}, std::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}), - Tensor(element::i32, {2, 3, 1, 1}, std::vector{1, 0, 2, 0, 2, 2}), + reference_tests::Tensor(element::i32, {2, 3, 1, 1}, std::vector{1, 0, 2, 0, 2, 2}), 2, - Tensor(IN_ET, {6, 1}, std::vector{2, 5, 11, 13, 19, 23}), + reference_tests::Tensor(IN_ET, {6, 1}, std::vector{2, 5, 11, 13, 19, 23}), "gather_nd_batch_dims2_lead_dims"), }; return params; @@ -261,105 +261,105 @@ std::vector generateParams_v8() { using T = typename element_type_traits::value_type; std::vector params { GatherNDParams( - Tensor(IN_ET, {3, 3}, std::vector{10, 11, 12, 13, 14, 15, 16, 17, 18}), - Tensor(element::i32, {2}, std::vector{1, 2}), + reference_tests::Tensor(IN_ET, {3, 3}, std::vector{10, 11, 12, 13, 14, 15, 16, 17, 18}), + reference_tests::Tensor(element::i32, {2}, std::vector{1, 2}), 0, - Tensor(IN_ET, {}, std::vector{15}), + reference_tests::Tensor(IN_ET, {}, std::vector{15}), "gather_nd_8_single_indices"), GatherNDParams( - Tensor(IN_ET, {2, 2}, std::vector{10, 11, 12, 13}), - Tensor(element::i32, {2, 2}, std::vector{0, 0, 1, 1}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{10, 11, 12, 13}), + reference_tests::Tensor(element::i32, {2, 2}, std::vector{0, 0, 1, 1}), 0, - Tensor(IN_ET, {2}, std::vector{10, 13}), + reference_tests::Tensor(IN_ET, {2}, std::vector{10, 13}), "gather_nd_8_scalar_from_2d"), GatherNDParams( - Tensor(IN_ET, {2, 2}, std::vector{10, 11, 12, 13}), - Tensor(element::i32, {2, 1}, std::vector{1, 0}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{10, 11, 12, 13}), + reference_tests::Tensor(element::i32, {2, 1}, std::vector{1, 0}), 0, - Tensor(IN_ET, {2, 2}, std::vector{12, 13, 10, 11}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{12, 13, 10, 11}), "gather_nd_8_1d_from_2d"), GatherNDParams( - Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), - Tensor(element::i32, {2, 3}, std::vector{0, 0, 1, 1, 0, 1}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), + reference_tests::Tensor(element::i32, {2, 3}, std::vector{0, 0, 1, 1, 0, 1}), 0, - Tensor(IN_ET, {2}, std::vector{11, 21}), + reference_tests::Tensor(IN_ET, {2}, std::vector{11, 21}), "gather_nd_8_scalar_from_3d"), GatherNDParams( - Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), - Tensor(element::i32, {2, 2}, std::vector{0, 1, 1, 0}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), + reference_tests::Tensor(element::i32, {2, 2}, std::vector{0, 1, 1, 0}), 0, - Tensor(IN_ET, {2, 2}, std::vector{12, 13, 20, 21}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{12, 13, 20, 21}), "gather_nd_8_1d_from_3d"), GatherNDParams( - Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), - Tensor(element::i32, {1, 1}, std::vector{1}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), + reference_tests::Tensor(element::i32, {1, 1}, std::vector{1}), 0, - Tensor(IN_ET, {1, 2, 2}, std::vector{20, 21, 22, 23}), + reference_tests::Tensor(IN_ET, {1, 2, 2}, std::vector{20, 21, 22, 23}), "gather_nd_8_2d_from_3d"), GatherNDParams( - Tensor(IN_ET, {2, 2}, std::vector{10, 11, 12, 13}), - Tensor(element::i32, {2, 1, 2}, std::vector{0, 0, 0, 1}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{10, 11, 12, 13}), + reference_tests::Tensor(element::i32, {2, 1, 2}, std::vector{0, 0, 0, 1}), 0, - Tensor(IN_ET, {2, 1}, std::vector{10, 11}), + reference_tests::Tensor(IN_ET, {2, 1}, std::vector{10, 11}), "gather_nd_8_batch_scalar_from_2d"), GatherNDParams( - Tensor(IN_ET, {2, 2}, std::vector{10, 11, 12, 13}), - Tensor(element::i32, {2, 1, 1}, std::vector{1, 0}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{10, 11, 12, 13}), + reference_tests::Tensor(element::i32, {2, 1, 1}, std::vector{1, 0}), 0, - Tensor(IN_ET, {2, 1, 2}, std::vector{12, 13, 10, 11}), + reference_tests::Tensor(IN_ET, {2, 1, 2}, std::vector{12, 13, 10, 11}), "gather_nd_8_batch_1d_from_2d"), GatherNDParams( - Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), - Tensor(element::i32, {2, 2, 3}, std::vector{0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), + reference_tests::Tensor(element::i32, {2, 2, 3}, std::vector{0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0}), 0, - Tensor(IN_ET, {2, 2}, std::vector{11, 21, 13, 22}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{11, 21, 13, 22}), "gather_nd_8_batch_scalar_from_3d"), GatherNDParams( - Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), - Tensor(element::i32, {2, 2, 2}, std::vector{0, 1, 1, 0, 0, 0, 1, 1}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), + reference_tests::Tensor(element::i32, {2, 2, 2}, std::vector{0, 1, 1, 0, 0, 0, 1, 1}), 0, - Tensor(IN_ET, {2, 2, 2}, std::vector{12, 13, 20, 21, 10, 11, 22, 23}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{12, 13, 20, 21, 10, 11, 22, 23}), "gather_nd_8_batch_1d_from_3d"), GatherNDParams( - Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), - Tensor(element::i32, {2, 2, 2}, std::vector{0, -1, -1, 0, 0, 0, 1, 1}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), + reference_tests::Tensor(element::i32, {2, 2, 2}, std::vector{0, -1, -1, 0, 0, 0, 1, 1}), 0, - Tensor(IN_ET, {2, 2, 2}, std::vector{12, 13, 20, 21, 10, 11, 22, 23}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{12, 13, 20, 21, 10, 11, 22, 23}), "gather_nd_8_batch_1d_from_3d_negative"), GatherNDParams( - Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), - Tensor(element::i32, {2, 1, 1}, std::vector{1, 0}), + reference_tests::Tensor(IN_ET, {2, 2, 2}, std::vector{10, 11, 12, 13, 20, 21, 22, 23}), + reference_tests::Tensor(element::i32, {2, 1, 1}, std::vector{1, 0}), 0, - Tensor(IN_ET, {2, 1, 2, 2}, std::vector{20, 21, 22, 23, 10, 11, 12, 13}), + reference_tests::Tensor(IN_ET, {2, 1, 2, 2}, std::vector{20, 21, 22, 23, 10, 11, 12, 13}), "gather_nd_8_batch_2d_from_3d"), GatherNDParams( - Tensor(IN_ET, {2, 3, 4}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + reference_tests::Tensor(IN_ET, {2, 3, 4}, std::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}), - Tensor(element::i32, {2, 1}, std::vector{1, 0}), + reference_tests::Tensor(element::i32, {2, 1}, std::vector{1, 0}), 1, - Tensor(IN_ET, {2, 4}, std::vector{5, 6, 7, 8, 13, 14, 15, 16}), + reference_tests::Tensor(IN_ET, {2, 4}, std::vector{5, 6, 7, 8, 13, 14, 15, 16}), "gather_nd_8_batch_dims1"), GatherNDParams( - Tensor(IN_ET, {2, 3, 4, 2}, std::vector{ + reference_tests::Tensor(IN_ET, {2, 3, 4, 2}, std::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}), - Tensor(element::i32, {2, 3, 3, 2}, std::vector{ + reference_tests::Tensor(element::i32, {2, 3, 3, 2}, std::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}), 2, - Tensor(IN_ET, {2, 3, 3}, std::vector{ + reference_tests::Tensor(IN_ET, {2, 3, 3}, std::vector{ 3, 8, 6, 10, 12, 13, 23, 24, 22, 29, 28, 32, 36, 37, 37, 41, 48, 48}), "gather_8_nd_batch_dims2"), GatherNDParams( - Tensor(IN_ET, {2, 3, 4}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + reference_tests::Tensor(IN_ET, {2, 3, 4}, std::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}), - Tensor(element::i32, {2, 3, 1, 1}, std::vector{1, 0, 2, 0, 2, 2}), + reference_tests::Tensor(element::i32, {2, 3, 1, 1}, std::vector{1, 0, 2, 0, 2, 2}), 2, - Tensor(IN_ET, {2, 3, 1}, std::vector{2, 5, 11, 13, 19, 23}), + reference_tests::Tensor(IN_ET, {2, 3, 1}, std::vector{2, 5, 11, 13, 19, 23}), "gather_8_nd_batch_dims2_lead_dims"), GatherNDParams( - Tensor(IN_ET, {2, 3, 4, 5}, std::vector{ + reference_tests::Tensor(IN_ET, {2, 3, 4, 5}, std::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, @@ -368,10 +368,10 @@ std::vector generateParams_v8() { 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120}), - Tensor(element::i32, {2, 3, 2, 1}, std::vector{ + reference_tests::Tensor(element::i32, {2, 3, 2, 1}, std::vector{ 1, 0, 2, 0, 2, 0, 1, 0, 2, 0, 2, 0}), 2, - Tensor(IN_ET, {2, 3, 2, 5}, std::vector{ + reference_tests::Tensor(IN_ET, {2, 3, 2, 5}, std::vector{ 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 31, 32, 33, 34, 35, 21, 22, 23, 24, 25, 51, 52, 53, 54, 55, 41, 42, 43, 44, 45, 66, 67, 68, 69, 70, 61, 62, 63, 64, 65, 91, 92, 93, 94, 95, 81, 82, 83, 84, 85, diff --git a/docs/template_plugin/tests/functional/op_reference/gather_tree.cpp b/docs/template_plugin/tests/functional/op_reference/gather_tree.cpp index f111e375c7a..decf0706dc8 100644 --- a/docs/template_plugin/tests/functional/op_reference/gather_tree.cpp +++ b/docs/template_plugin/tests/functional/op_reference/gather_tree.cpp @@ -12,11 +12,11 @@ using namespace ov; namespace { struct GatherTreeParams { - Tensor stepIds; - Tensor parentIdx; - Tensor maxSeqLen; - Tensor endToken; - Tensor finalIdx; + reference_tests::Tensor stepIds; + reference_tests::Tensor parentIdx; + reference_tests::Tensor maxSeqLen; + reference_tests::Tensor endToken; + reference_tests::Tensor finalIdx; std::string testcaseName; }; @@ -78,32 +78,32 @@ std::vector generateParams() { using T = typename element_type_traits::value_type; std::vector params { Builder {} - .stepIds(Tensor(ET, {1, 1, 10}, std::vector{ + .stepIds(reference_tests::Tensor(ET, {1, 1, 10}, std::vector{ 1, 4, 9, 7, 9, 1, 2, 3, 9, 9})) - .parentIdx(Tensor(ET, {1, 1, 10}, std::vector{ + .parentIdx(reference_tests::Tensor(ET, {1, 1, 10}, std::vector{ 1, 4, 9, 7, 9, 1, 2, 3, 9, 9})) - .maxSeqLen(Tensor(ET, {1}, std::vector{9})) - .endToken(Tensor(ET, {}, std::vector{9})) - .finalIdx(Tensor(ET, {1, 1, 10}, std::vector{ + .maxSeqLen(reference_tests::Tensor(ET, {1}, std::vector{9})) + .endToken(reference_tests::Tensor(ET, {}, std::vector{9})) + .finalIdx(reference_tests::Tensor(ET, {1, 1, 10}, std::vector{ 1, 4, 9, 7, 9, 1, 2, 3, 9, 9})) .testcaseName("gather_tree_1"), Builder {} - .stepIds(Tensor(ET, {5, 1, 10}, std::vector{ + .stepIds(reference_tests::Tensor(ET, {5, 1, 10}, std::vector{ 1, 4, 9, 7, 9, 1, 2, 3, 9, 2, 3, 1, 4, 2, 4, 4, 7, 4, 9, 5, 8, 4, 3, 7, 5, 2, 4, 8, 3, 1, 5, 7, 9, 4, 5, 6, 4, 2, 9, 2, 8, 8, 7, 9, 8, 3, 1, 7, 5, 9})) - .parentIdx(Tensor(ET, {5, 1, 10}, std::vector{ + .parentIdx(reference_tests::Tensor(ET, {5, 1, 10}, std::vector{ 1, 4, 9, 7, 9, 1, 2, 3, 9, 2, 3, 1, 4, 2, 4, 4, 7, 4, 9, 5, 8, 4, 3, 7, 5, 2, 4, 8, 3, 1, 5, 7, 9, 4, 5, 6, 4, 2, 9, 2, 8, 8, 7, 9, 8, 3, 1, 7, 5, 9})) - .maxSeqLen(Tensor(ET, {1}, std::vector{9})) - .endToken(Tensor(ET, {}, std::vector{9})) - .finalIdx(Tensor(ET, {5, 1, 10}, std::vector{ + .maxSeqLen(reference_tests::Tensor(ET, {1}, std::vector{9})) + .endToken(reference_tests::Tensor(ET, {}, std::vector{9})) + .finalIdx(reference_tests::Tensor(ET, {5, 1, 10}, std::vector{ 4, 4, 9, 9, 4, 9, 2, 9, 9, 9, 1, 1, 9, 9, 1, 9, 9, 9, 9, 9, 1, 1, 9, 9, 1, 9, 9, 9, 9, 9, @@ -112,7 +112,7 @@ std::vector generateParams() { .testcaseName("gather_tree_5"), Builder {} - .stepIds(Tensor(ET, {20, 1, 10}, std::vector{ + .stepIds(reference_tests::Tensor(ET, {20, 1, 10}, std::vector{ 1, 4, 9, 7, 9, 1, 2, 3, 9, 2, 3, 1, 4, 2, 4, 4, 7, 4, 9, 5, 8, 4, 3, 7, 5, 2, 4, 8, 3, 1, 5, 7, 9, 4, 5, 6, 4, 2, 9, 2, 8, 8, 7, 9, 8, 3, 1, 7, 5, 8, 8, 9, 8, 1, 8, 1, 3, 2, 1, 8, @@ -123,7 +123,7 @@ std::vector generateParams() { 8, 9, 5, 2, 5, 2, 9, 8, 4, 4, 5, 2, 6, 9, 4, 4, 6, 7, 6, 7, 2, 8, 7, 6, 6, 7, 4, 4, 7, 3, 4, 9, 7, 4, 8, 9, 1, 6, 5, 6, 1, 2, 8, 9, 1, 5, 4, 6, 9, 4, 4, 3, 7, 9, 7, 6, 3, 1, 7, 9})) - .parentIdx(Tensor(ET, {20, 1, 10}, std::vector{ + .parentIdx(reference_tests::Tensor(ET, {20, 1, 10}, std::vector{ 1, 4, 9, 7, 9, 1, 2, 3, 9, 2, 3, 1, 4, 2, 4, 4, 7, 4, 9, 5, 8, 4, 3, 7, 5, 2, 4, 8, 3, 1, 5, 7, 9, 4, 5, 6, 4, 2, 9, 2, 8, 8, 7, 9, 8, 3, 1, 7, 5, 8, 8, 9, 8, 1, 8, 1, 3, 2, 1, 8, @@ -134,9 +134,9 @@ std::vector generateParams() { 8, 9, 5, 2, 5, 2, 9, 8, 4, 4, 5, 2, 6, 9, 4, 4, 6, 7, 6, 7, 2, 8, 7, 6, 6, 7, 4, 4, 7, 3, 4, 9, 7, 4, 8, 9, 1, 6, 5, 6, 1, 2, 8, 9, 1, 5, 4, 6, 9, 4, 4, 3, 7, 9, 7, 6, 3, 1, 7, 9})) - .maxSeqLen(Tensor(ET, {1}, std::vector{9})) - .endToken(Tensor(ET, {}, std::vector{9})) - .finalIdx(Tensor(ET, {20, 1, 10}, std::vector{ + .maxSeqLen(reference_tests::Tensor(ET, {1}, std::vector{9})) + .endToken(reference_tests::Tensor(ET, {}, std::vector{9})) + .finalIdx(reference_tests::Tensor(ET, {20, 1, 10}, std::vector{ 9, 4, 9, 4, 4, 4, 9, 4, 9, 9, 9, 1, 9, 1, 1, 1, 9, 1, 9, 9, 9, 1, 9, 1, 1, 1, 9, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, diff --git a/docs/template_plugin/tests/functional/op_reference/gelu.cpp b/docs/template_plugin/tests/functional/op_reference/gelu.cpp index f99b340dc5e..22ba0c42a02 100644 --- a/docs/template_plugin/tests/functional/op_reference/gelu.cpp +++ b/docs/template_plugin/tests/functional/op_reference/gelu.cpp @@ -27,8 +27,8 @@ struct GeluParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceGeluV0LayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/grn.cpp b/docs/template_plugin/tests/functional/op_reference/grn.cpp index e367f6dab0a..31b125c51c5 100644 --- a/docs/template_plugin/tests/functional/op_reference/grn.cpp +++ b/docs/template_plugin/tests/functional/op_reference/grn.cpp @@ -20,8 +20,8 @@ struct GrnParams { PartialShape pshape; element::Type inType; element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceGrnLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/group_convolution.cpp b/docs/template_plugin/tests/functional/op_reference/group_convolution.cpp index 52347b74193..9427d0347e3 100644 --- a/docs/template_plugin/tests/functional/op_reference/group_convolution.cpp +++ b/docs/template_plugin/tests/functional/op_reference/group_convolution.cpp @@ -37,9 +37,9 @@ struct GroupConvolutionParams { ov::element::Type inType; ov::element::Type filterType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor filterData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor filterData; + ov::Tensor refData; ov::Strides strides; ov::CoordinateDiff padBegin; ov::CoordinateDiff padEnd; diff --git a/docs/template_plugin/tests/functional/op_reference/group_convolution_backprop.cpp b/docs/template_plugin/tests/functional/op_reference/group_convolution_backprop.cpp index d27a4733416..739cc1a3e69 100644 --- a/docs/template_plugin/tests/functional/op_reference/group_convolution_backprop.cpp +++ b/docs/template_plugin/tests/functional/op_reference/group_convolution_backprop.cpp @@ -40,9 +40,9 @@ struct GroupConvolutionBackpropDataParams { ov::element::Type inType; ov::element::Type filterType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor filterData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor filterData; + ov::Tensor refData; ov::Strides strides; ov::CoordinateDiff padBegin; ov::CoordinateDiff padEnd; @@ -77,9 +77,9 @@ struct GroupConvolutionBackpropDataOutShapeParams { ov::element::Type inType; ov::element::Type filterType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor filterData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor filterData; + ov::Tensor refData; ov::Strides strides; ov::Strides dialations; Shape constantOutputShape; diff --git a/docs/template_plugin/tests/functional/op_reference/gru_cell.cpp b/docs/template_plugin/tests/functional/op_reference/gru_cell.cpp index acb5e8d76f2..f84ab2e60db 100644 --- a/docs/template_plugin/tests/functional/op_reference/gru_cell.cpp +++ b/docs/template_plugin/tests/functional/op_reference/gru_cell.cpp @@ -14,8 +14,8 @@ namespace { struct GRUCellParams { GRUCellParams( const int32_t batchSize, const int32_t inputSize, const int32_t hiddenSize, const int32_t gatesCount, const bool linearBeforeReset, - const Tensor& X, const Tensor& H_t, const Tensor& W, const Tensor& R, const Tensor& B, - const Tensor& Ho, const std::string& testcaseName = "") : + const reference_tests::Tensor& X, const reference_tests::Tensor& H_t, const reference_tests::Tensor& W, const reference_tests::Tensor& R, const reference_tests::Tensor& B, + const reference_tests::Tensor& Ho, const std::string& testcaseName = "") : batchSize(batchSize), inputSize(inputSize), hiddenSize(hiddenSize), gatesCount(gatesCount), linearBeforeReset(linearBeforeReset), X(X), H_t(H_t), W(W), R(R), B(B), Ho(Ho), testcaseName(testcaseName) {} @@ -24,12 +24,12 @@ struct GRUCellParams { int32_t hiddenSize; int32_t gatesCount; bool linearBeforeReset; - Tensor X; - Tensor H_t; - Tensor W; - Tensor R; - Tensor B; - Tensor Ho; + reference_tests::Tensor X; + reference_tests::Tensor H_t; + reference_tests::Tensor W; + reference_tests::Tensor R; + reference_tests::Tensor B; + reference_tests::Tensor Ho; std::string testcaseName; }; @@ -147,23 +147,23 @@ std::vector generateParams() { std::vector params { GRUCellParams( 2, 3, 3, 3, false, - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.52421564f, 0.78845507f, 0.9372873f, 0.59783894f, 0.18278378f, 0.2084126f}), - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.45738035f, 0.996877f, 0.82882977f, 0.47492632f, 0.88471466f, 0.57833236f}), - Tensor(ET, {3 * 3, 3}, std::vector{ + reference_tests::Tensor(ET, {3 * 3, 3}, std::vector{ 0.5815369f, 0.16559383f, 0.08464007f, 0.843122f, 0.73968244f, 0.11359601f, 0.8295078f, 0.9240567f, 0.10007995f, 0.20573162f, 0.09002485f, 0.2839569f, 0.3096991f, 0.5638341f, 0.5787327f, 0.84552664f, 0.16263747f, 0.7243242f, 0.8049057f, 0.43966424f, 0.46294412f, 0.9833361f, 0.31369713f, 0.1719934f, 0.4937093f, 0.6353004f, 0.77982515f}), - Tensor(ET, {3 * 3, 3}, std::vector{ + reference_tests::Tensor(ET, {3 * 3, 3}, std::vector{ 0.16510165f, 0.52435565f, 0.2788478f, 0.99427545f, 0.1623331f, 0.01389796f, 0.99669236f, 0.53901845f, 0.8737506f, 0.9254788f, 0.21172932f, 0.11634306f, 0.40111724f, 0.37497616f, 0.2903471f, 0.6796794f, 0.65131867f, 0.78163475f, 0.12058706f, 0.45591718f, 0.791677f, 0.76497287f, 0.9895242f, 0.7845312f, 0.51267904f, 0.49030215f, 0.08498167f}), - Tensor(ET, {3 * 3}, std::vector{ + reference_tests::Tensor(ET, {3 * 3}, std::vector{ 0.8286678f + 0.9175602f, 0.9153158f + 0.14958014f, 0.9581612f + 0.49230585f, @@ -173,28 +173,28 @@ std::vector generateParams() { 0.14153397f + 0.50496656f, 0.22404431f + 0.34798595f, 0.6549655f + 0.6699164f}), - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.48588726f, 0.99670005f, 0.83759373f, 0.5023099f, 0.89410484f, 0.60011315f}), "gru_cell_bias_clip"), GRUCellParams( 2, 3, 3, 3, true, - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.12249453f, 0.6127907f, 0.5001741f, 0.5124603f, 0.04329684f, 0.023834f}), - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.8598948f, 0.41189128f, 0.72824323f, 0.53940123f, 0.31485787f, 0.04053852f}), - Tensor(ET, {3 * 3, 3}, std::vector{ + reference_tests::Tensor(ET, {3 * 3, 3}, std::vector{ 0.72259396f, 0.11561195f, 0.9457856f, 0.19037509f, 0.6964006f, 0.33459795f, 0.5468904f, 0.85646594f, 0.5101311f, 0.9712257f, 0.3687071f, 0.60280246f, 0.56943774f, 0.7475505f, 0.2490578f, 0.86977345f, 0.85542053f, 0.29660386f, 0.49717373f, 0.7473479f, 0.53454477f, 0.15974349f, 0.5804805f, 0.14303213f, 0.07514781f, 0.5865731f, 0.76409274f}), - Tensor(ET, {3 * 3, 3}, std::vector{ + reference_tests::Tensor(ET, {3 * 3, 3}, std::vector{ 0.91382647f, 0.41527033f, 0.28040004f, 0.23601337f, 0.04471736f, 0.03888785f, 0.06308217f, 0.44844428f, 0.29384327f, 0.49037653f, 0.50421673f, 0.7366393f, 0.63143945f, 0.00277612f, 0.37198433f, 0.06966069f, 0.4613444f, 0.10999731f, 0.78273284f, 0.21453214f, 0.10751773f, 0.18332677f, 0.1326976f, 0.9998985f, 0.19263928f, 0.10979804f, 0.52575564f}), - Tensor(ET, {(3 + 1) * 3}, std::vector{ + reference_tests::Tensor(ET, {(3 + 1) * 3}, std::vector{ 0.61395123f, // 0.09875853f + 0.5151927f, 1.08667738f, // 0.37801138f + 0.708666f, 1.32600244f, // 0.7729636f + 0.55303884f, @@ -207,7 +207,7 @@ std::vector generateParams() { 0.6606634f, 0.99040645f, 0.21112025f}), - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.8709214f, 0.48411977f, 0.74495184f, 0.6074972f, 0.44572943f, 0.1467715f}), "gru_cell_linear_before_reset"), }; @@ -235,23 +235,23 @@ std::vector generateParamsHardsigmoidActivationFunction() { std::vector params { GRUCellParams( 2, 3, 3, 3, true, - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.12249453f, 0.6127907f, 0.5001741f, 0.5124603f, 0.04329684f, 0.023834f}), - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.8598948f, 0.41189128f, 0.72824323f, 0.53940123f, 0.31485787f, 0.04053852f}), - Tensor(ET, {3 * 3, 3}, std::vector{ + reference_tests::Tensor(ET, {3 * 3, 3}, std::vector{ 0.72259396f, 0.11561195f, 0.9457856f, 0.19037509f, 0.6964006f, 0.33459795f, 0.5468904f, 0.85646594f, 0.5101311f, 0.9712257f, 0.3687071f, 0.60280246f, 0.56943774f, 0.7475505f, 0.2490578f, 0.86977345f, 0.85542053f, 0.29660386f, 0.49717373f, 0.7473479f, 0.53454477f, 0.15974349f, 0.5804805f, 0.14303213f, 0.07514781f, 0.5865731f, 0.76409274f}), - Tensor(ET, {3 * 3, 3}, std::vector{ + reference_tests::Tensor(ET, {3 * 3, 3}, std::vector{ 0.91382647f, 0.41527033f, 0.28040004f, 0.23601337f, 0.04471736f, 0.03888785f, 0.06308217f, 0.44844428f, 0.29384327f, 0.49037653f, 0.50421673f, 0.7366393f, 0.63143945f, 0.00277612f, 0.37198433f, 0.06966069f, 0.4613444f, 0.10999731f, 0.78273284f, 0.21453214f, 0.10751773f, 0.18332677f, 0.1326976f, 0.9998985f, 0.19263928f, 0.10979804f, 0.52575564f}), - Tensor(ET, {(3 + 1) * 3}, std::vector{ + reference_tests::Tensor(ET, {(3 + 1) * 3}, std::vector{ 0.09875853f + 0.5151927f, 0.37801138f + 0.708666f, 0.7729636f + 0.55303884f, @@ -264,7 +264,7 @@ std::vector generateParamsHardsigmoidActivationFunction() { 0.6606634f, 0.99040645f, 0.21112025f}), - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.8598948f, 0.41189128f, 0.72824323f, 0.53940123f, 0.31485787f, 0.04053852f}), "gru_cell_hardsigmoid_activation_function"), }; diff --git a/docs/template_plugin/tests/functional/op_reference/hard_sigmoid.cpp b/docs/template_plugin/tests/functional/op_reference/hard_sigmoid.cpp index 9abd1e8e28b..94f3b4d73cc 100644 --- a/docs/template_plugin/tests/functional/op_reference/hard_sigmoid.cpp +++ b/docs/template_plugin/tests/functional/op_reference/hard_sigmoid.cpp @@ -27,8 +27,8 @@ struct HardSigmoidParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; float alpha; float beta; }; diff --git a/docs/template_plugin/tests/functional/op_reference/hsigmoid.cpp b/docs/template_plugin/tests/functional/op_reference/hsigmoid.cpp index ce9bf13ac68..460218b1a1d 100644 --- a/docs/template_plugin/tests/functional/op_reference/hsigmoid.cpp +++ b/docs/template_plugin/tests/functional/op_reference/hsigmoid.cpp @@ -23,8 +23,8 @@ struct HSigmoidParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceHSigmoidLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/hswish.cpp b/docs/template_plugin/tests/functional/op_reference/hswish.cpp index 1cb488a5f97..f635e6d9a1c 100644 --- a/docs/template_plugin/tests/functional/op_reference/hswish.cpp +++ b/docs/template_plugin/tests/functional/op_reference/hswish.cpp @@ -24,8 +24,8 @@ struct HSwishParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceHSwishLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/idft.cpp b/docs/template_plugin/tests/functional/op_reference/idft.cpp index ca02dea911b..51d6988d5dd 100644 --- a/docs/template_plugin/tests/functional/op_reference/idft.cpp +++ b/docs/template_plugin/tests/functional/op_reference/idft.cpp @@ -37,8 +37,8 @@ struct IDFTParams { Shape m_expected_shape; element::Type_t m_input_type; element::Type_t m_expected_type; - runtime::Tensor m_input_value; - runtime::Tensor m_expected_value; + ov::Tensor m_input_value; + ov::Tensor m_expected_value; std::shared_ptr m_axes; std::shared_ptr m_signal; }; diff --git a/docs/template_plugin/tests/functional/op_reference/if.cpp b/docs/template_plugin/tests/functional/op_reference/if.cpp index 050571e268d..c80e84427d8 100644 --- a/docs/template_plugin/tests/functional/op_reference/if.cpp +++ b/docs/template_plugin/tests/functional/op_reference/if.cpp @@ -18,14 +18,14 @@ using namespace ov; using namespace InferenceEngine; struct IfFunctionalBase { - virtual std::shared_ptr create_function(const std::vector& if_inputs, - const std::vector& results) = 0; + virtual std::shared_ptr create_function(const std::vector& if_inputs, + const std::vector& results) = 0; IfFunctionalBase() {} }; struct IfCondConst : public IfFunctionalBase { - std::shared_ptr create_function(const std::vector& if_inputs, - const std::vector& results) override { + std::shared_ptr create_function(const std::vector& if_inputs, + const std::vector& results) override { NGRAPH_CHECK(if_inputs.size() == 2, "Incorrect test case! Number of inputs is not 2."); NGRAPH_CHECK(results.size() == 1, "Incorrect test case! Number of outputs is not 1."); @@ -56,8 +56,8 @@ struct IfCondConst : public IfFunctionalBase { }; struct IfCondIsNonConst : public IfFunctionalBase { - std::shared_ptr create_function(const std::vector& if_inputs, - const std::vector& results) override { + std::shared_ptr create_function(const std::vector& if_inputs, + const std::vector& results) override { NGRAPH_CHECK(if_inputs.size() == 3, "Incorrect test case! Number of inputs is not 3."); NGRAPH_CHECK(results.size() == 1, "Incorrect test case! Number of outputs is not 1."); @@ -90,8 +90,8 @@ struct IfCondIsNonConst : public IfFunctionalBase { }; struct IfWithoutAdditionalInputs : IfFunctionalBase { - std::shared_ptr create_function(const std::vector& if_inputs, - const std::vector& results) override { + std::shared_ptr create_function(const std::vector& if_inputs, + const std::vector& results) override { NGRAPH_CHECK(if_inputs.size() == 1, "Incorrect test case! Number of inputs is not 1."); NGRAPH_CHECK(results.size() == 1, "Incorrect test case! Number of outputs is not 1."); @@ -112,8 +112,8 @@ struct IfWithoutAdditionalInputs : IfFunctionalBase { }; struct IfDynamismCaseWithStaticInputs : public IfFunctionalBase { - std::shared_ptr create_function(const std::vector& if_inputs, - const std::vector& results) override { + std::shared_ptr create_function(const std::vector& if_inputs, + const std::vector& results) override { NGRAPH_CHECK(if_inputs.size() == 4, "Incorrect test case! Number of inputs is not 4."); NGRAPH_CHECK(results.size() == 2, "Incorrect test case! Number of outputs is not 2."); @@ -154,8 +154,8 @@ struct IfDynamismCaseWithStaticInputs : public IfFunctionalBase { }; struct IfConditionIsScalar : public IfFunctionalBase { - std::shared_ptr create_function(const std::vector& if_inputs, - const std::vector& results) override { + std::shared_ptr create_function(const std::vector& if_inputs, + const std::vector& results) override { NGRAPH_CHECK(if_inputs.size() == 3, "Incorrect test case! Number of inputs is not 3."); NGRAPH_CHECK(results.size() == 1, "Incorrect test case! Number of outputs is not 1."); @@ -190,8 +190,8 @@ struct IfConditionIsScalar : public IfFunctionalBase { }; struct IfConditionIsDynamic : public IfFunctionalBase { - std::shared_ptr create_function(const std::vector& if_inputs, - const std::vector& results) override { + std::shared_ptr create_function(const std::vector& if_inputs, + const std::vector& results) override { NGRAPH_CHECK(if_inputs.size() == 3, "Incorrect test case! Number of inputs is not 3."); NGRAPH_CHECK(results.size() == 1, "Incorrect test case! Number of outputs is not 1."); @@ -226,8 +226,8 @@ struct IfConditionIsDynamic : public IfFunctionalBase { struct IfParams { IfParams(const std::shared_ptr& functional, - const std::vector& if_inputs, - const std::vector& expected_results, + const std::vector& if_inputs, + const std::vector& expected_results, const std::string& test_case_name) : function(functional), inputs(if_inputs), @@ -235,8 +235,8 @@ struct IfParams { test_case_name(test_case_name) {} std::shared_ptr function; - std::vector inputs; - std::vector expected_results; + std::vector inputs; + std::vector expected_results; std::string test_case_name; }; @@ -288,81 +288,81 @@ INSTANTIATE_TEST_SUITE_P( ::testing::Values( IfParams( std::make_shared(true), - std::vector{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 1.0, 1.0, 1.0}), - Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 2.0, 2.0, 2.0})}, - std::vector{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 2.0, 2.0, 2.0})}, + std::vector{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 1.0, 1.0, 1.0}), + reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 2.0, 2.0, 2.0})}, + std::vector{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 2.0, 2.0, 2.0})}, "if_condition_const_is_true"), IfParams( std::make_shared(false), - std::vector{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 1.0, 1.0, 1.0}), - Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 2.0, 2.0, 2.0})}, - std::vector{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 1.0, 1.0, 1.0})}, + std::vector{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 1.0, 1.0, 1.0}), + reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 2.0, 2.0, 2.0})}, + std::vector{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 1.0, 1.0, 1.0})}, "if_condition_const_is_false"), IfParams( std::make_shared(), - std::vector{Tensor(Shape{1}, ngraph::element::boolean, std::vector{1}), - Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 2.0, 3.0, 4.0}), - Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 1.0, 2.0, 3.0})}, - std::vector{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 2.0, 6.0, 12.0})}, + std::vector{reference_tests::Tensor(Shape{1}, ngraph::element::boolean, std::vector{1}), + reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 2.0, 3.0, 4.0}), + reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 1.0, 2.0, 3.0})}, + std::vector{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 2.0, 6.0, 12.0})}, "if_condition_si_non_const_true"), IfParams( std::make_shared(), - std::vector{Tensor(Shape{1}, ngraph::element::boolean, std::vector{0}), - Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 2.0, 3.0, 4.0}), - Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 1.0, 2.0, 3.0})}, - std::vector{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{3.0, 3.0, 5.0, 7.0})}, + std::vector{reference_tests::Tensor(Shape{1}, ngraph::element::boolean, std::vector{0}), + reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 2.0, 3.0, 4.0}), + reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 1.0, 2.0, 3.0})}, + std::vector{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{3.0, 3.0, 5.0, 7.0})}, "if_condition_is_non_const_false"), IfParams(std::make_shared(), - std::vector{Tensor(Shape{1}, ngraph::element::boolean, std::vector{1})}, - std::vector{Tensor(Shape{1}, ngraph::element::f32, std::vector{8.0})}, + std::vector{reference_tests::Tensor(Shape{1}, ngraph::element::boolean, std::vector{1})}, + std::vector{reference_tests::Tensor(Shape{1}, ngraph::element::f32, std::vector{8.0})}, "if_without_addition_inputs_condition_is_true"), IfParams(std::make_shared(), - std::vector{Tensor(Shape{1}, ngraph::element::boolean, std::vector{0})}, - std::vector{Tensor(Shape{1}, ngraph::element::f32, std::vector{2.0})}, + std::vector{reference_tests::Tensor(Shape{1}, ngraph::element::boolean, std::vector{0})}, + std::vector{reference_tests::Tensor(Shape{1}, ngraph::element::f32, std::vector{2.0})}, "if_without_addition_inputs_condition_is_false"), IfParams( std::make_shared(), - std::vector{Tensor(Shape{}, ngraph::element::boolean, std::vector{1}), - Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 2.0, 3.0, 4.0}), - Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 1.0, 2.0, 3.0})}, - std::vector{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 2.0, 6.0, 12.0})}, + std::vector{reference_tests::Tensor(Shape{}, ngraph::element::boolean, std::vector{1}), + reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 2.0, 3.0, 4.0}), + reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 1.0, 2.0, 3.0})}, + std::vector{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 2.0, 6.0, 12.0})}, "if_condition_is_scalar_cond_true"), IfParams( std::make_shared(), - std::vector{Tensor(Shape{}, ngraph::element::boolean, std::vector{0}), - Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 2.0, 3.0, 4.0}), - Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 1.0, 2.0, 3.0})}, - std::vector{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{3.0, 3.0, 5.0, 7.0})}, + std::vector{reference_tests::Tensor(Shape{}, ngraph::element::boolean, std::vector{0}), + reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 2.0, 3.0, 4.0}), + reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 1.0, 2.0, 3.0})}, + std::vector{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{3.0, 3.0, 5.0, 7.0})}, "if_condition_is_scalar_cond_false"), IfParams( std::make_shared(), - std::vector{Tensor(Shape{}, ngraph::element::boolean, std::vector{1}), - Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 2.0, 3.0, 4.0}), - Tensor(Shape{4, 2, 2}, ngraph::element::f32, Y_gen()), - Tensor(Shape{8, 8, 8}, ngraph::element::f32, Z_gen())}, - std::vector{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 4.0, 9.0, 16.0}), - Tensor(Shape{4, 2, 2}, ngraph::element::f32, Y_gen())}, + std::vector{reference_tests::Tensor(Shape{}, ngraph::element::boolean, std::vector{1}), + reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 2.0, 3.0, 4.0}), + reference_tests::Tensor(Shape{4, 2, 2}, ngraph::element::f32, Y_gen()), + reference_tests::Tensor(Shape{8, 8, 8}, ngraph::element::f32, Z_gen())}, + std::vector{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 4.0, 9.0, 16.0}), + reference_tests::Tensor(Shape{4, 2, 2}, ngraph::element::f32, Y_gen())}, "If_dynamism_case_with_static_inputs_condition_true"), IfParams( std::make_shared(), - std::vector{Tensor(Shape{}, ngraph::element::boolean, std::vector{0}), - Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 2.0, 3.0, 4.0}), - Tensor(Shape{4, 2, 2}, ngraph::element::f32, Y_gen()), - Tensor(Shape{8, 8, 8}, ngraph::element::f32, Z_gen())}, - std::vector{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 4.0, 6.0, 8.0}), - Tensor(Shape{8, 8, 8}, ngraph::element::f32, Z_gen())}, + std::vector{reference_tests::Tensor(Shape{}, ngraph::element::boolean, std::vector{0}), + reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 2.0, 3.0, 4.0}), + reference_tests::Tensor(Shape{4, 2, 2}, ngraph::element::f32, Y_gen()), + reference_tests::Tensor(Shape{8, 8, 8}, ngraph::element::f32, Z_gen())}, + std::vector{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 4.0, 6.0, 8.0}), + reference_tests::Tensor(Shape{8, 8, 8}, ngraph::element::f32, Z_gen())}, "If_dynamism_case_with_static_inputs_condition_false"), IfParams( std::make_shared(), - std::vector{Tensor(Shape{}, ngraph::element::boolean, std::vector{1}), - Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 2.0, 3.0, 4.0}), - Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 1.0, 2.0, 3.0})}, - std::vector{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 2.0, 6.0, 12.0})}, + std::vector{reference_tests::Tensor(Shape{}, ngraph::element::boolean, std::vector{1}), + reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 2.0, 3.0, 4.0}), + reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 1.0, 2.0, 3.0})}, + std::vector{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 2.0, 6.0, 12.0})}, "if_condition_is_dynamic_cond_true"), IfParams( std::make_shared(), - std::vector{Tensor(Shape{}, ngraph::element::boolean, std::vector{0}), - Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 2.0, 3.0, 4.0}), - Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 1.0, 2.0, 3.0})}, - std::vector{Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{3.0, 3.0, 5.0, 7.0})}, + std::vector{reference_tests::Tensor(Shape{}, ngraph::element::boolean, std::vector{0}), + reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{1.0, 2.0, 3.0, 4.0}), + reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{2.0, 1.0, 2.0, 3.0})}, + std::vector{reference_tests::Tensor(Shape{1, 2, 2}, ngraph::element::f32, std::vector{3.0, 3.0, 5.0, 7.0})}, "if_condition_is_dynamic_cond_false"))); diff --git a/docs/template_plugin/tests/functional/op_reference/log.cpp b/docs/template_plugin/tests/functional/op_reference/log.cpp index 671b9be2ac5..c6a35edd00b 100644 --- a/docs/template_plugin/tests/functional/op_reference/log.cpp +++ b/docs/template_plugin/tests/functional/op_reference/log.cpp @@ -26,8 +26,8 @@ struct LogParams { PartialShape pshape; element::Type inType; element::Type outType; - runtime::Tensor inputData; - runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceLogLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/log_softmax.cpp b/docs/template_plugin/tests/functional/op_reference/log_softmax.cpp index 2297c726cfb..19503fd4511 100644 --- a/docs/template_plugin/tests/functional/op_reference/log_softmax.cpp +++ b/docs/template_plugin/tests/functional/op_reference/log_softmax.cpp @@ -28,8 +28,8 @@ struct LogSoftmaxParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceLogSoftmaxLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/logical.hpp b/docs/template_plugin/tests/functional/op_reference/logical.hpp index 043df9e85cc..05b169f8f48 100644 --- a/docs/template_plugin/tests/functional/op_reference/logical.hpp +++ b/docs/template_plugin/tests/functional/op_reference/logical.hpp @@ -14,8 +14,8 @@ namespace LogicalOpsRefTestDefinitions { struct RefLogicalParams { ngraph::helpers::LogicalTypes opType; - std::vector inputs; - Tensor expected; + std::vector inputs; + reference_tests::Tensor expected; }; struct Builder : ParamsBuilder { @@ -48,7 +48,7 @@ public: } private: - static std::shared_ptr CreateFunction(ngraph::helpers::LogicalTypes op_type, const std::vector& inputs) { + static std::shared_ptr CreateFunction(ngraph::helpers::LogicalTypes op_type, const std::vector& inputs) { ov::ParameterVector params_vec; for (auto& input : inputs) { params_vec.push_back(std::make_shared(input.type, input.shape)); diff --git a/docs/template_plugin/tests/functional/op_reference/lrn.cpp b/docs/template_plugin/tests/functional/op_reference/lrn.cpp index 7d3d11654f7..68931c9176b 100644 --- a/docs/template_plugin/tests/functional/op_reference/lrn.cpp +++ b/docs/template_plugin/tests/functional/op_reference/lrn.cpp @@ -70,8 +70,8 @@ struct LRNParams { Shape m_expected_shape; element::Type m_input_type; element::Type m_expected_type; - runtime::Tensor m_input_value; - runtime::Tensor m_expected_value; + ov::Tensor m_input_value; + ov::Tensor m_expected_value; float m_alpha; float m_beta; float m_bias; diff --git a/docs/template_plugin/tests/functional/op_reference/lstm_cell.cpp b/docs/template_plugin/tests/functional/op_reference/lstm_cell.cpp index 1e20a9a030d..f36bbf3e186 100644 --- a/docs/template_plugin/tests/functional/op_reference/lstm_cell.cpp +++ b/docs/template_plugin/tests/functional/op_reference/lstm_cell.cpp @@ -17,14 +17,14 @@ struct LSTMCellParams { int32_t inputSize; int32_t hiddenSize; int32_t gatesCount; - Tensor X; - Tensor W; - Tensor R; - Tensor H_t; - Tensor C_t; - Tensor B; - Tensor Ho; - Tensor Co; + reference_tests::Tensor X; + reference_tests::Tensor W; + reference_tests::Tensor R; + reference_tests::Tensor H_t; + reference_tests::Tensor C_t; + reference_tests::Tensor B; + reference_tests::Tensor Ho; + reference_tests::Tensor Co; std::string testcaseName; }; @@ -287,29 +287,29 @@ std::vector generateParams() { .inputSize(3) .hiddenSize(3) .gatesCount(4) - .X(Tensor(ET, {2, 3}, std::vector{ + .X(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.81342685f, 0.84108883f, 0.8152282f, 0.46893653f, 0.0901856f, 0.37088776f})) - .W(Tensor(ET, {4 * 3, 3}, std::vector{ + .W(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector{ 3.3330739e-01f, 3.6229487e-04f, 4.6773660e-01f, 4.3046016e-01f, 7.3950343e-02f, 3.8063636e-01f, 9.6921772e-01f, 9.6897459e-01f, 6.2964785e-01f, 3.1134409e-01f, 8.4709978e-01f, 9.4928098e-01f, 6.1676943e-01f, 6.6020679e-01f, 1.9072217e-01f, 8.8032126e-02f, 4.0472135e-01f, 6.8342745e-01f, 8.3432144e-01f, 4.4928190e-01f, 7.9524308e-01f, 5.3966165e-01f, 8.5936421e-01f, 8.3136767e-01f, 5.5125546e-02f, 4.7791195e-01f, 3.5788772e-01f, 6.7507404e-01f, 2.1716513e-01f, 2.7473119e-01f, 3.3999152e-02f, 9.6835363e-01f, 3.7581277e-01f, 2.4026000e-01f, 6.7418844e-01f, 3.4199652e-01f})) - .R(Tensor(ET, {4 * 3, 3}, std::vector{ + .R(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector{ 0.0987983f, 0.52032113f, 0.5848073f, 0.5356095f, 0.74497133f, 0.73260087f, 0.1700787f, 0.45684233f, 0.1495722f, 0.42734373f, 0.4433832f, 0.25906256f, 0.03854987f, 0.47480518f, 0.37215272f, 0.99890584f, 0.74019486f, 0.3518967f, 0.6881257f, 0.8170279f, 0.54088944f, 0.81225616f, 0.14619833f, 0.42941234f, 0.86843914f, 0.45967972f, 0.6237719f, 0.11074839f, 0.6029616f, 0.3149305f, 0.46504205f, 0.5843412f, 0.8733427f, 0.7687243f, 0.07074859f, 0.39188156f})) - .H_t(Tensor(ET, {2, 3}, std::vector{ + .H_t(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.77956f, 0.5331557f, 0.04297554f, 0.7962175f, 0.7635707f, 0.11989366f})) - .C_t(Tensor(ET, {2, 3}, std::vector{ + .C_t(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.8488452f, 0.18851636f, 0.5020695f, 0.29716516f, 0.06740791f, 0.45384037f})) - .B(Tensor(ET, {4 * 3}, std::vector(4 * 3, 0.f))) - .Ho(Tensor(ET, {2, 3}, std::vector{0.81457126f, 0.61109227f, 0.769522f, 0.52239674f, 0.4324641f, 0.63183f})) - .Co(Tensor(ET, {2, 3}, std::vector{1.4444952f, 0.9635685f, 1.2875274f, 0.8053419f, 0.7184521f, 0.95803297f})) + .B(reference_tests::Tensor(ET, {4 * 3}, std::vector(4 * 3, 0.f))) + .Ho(reference_tests::Tensor(ET, {2, 3}, std::vector{0.81457126f, 0.61109227f, 0.769522f, 0.52239674f, 0.4324641f, 0.63183f})) + .Co(reference_tests::Tensor(ET, {2, 3}, std::vector{1.4444952f, 0.9635685f, 1.2875274f, 0.8053419f, 0.7184521f, 0.95803297f})) .testcaseName("lstm_cell_zero_bias_default_attrs") }; return params; @@ -339,27 +339,27 @@ std::vector generateParamsBiasDefaultAttrs() { .inputSize(3) .hiddenSize(3) .gatesCount(4) - .X(Tensor(ET, {2, 3}, std::vector{ + .X(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.81342685f, 0.84108883f, 0.8152282f, 0.46893653f, 0.0901856f, 0.37088776f})) - .W(Tensor(ET, {4 * 3, 3}, std::vector{ + .W(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector{ 3.3330739e-01f, 3.6229487e-04f, 4.6773660e-01f, 4.3046016e-01f, 7.3950343e-02f, 3.8063636e-01f, 9.6921772e-01f, 9.6897459e-01f, 6.2964785e-01f, 3.1134409e-01f, 8.4709978e-01f, 9.4928098e-01f, 6.1676943e-01f, 6.6020679e-01f, 1.9072217e-01f, 8.8032126e-02f, 4.0472135e-01f, 6.8342745e-01f, 8.3432144e-01f, 4.4928190e-01f, 7.9524308e-01f, 5.3966165e-01f, 8.5936421e-01f, 8.3136767e-01f, 5.5125546e-02f, 4.7791195e-01f, 3.5788772e-01f, 6.7507404e-01f, 2.1716513e-01f, 2.7473119e-01f, 3.3999152e-02f, 9.6835363e-01f, 3.7581277e-01f, 2.4026000e-01f, 6.7418844e-01f, 3.4199652e-01f})) - .R(Tensor(ET, {4 * 3, 3}, std::vector{ + .R(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector{ 0.0987983f, 0.52032113f, 0.5848073f, 0.5356095f, 0.74497133f, 0.73260087f, 0.1700787f, 0.45684233f, 0.1495722f, 0.42734373f, 0.4433832f, 0.25906256f, 0.03854987f, 0.47480518f, 0.37215272f, 0.99890584f, 0.74019486f, 0.3518967f, 0.6881257f, 0.8170279f, 0.54088944f, 0.81225616f, 0.14619833f, 0.42941234f, 0.86843914f, 0.45967972f, 0.6237719f, 0.11074839f, 0.6029616f, 0.3149305f, 0.46504205f, 0.5843412f, 0.8733427f, 0.7687243f, 0.07074859f, 0.39188156f})) - .H_t(Tensor(ET, {2, 3}, std::vector{ + .H_t(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.77956f, 0.5331557f, 0.04297554f, 0.7962175f, 0.7635707f, 0.11989366f})) - .C_t(Tensor(ET, {2, 3}, std::vector{ + .C_t(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.8488452f, 0.18851636f, 0.5020695f, 0.29716516f, 0.06740791f, 0.45384037f})) - .B(Tensor(ET, {4 * 3}, std::vector{1.07393714f, + .B(reference_tests::Tensor(ET, {4 * 3}, std::vector{1.07393714f, 1.15248052f, 1.16671345f, 0.21450312f, @@ -371,13 +371,13 @@ std::vector generateParamsBiasDefaultAttrs() { 0.51022074f, 1.11389844f, 0.74174305f})) - .Ho(Tensor(ET, {2, 3}, std::vector{0.81014400720596313, + .Ho(reference_tests::Tensor(ET, {2, 3}, std::vector{0.81014400720596313, 0.76665538549423218, 0.82509011030197144, 0.6479143500328064, 0.66586339473724365, 0.74838578701019287})) - .Co(Tensor(ET, {2, 3}, std::vector{1.6800162792205811, + .Co(reference_tests::Tensor(ET, {2, 3}, std::vector{1.6800162792205811, 1.1150213479995728, 1.4578367471694946, 1.0649888515472412, @@ -412,27 +412,27 @@ std::vector generateParamsBiasClip() { .inputSize(3) .hiddenSize(3) .gatesCount(4) - .X(Tensor(ET, {2, 3}, std::vector{ + .X(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.81342685f, 0.84108883f, 0.8152282f, 0.46893653f, 0.0901856f, 0.37088776f})) - .W(Tensor(ET, {4 * 3, 3}, std::vector{ + .W(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector{ 3.3330739e-01f, 3.6229487e-04f, 4.6773660e-01f, 4.3046016e-01f, 7.3950343e-02f, 3.8063636e-01f, 9.6921772e-01f, 9.6897459e-01f, 6.2964785e-01f, 3.1134409e-01f, 8.4709978e-01f, 9.4928098e-01f, 6.1676943e-01f, 6.6020679e-01f, 1.9072217e-01f, 8.8032126e-02f, 4.0472135e-01f, 6.8342745e-01f, 8.3432144e-01f, 4.4928190e-01f, 7.9524308e-01f, 5.3966165e-01f, 8.5936421e-01f, 8.3136767e-01f, 5.5125546e-02f, 4.7791195e-01f, 3.5788772e-01f, 6.7507404e-01f, 2.1716513e-01f, 2.7473119e-01f, 3.3999152e-02f, 9.6835363e-01f, 3.7581277e-01f, 2.4026000e-01f, 6.7418844e-01f, 3.4199652e-01f})) - .R(Tensor(ET, {4 * 3, 3}, std::vector{ + .R(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector{ 0.0987983f, 0.52032113f, 0.5848073f, 0.5356095f, 0.74497133f, 0.73260087f, 0.1700787f, 0.45684233f, 0.1495722f, 0.42734373f, 0.4433832f, 0.25906256f, 0.03854987f, 0.47480518f, 0.37215272f, 0.99890584f, 0.74019486f, 0.3518967f, 0.6881257f, 0.8170279f, 0.54088944f, 0.81225616f, 0.14619833f, 0.42941234f, 0.86843914f, 0.45967972f, 0.6237719f, 0.11074839f, 0.6029616f, 0.3149305f, 0.46504205f, 0.5843412f, 0.8733427f, 0.7687243f, 0.07074859f, 0.39188156f})) - .H_t(Tensor(ET, {2, 3}, std::vector{ + .H_t(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.77956f, 0.5331557f, 0.04297554f, 0.7962175f, 0.7635707f, 0.11989366f})) - .C_t(Tensor(ET, {2, 3}, std::vector{ + .C_t(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.8488452f, 0.18851636f, 0.5020695f, 0.29716516f, 0.06740791f, 0.45384037f})) - .B(Tensor(ET, {4 * 3}, std::vector{1.07393714f, + .B(reference_tests::Tensor(ET, {4 * 3}, std::vector{1.07393714f, 1.15248052f, 1.16671345f, 0.21450312f, @@ -444,13 +444,13 @@ std::vector generateParamsBiasClip() { 0.51022074f, 1.11389844f, 0.74174305f})) - .Ho(Tensor(ET, {2, 3}, std::vector{0.81014400720596313, + .Ho(reference_tests::Tensor(ET, {2, 3}, std::vector{0.81014400720596313, 0.76665538549423218, 0.82387429475784302, 0.6479143500328064, 0.66586339473724365, 0.74838578701019287})) - .Co(Tensor(ET, {2, 3}, std::vector{1.6800162792205811, + .Co(reference_tests::Tensor(ET, {2, 3}, std::vector{1.6800162792205811, 1.1150213479995728, 1.4510968923568726, 1.0649888515472412, @@ -494,29 +494,29 @@ std::vector generateParamsV1() { .inputSize(3) .hiddenSize(3) .gatesCount(4) - .X(Tensor(ET, {2, 3}, std::vector{ + .X(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.81342685f, 0.84108883f, 0.8152282f, 0.46893653f, 0.0901856f, 0.37088776f})) - .W(Tensor(ET, {4 * 3, 3}, std::vector{ + .W(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector{ 3.3330739e-01f, 3.6229487e-04f, 4.6773660e-01f, 4.3046016e-01f, 7.3950343e-02f, 3.8063636e-01f, 9.6921772e-01f, 9.6897459e-01f, 6.2964785e-01f, 3.1134409e-01f, 8.4709978e-01f, 9.4928098e-01f, 6.1676943e-01f, 6.6020679e-01f, 1.9072217e-01f, 8.8032126e-02f, 4.0472135e-01f, 6.8342745e-01f, 8.3432144e-01f, 4.4928190e-01f, 7.9524308e-01f, 5.3966165e-01f, 8.5936421e-01f, 8.3136767e-01f, 5.5125546e-02f, 4.7791195e-01f, 3.5788772e-01f, 6.7507404e-01f, 2.1716513e-01f, 2.7473119e-01f, 3.3999152e-02f, 9.6835363e-01f, 3.7581277e-01f, 2.4026000e-01f, 6.7418844e-01f, 3.4199652e-01f})) - .R(Tensor(ET, {4 * 3, 3}, std::vector{ + .R(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector{ 0.0987983f, 0.52032113f, 0.5848073f, 0.5356095f, 0.74497133f, 0.73260087f, 0.1700787f, 0.45684233f, 0.1495722f, 0.42734373f, 0.4433832f, 0.25906256f, 0.03854987f, 0.47480518f, 0.37215272f, 0.99890584f, 0.74019486f, 0.3518967f, 0.6881257f, 0.8170279f, 0.54088944f, 0.81225616f, 0.14619833f, 0.42941234f, 0.86843914f, 0.45967972f, 0.6237719f, 0.11074839f, 0.6029616f, 0.3149305f, 0.46504205f, 0.5843412f, 0.8733427f, 0.7687243f, 0.07074859f, 0.39188156f})) - .H_t(Tensor(ET, {2, 3}, std::vector{ + .H_t(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.77956f, 0.5331557f, 0.04297554f, 0.7962175f, 0.7635707f, 0.11989366f})) - .C_t(Tensor(ET, {2, 3}, std::vector{ + .C_t(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.8488452f, 0.18851636f, 0.5020695f, 0.29716516f, 0.06740791f, 0.45384037f})) - .B(Tensor(ET, {4 * 3}, std::vector(4 * 3, 0.f))) - .Ho(Tensor(ET, {2, 3}, std::vector{0.81457126f, 0.61109227f, 0.769522f, 0.52239674f, 0.4324641f, 0.63183f})) - .Co(Tensor(ET, {2, 3}, std::vector{1.4444952f, 0.9635685f, 1.2875274f, 0.8053419f, 0.7184521f, 0.95803297f})) + .B(reference_tests::Tensor(ET, {4 * 3}, std::vector(4 * 3, 0.f))) + .Ho(reference_tests::Tensor(ET, {2, 3}, std::vector{0.81457126f, 0.61109227f, 0.769522f, 0.52239674f, 0.4324641f, 0.63183f})) + .Co(reference_tests::Tensor(ET, {2, 3}, std::vector{1.4444952f, 0.9635685f, 1.2875274f, 0.8053419f, 0.7184521f, 0.95803297f})) .testcaseName("lstm_cell_v1_zero_bias_default_attrs") }; return params; @@ -546,27 +546,27 @@ std::vector generateParamsBiasDefaultAttrsV1() { .inputSize(3) .hiddenSize(3) .gatesCount(4) - .X(Tensor(ET, {2, 3}, std::vector{ + .X(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.81342685f, 0.84108883f, 0.8152282f, 0.46893653f, 0.0901856f, 0.37088776f})) - .W(Tensor(ET, {4 * 3, 3}, std::vector{ + .W(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector{ 3.3330739e-01f, 3.6229487e-04f, 4.6773660e-01f, 4.3046016e-01f, 7.3950343e-02f, 3.8063636e-01f, 9.6921772e-01f, 9.6897459e-01f, 6.2964785e-01f, 3.1134409e-01f, 8.4709978e-01f, 9.4928098e-01f, 6.1676943e-01f, 6.6020679e-01f, 1.9072217e-01f, 8.8032126e-02f, 4.0472135e-01f, 6.8342745e-01f, 8.3432144e-01f, 4.4928190e-01f, 7.9524308e-01f, 5.3966165e-01f, 8.5936421e-01f, 8.3136767e-01f, 5.5125546e-02f, 4.7791195e-01f, 3.5788772e-01f, 6.7507404e-01f, 2.1716513e-01f, 2.7473119e-01f, 3.3999152e-02f, 9.6835363e-01f, 3.7581277e-01f, 2.4026000e-01f, 6.7418844e-01f, 3.4199652e-01f})) - .R(Tensor(ET, {4 * 3, 3}, std::vector{ + .R(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector{ 0.0987983f, 0.52032113f, 0.5848073f, 0.5356095f, 0.74497133f, 0.73260087f, 0.1700787f, 0.45684233f, 0.1495722f, 0.42734373f, 0.4433832f, 0.25906256f, 0.03854987f, 0.47480518f, 0.37215272f, 0.99890584f, 0.74019486f, 0.3518967f, 0.6881257f, 0.8170279f, 0.54088944f, 0.81225616f, 0.14619833f, 0.42941234f, 0.86843914f, 0.45967972f, 0.6237719f, 0.11074839f, 0.6029616f, 0.3149305f, 0.46504205f, 0.5843412f, 0.8733427f, 0.7687243f, 0.07074859f, 0.39188156f})) - .H_t(Tensor(ET, {2, 3}, std::vector{ + .H_t(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.77956f, 0.5331557f, 0.04297554f, 0.7962175f, 0.7635707f, 0.11989366f})) - .C_t(Tensor(ET, {2, 3}, std::vector{ + .C_t(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.8488452f, 0.18851636f, 0.5020695f, 0.29716516f, 0.06740791f, 0.45384037f})) - .B(Tensor(ET, {4 * 3}, std::vector{1.07393714f, + .B(reference_tests::Tensor(ET, {4 * 3}, std::vector{1.07393714f, 1.15248052f, 1.16671345f, 0.21450312f, @@ -578,13 +578,13 @@ std::vector generateParamsBiasDefaultAttrsV1() { 0.51022074f, 1.11389844f, 0.74174305f})) - .Ho(Tensor(ET, {2, 3}, std::vector{0.81014400720596313, + .Ho(reference_tests::Tensor(ET, {2, 3}, std::vector{0.81014400720596313, 0.76665538549423218, 0.82509011030197144, 0.6479143500328064, 0.66586339473724365, 0.74838578701019287})) - .Co(Tensor(ET, {2, 3}, std::vector{1.6800162792205811, + .Co(reference_tests::Tensor(ET, {2, 3}, std::vector{1.6800162792205811, 1.1150213479995728, 1.4578367471694946, 1.0649888515472412, @@ -619,27 +619,27 @@ std::vector generateParamsBiasClipV1() { .inputSize(3) .hiddenSize(3) .gatesCount(4) - .X(Tensor(ET, {2, 3}, std::vector{ + .X(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.81342685f, 0.84108883f, 0.8152282f, 0.46893653f, 0.0901856f, 0.37088776f})) - .W(Tensor(ET, {4 * 3, 3}, std::vector{ + .W(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector{ 3.3330739e-01f, 3.6229487e-04f, 4.6773660e-01f, 4.3046016e-01f, 7.3950343e-02f, 3.8063636e-01f, 9.6921772e-01f, 9.6897459e-01f, 6.2964785e-01f, 3.1134409e-01f, 8.4709978e-01f, 9.4928098e-01f, 6.1676943e-01f, 6.6020679e-01f, 1.9072217e-01f, 8.8032126e-02f, 4.0472135e-01f, 6.8342745e-01f, 8.3432144e-01f, 4.4928190e-01f, 7.9524308e-01f, 5.3966165e-01f, 8.5936421e-01f, 8.3136767e-01f, 5.5125546e-02f, 4.7791195e-01f, 3.5788772e-01f, 6.7507404e-01f, 2.1716513e-01f, 2.7473119e-01f, 3.3999152e-02f, 9.6835363e-01f, 3.7581277e-01f, 2.4026000e-01f, 6.7418844e-01f, 3.4199652e-01f})) - .R(Tensor(ET, {4 * 3, 3}, std::vector{ + .R(reference_tests::Tensor(ET, {4 * 3, 3}, std::vector{ 0.0987983f, 0.52032113f, 0.5848073f, 0.5356095f, 0.74497133f, 0.73260087f, 0.1700787f, 0.45684233f, 0.1495722f, 0.42734373f, 0.4433832f, 0.25906256f, 0.03854987f, 0.47480518f, 0.37215272f, 0.99890584f, 0.74019486f, 0.3518967f, 0.6881257f, 0.8170279f, 0.54088944f, 0.81225616f, 0.14619833f, 0.42941234f, 0.86843914f, 0.45967972f, 0.6237719f, 0.11074839f, 0.6029616f, 0.3149305f, 0.46504205f, 0.5843412f, 0.8733427f, 0.7687243f, 0.07074859f, 0.39188156f})) - .H_t(Tensor(ET, {2, 3}, std::vector{ + .H_t(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.77956f, 0.5331557f, 0.04297554f, 0.7962175f, 0.7635707f, 0.11989366f})) - .C_t(Tensor(ET, {2, 3}, std::vector{ + .C_t(reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.8488452f, 0.18851636f, 0.5020695f, 0.29716516f, 0.06740791f, 0.45384037f})) - .B(Tensor(ET, {4 * 3}, std::vector{1.07393714f, + .B(reference_tests::Tensor(ET, {4 * 3}, std::vector{1.07393714f, 1.15248052f, 1.16671345f, 0.21450312f, @@ -651,13 +651,13 @@ std::vector generateParamsBiasClipV1() { 0.51022074f, 1.11389844f, 0.74174305f})) - .Ho(Tensor(ET, {2, 3}, std::vector{0.81014400720596313, + .Ho(reference_tests::Tensor(ET, {2, 3}, std::vector{0.81014400720596313, 0.76665538549423218, 0.82387429475784302, 0.6479143500328064, 0.66586339473724365, 0.74838578701019287})) - .Co(Tensor(ET, {2, 3}, std::vector{1.6800162792205811, + .Co(reference_tests::Tensor(ET, {2, 3}, std::vector{1.6800162792205811, 1.1150213479995728, 1.4510968923568726, 1.0649888515472412, diff --git a/docs/template_plugin/tests/functional/op_reference/matmul.cpp b/docs/template_plugin/tests/functional/op_reference/matmul.cpp index a1f000e18ca..dcd4d413df5 100644 --- a/docs/template_plugin/tests/functional/op_reference/matmul.cpp +++ b/docs/template_plugin/tests/functional/op_reference/matmul.cpp @@ -77,9 +77,9 @@ struct MatMulParams { element::Type_t m_input_type1; element::Type_t m_input_type2; element::Type_t m_expected_type; - runtime::Tensor m_input_value1; - runtime::Tensor m_input_value2; - runtime::Tensor m_expected_value; + ov::Tensor m_input_value1; + ov::Tensor m_input_value2; + ov::Tensor m_expected_value; bool m_transpose1; bool m_transpose2; bool m_use_constant; diff --git a/docs/template_plugin/tests/functional/op_reference/matrix_nms.cpp b/docs/template_plugin/tests/functional/op_reference/matrix_nms.cpp index b71ec642338..2d4c9290b77 100644 --- a/docs/template_plugin/tests/functional/op_reference/matrix_nms.cpp +++ b/docs/template_plugin/tests/functional/op_reference/matrix_nms.cpp @@ -15,20 +15,20 @@ namespace { struct MatrixNmsParams { MatrixNmsParams( const opset8::MatrixNms::Attributes& attrs, - const Tensor& boxes, const Tensor& scores, - const Tensor& expectedSelectedScores, const Tensor& expectedSelectedIndices, - const Tensor& expectedValidOutputs, const std::string& testcaseName = "") : + const reference_tests::Tensor& boxes, const reference_tests::Tensor& scores, + const reference_tests::Tensor& expectedSelectedScores, const reference_tests::Tensor& expectedSelectedIndices, + const reference_tests::Tensor& expectedValidOutputs, const std::string& testcaseName = "") : attrs(attrs), boxes(boxes), scores(scores), expectedSelectedScores(expectedSelectedScores), expectedSelectedIndices(expectedSelectedIndices), expectedValidOutputs(expectedValidOutputs), testcaseName(testcaseName) {} opset8::MatrixNms::Attributes attrs; - Tensor boxes; - Tensor scores; - Tensor expectedSelectedScores; - Tensor expectedSelectedIndices; - Tensor expectedValidOutputs; + reference_tests::Tensor boxes; + reference_tests::Tensor scores; + reference_tests::Tensor expectedSelectedScores; + reference_tests::Tensor expectedSelectedIndices; + reference_tests::Tensor expectedValidOutputs; std::string testcaseName; }; @@ -98,16 +98,16 @@ std::vector generateParams() { 0.0f, // post_threshold true, // normalized }, - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {1, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {3, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {3, 6}, std::vector{ 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.8, 0.00, 10.00, 1.00, 11.00, 1.00, 0.13636364, 0.0, 0.1, 1.0, 1.1}), // expected_selected_scores - Tensor(ET_IND, {3, 1}, std::vector{0, 3, 1}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{3}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {3, 1}, std::vector{0, 3, 1}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{3}), // expected_valid_outputs "matrix_nms_output_type_i64"), MatrixNmsParams( { @@ -123,16 +123,16 @@ std::vector generateParams() { 0.0f, // post_threshold true, // normalized }, - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {1, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {3, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {3, 6}, std::vector{ 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.8, 0.00, 10.00, 1.00, 11.00, 1.00, 0.13636364, 0.0, 0.1, 1.0, 1.1}), // expected_selected_scores - Tensor(ET_IND, {3, 1}, std::vector{0, 3, 1}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{3}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {3, 1}, std::vector{0, 3, 1}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{3}), // expected_valid_outputs "matrix_nms_output_type_i32"), MatrixNmsParams( { @@ -148,16 +148,16 @@ std::vector generateParams() { 0.0f, // post_threshold true, // normalized }, - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {1, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {3, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {3, 6}, std::vector{ 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.8, 0.00, 10.00, 1.00, 11.00, 1.00, 0.1966116, 0.0, 0.1, 1.0, 1.1}), // expected_selected_scores - Tensor(ET_IND, {3, 1}, std::vector{0, 3, 1}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{3}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {3, 1}, std::vector{0, 3, 1}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{3}), // expected_valid_outputs "matrix_nms_gaussian"), MatrixNmsParams( { @@ -173,20 +173,20 @@ std::vector generateParams() { 0.0f, // post_threshold true, // normalized }, - Tensor(ET, {2, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {2, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {6, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {6, 6}, std::vector{ 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.8, 0.00, 10.00, 1.00, 11.00, 1.00, 0.13636364, 0.0, 0.1, 1.0, 1.1, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.8, 0.00, 10.00, 1.00, 11.00, 1.00, 0.13636364, 0.0, 0.1, 1.0, 1.1}), // expected_selected_scores - Tensor(ET_IND, {6, 1}, std::vector{0, 3, 1, 6, 9, 7}), // expected_selected_indices - Tensor(ET_IND, {2}, std::vector{3, 3}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {6, 1}, std::vector{0, 3, 1, 6, 9, 7}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {2}, std::vector{3, 3}), // expected_valid_outputs "matrix_nms_two_batches_two_classes"), MatrixNmsParams( { @@ -202,15 +202,15 @@ std::vector generateParams() { 0.5f, // post_threshold true, // normalized }, - Tensor(ET, {2, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {2, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {8, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {8, 6}, std::vector{ 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, @@ -219,8 +219,8 @@ std::vector generateParams() { 0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores - Tensor(ET_IND, {8, 1}, std::vector{3, 0, 9, 6, 0, 6, 3, 9}), // expected_selected_indices - Tensor(ET_IND, {2}, std::vector{4, 4}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {8, 1}, std::vector{3, 0, 9, 6, 0, 6, 3, 9}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {2}, std::vector{4, 4}), // expected_valid_outputs "matrix_nms_two_batches_two_classes_by_score_cross_batch"), MatrixNmsParams( { @@ -236,15 +236,15 @@ std::vector generateParams() { 0.5f, // post_threshold true, // normalized }, - Tensor(ET, {2, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {2, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {8, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {8, 6}, std::vector{ 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, @@ -253,8 +253,8 @@ std::vector generateParams() { 1.00, 0.80, 0.00, 10.00, 1.00, 11.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores - Tensor(ET_IND, {8, 1}, std::vector{3, 0, 9, 6, 0, 3, 6, 9}), // expected_selected_indices - Tensor(ET_IND, {2}, std::vector{4, 4}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {8, 1}, std::vector{3, 0, 9, 6, 0, 3, 6, 9}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {2}, std::vector{4, 4}), // expected_valid_outputs "matrix_nms_two_batches_two_classes_by_classid_cross_batch"), MatrixNmsParams( { @@ -270,20 +270,20 @@ std::vector generateParams() { 0.0f, // post_threshold true, // normalized }, - Tensor(ET, {2, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {2, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {6, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {6, 6}, std::vector{ 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.8, 0.00, 10.00, 1.00, 11.00, 1.00, 0.13636364, 0.0, 0.1, 1.0, 1.1, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.8, 0.00, 10.00, 1.00, 11.00, 1.00, 0.13636364, 0.0, 0.1, 1.0, 1.1}), // expected_selected_scores - Tensor(ET_IND, {6, 1}, std::vector{0, 3, 1, 6, 9, 7}), // expected_selected_indices - Tensor(ET_IND, {2}, std::vector{3, 3}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {6, 1}, std::vector{0, 3, 1, 6, 9, 7}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {2}, std::vector{3, 3}), // expected_valid_outputs "matrix_nms_by_keep_top_k"), MatrixNmsParams( { @@ -299,17 +299,17 @@ std::vector generateParams() { 0.0f, // post_threshold true, // normalized }, - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {1, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {6, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {6, 6}, std::vector{ 0.00, 0.95, 0.0, 10.0, 1.0, 11.0, 1.00, 0.95, 0.0, 0.0, 1.0, 1.0, 0.00, 0.9, 0.0, 0.0, 1.0, 1.0, 1.00, 0.8, 0.0, 10.0, 1.0, 11.0, 0.00, 0.13636364, 0.0, 0.1, 1.0, 1.1, 1.00, 0.13636364, 0.0, 0.1, 1.0, 1.1}), // expected_selected_scores - Tensor(ET_IND, {6, 1}, std::vector{3, 0, 0, 3, 1, 1}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{6}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {6, 1}, std::vector{3, 0, 0, 3, 1, 1}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{6}), // expected_valid_outputs "matrix_nms_background"), MatrixNmsParams( { @@ -325,16 +325,16 @@ std::vector generateParams() { 0.0f, // post_threshold true, // normalized }, - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 1.0, 1.0, 0.0, 0.0, 0.0, 0.1, 1.0, 1.1, 0.0, 0.9, 1.0, -0.1, 0.0, 10.0, 1.0, 11.0, 1.0, 10.1, 0.0, 11.1, 1.0, 101.0, 0.0, 100.0}), // boxes - Tensor(ET_TH, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), // scores - Tensor(ET_TH, {3, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {3, 6}, std::vector{ 0.00, 0.95, 0.0, 10.0, 1.0, 11.0, 0.00, 0.9, 1.0, 1.0, 0.0, 0.0, 0.00, 0.75, 0.0, 0.1, 1.0, 1.1}), // expected_selected_scores - Tensor(ET_IND, {3, 1}, std::vector{3, 0, 1}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{3}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {3, 1}, std::vector{3, 0, 1}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{3}), // expected_valid_outputs "matrix_nms_flipped_coordinates"), MatrixNmsParams( { @@ -350,16 +350,16 @@ std::vector generateParams() { 0.8f, // post_threshold true, // normalized }, - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), // scores - Tensor(ET_TH, {2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {2, 6}, std::vector{ 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.9, 0.00, 0.00, 1.00, 1.00}), // expected_selected_scores - Tensor(ET_IND, {2, 1}, std::vector{3, 0}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{2}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {2, 1}, std::vector{3, 0}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{2}), // expected_valid_outputs "matrix_nms_post_threshold"), MatrixNmsParams( { @@ -375,16 +375,16 @@ std::vector generateParams() { 0.3f, // post_threshold true, // normalized }, - Tensor(ET, {1, 10, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 10, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0}), // boxes - Tensor(ET_TH, {1, 1, 10}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 1, 10}, std::vector{ 0.4, 0.01, 0.2, 0.09, 0.15, 0.05, 0.02, 0.03, 0.05, 0.0}), // scores - Tensor(ET_TH, {1, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 6}, std::vector{ 0.00, 0.40, 0.00, 0.00, 1.00, 1.00}), // expected_selected_scores - Tensor(ET_IND, {1, 1}, std::vector{0}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{1}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {1, 1}, std::vector{0}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{1}), // expected_valid_outputs "matrix_nms_identical_boxes"), MatrixNmsParams( { @@ -400,16 +400,16 @@ std::vector generateParams() { 0.0f, // post_threshold true, // normalized }, - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), // scores - Tensor(ET_TH, {2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {2, 6}, std::vector{ 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00}), // expected_selected_scores - Tensor(ET_IND, {2, 1}, std::vector{3, 0}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{2}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {2, 1}, std::vector{3, 0}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{2}), // expected_valid_outputs "matrix_nms_nms_top_k"), MatrixNmsParams( { @@ -425,12 +425,12 @@ std::vector generateParams() { 0.0f, // post_threshold true, // normalized }, - Tensor(ET, {1, 1, 4}, std::vector{0.0, 0.0, 1.0, 1.0}), // boxes - Tensor(ET_TH, {1, 1, 1}, std::vector{0.9}), // scores - Tensor(ET_TH, {1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 4}, std::vector{0.0, 0.0, 1.0, 1.0}), // boxes + reference_tests::Tensor(ET_TH, {1, 1, 1}, std::vector{0.9}), // scores + reference_tests::Tensor(ET_TH, {1, 6}, std::vector{ 0.00, 0.90, 0.00, 0.00, 1.00, 1.00}), // expected_selected_scores - Tensor(ET_IND, {1, 1}, std::vector{0}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{1}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {1, 1}, std::vector{0}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{1}), // expected_valid_outputs "matrix_nms_single_box"), MatrixNmsParams( { @@ -446,14 +446,14 @@ std::vector generateParams() { 0.0f, // post_threshold true, // normalized }, - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), // scores - Tensor(ET_TH, {0, 6}, std::vector{}), // expected_selected_scores - Tensor(ET_IND, {0, 1}, std::vector{}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{0}), // expected_valid_outputs + reference_tests::Tensor(ET_TH, {0, 6}, std::vector{}), // expected_selected_scores + reference_tests::Tensor(ET_IND, {0, 1}, std::vector{}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{0}), // expected_valid_outputs "matrix_nms_no_output"), }; return params; diff --git a/docs/template_plugin/tests/functional/op_reference/max_pool.cpp b/docs/template_plugin/tests/functional/op_reference/max_pool.cpp index 1d6c5066c0f..43a352c87c4 100644 --- a/docs/template_plugin/tests/functional/op_reference/max_pool.cpp +++ b/docs/template_plugin/tests/functional/op_reference/max_pool.cpp @@ -41,9 +41,9 @@ struct MaxPoolParams { Shape m_input_shape; element::Type m_input_type; element::Type m_indices_type; - ov::runtime::Tensor m_input_data; - ov::runtime::Tensor m_expected_values; - ov::runtime::Tensor m_expected_indices; + ov::Tensor m_input_data; + ov::Tensor m_expected_values; + ov::Tensor m_expected_indices; Strides m_strides; Strides m_dilations; Shape m_pads_begin; diff --git a/docs/template_plugin/tests/functional/op_reference/maximum.cpp b/docs/template_plugin/tests/functional/op_reference/maximum.cpp index 4c1e522569e..8ea407ce1bf 100644 --- a/docs/template_plugin/tests/functional/op_reference/maximum.cpp +++ b/docs/template_plugin/tests/functional/op_reference/maximum.cpp @@ -31,9 +31,9 @@ struct MaximumParams { PartialShape pshape2; element::Type inType; element::Type outType; - runtime::Tensor inputData1; - runtime::Tensor inputData2; - runtime::Tensor refData; + ov::Tensor inputData1; + ov::Tensor inputData2; + ov::Tensor refData; }; class ReferenceMaximumLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/minimum.cpp b/docs/template_plugin/tests/functional/op_reference/minimum.cpp index 2ce22625dbc..693d06dfe81 100644 --- a/docs/template_plugin/tests/functional/op_reference/minimum.cpp +++ b/docs/template_plugin/tests/functional/op_reference/minimum.cpp @@ -25,9 +25,9 @@ struct MinimumParams { PartialShape pshape; element::Type inType; element::Type outType; - ov::runtime::Tensor inputData1; - ov::runtime::Tensor inputData2; - ov::runtime::Tensor refData; + ov::Tensor inputData1; + ov::Tensor inputData2; + ov::Tensor refData; }; class ReferenceMinimumLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/mish.cpp b/docs/template_plugin/tests/functional/op_reference/mish.cpp index 610195bd418..8134e0c4d8f 100644 --- a/docs/template_plugin/tests/functional/op_reference/mish.cpp +++ b/docs/template_plugin/tests/functional/op_reference/mish.cpp @@ -29,8 +29,8 @@ struct MishParams { ov::PartialShape inputShape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; std::string testcaseName; }; diff --git a/docs/template_plugin/tests/functional/op_reference/mod.cpp b/docs/template_plugin/tests/functional/op_reference/mod.cpp index 3634173ea7c..3091f845092 100644 --- a/docs/template_plugin/tests/functional/op_reference/mod.cpp +++ b/docs/template_plugin/tests/functional/op_reference/mod.cpp @@ -31,9 +31,9 @@ struct ModParams { PartialShape pshape2; element::Type inType; element::Type outType; - runtime::Tensor inputData1; - runtime::Tensor inputData2; - runtime::Tensor refData; + ov::Tensor inputData1; + ov::Tensor inputData2; + ov::Tensor refData; }; class ReferenceModLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/multiclass_nms.cpp b/docs/template_plugin/tests/functional/op_reference/multiclass_nms.cpp index c7075e6ce5f..21544981a27 100644 --- a/docs/template_plugin/tests/functional/op_reference/multiclass_nms.cpp +++ b/docs/template_plugin/tests/functional/op_reference/multiclass_nms.cpp @@ -23,9 +23,9 @@ struct MulticlassNmsParams { const ov::element::Type output_type, const bool sort_result_across_batch, const bool normalized, - const Tensor& boxes, const Tensor& scores, - const Tensor& expectedSelectedScores, const Tensor& expectedSelectedIndices, - const Tensor& expectedValidOutputs, const std::string& testcaseName = "") : + const reference_tests::Tensor& boxes, const reference_tests::Tensor& scores, + const reference_tests::Tensor& expectedSelectedScores, const reference_tests::Tensor& expectedSelectedIndices, + const reference_tests::Tensor& expectedValidOutputs, const std::string& testcaseName = "") : nms_top_k(nms_top_k), iou_threshold(iou_threshold), score_threshold(score_threshold), @@ -52,11 +52,11 @@ struct MulticlassNmsParams { bool sort_result_across_batch = false; bool normalized = true; - Tensor boxes; - Tensor scores; - Tensor expectedSelectedScores; - Tensor expectedSelectedIndices; - Tensor expectedValidOutputs; + reference_tests::Tensor boxes; + reference_tests::Tensor scores; + reference_tests::Tensor expectedSelectedScores; + reference_tests::Tensor expectedSelectedIndices; + reference_tests::Tensor expectedValidOutputs; std::string testcaseName; }; @@ -134,17 +134,17 @@ std::vector generateParams() { ET_IND, // output_type false, // sort_result_across_batch true, // normalized - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {1, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {4, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {4, 6}, std::vector{ 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores - Tensor(ET_IND, {4, 1}, std::vector{3, 0, 0, 3}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{4}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {4, 1}, std::vector{3, 0, 0, 3}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{4}), // expected_valid_outputs "multiclass_nms_by_score"), MulticlassNmsParams( 3, // nms_top_k @@ -157,17 +157,17 @@ std::vector generateParams() { ET_IND, // output_type false, // sort_result_across_batch true, // normalized - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {1, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {4, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {4, 6}, std::vector{ 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores - Tensor(ET_IND, {4, 1}, std::vector{3, 0, 0, 3}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{4}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {4, 1}, std::vector{3, 0, 0, 3}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{4}), // expected_valid_outputs "multiclass_nms_by_class_id"), MulticlassNmsParams( 3, // nms_top_k @@ -180,17 +180,17 @@ std::vector generateParams() { ET_IND, // output_type false, // sort_result_across_batch true, // normalized - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {1, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {4, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {4, 6}, std::vector{ 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores - Tensor(ET_IND, {4, 1}, std::vector{3, 0, 0, 3}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{4}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {4, 1}, std::vector{3, 0, 0, 3}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{4}), // expected_valid_outputs "multiclass_nms_output_type_i32"), MulticlassNmsParams( 3, // nms_top_k @@ -203,22 +203,22 @@ std::vector generateParams() { ET_IND, // output_type false, // sort_result_across_batch true, // normalized - Tensor(ET, {2, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {2, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {8, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {8, 6}, std::vector{ 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00, 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores - Tensor(ET_IND, {8, 1}, std::vector{3, 0, 0, 3, 9, 6, 6, 9}), // expected_selected_indices - Tensor(ET_IND, {2}, std::vector{4, 4}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {8, 1}, std::vector{3, 0, 0, 3, 9, 6, 6, 9}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {2}, std::vector{4, 4}), // expected_valid_outputs "multiclass_nms_two_batches_two_classes_by_score"), MulticlassNmsParams( 3, // nms_top_k @@ -231,22 +231,22 @@ std::vector generateParams() { ET_IND, // output_type false, // sort_result_across_batch true, // normalized - Tensor(ET, {2, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {2, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {8, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {8, 6}, std::vector{ 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00, 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores - Tensor(ET_IND, {8, 1}, std::vector{3, 0, 0, 3, 9, 6, 6, 9}), // expected_selected_indices - Tensor(ET_IND, {2}, std::vector{4, 4}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {8, 1}, std::vector{3, 0, 0, 3, 9, 6, 6, 9}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {2}, std::vector{4, 4}), // expected_valid_outputs "multiclass_nms_two_batches_two_classes_by_class_id"), MulticlassNmsParams( 3, // nms_top_k @@ -259,15 +259,15 @@ std::vector generateParams() { ET_IND, // output_type true, // sort_result_across_batch true, // normalized - Tensor(ET, {2, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {2, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {8, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {8, 6}, std::vector{ 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, @@ -276,8 +276,8 @@ std::vector generateParams() { 0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores - Tensor(ET_IND, {8, 1}, std::vector{3, 0, 9, 6, 0, 6, 3, 9}), // expected_selected_indices - Tensor(ET_IND, {2}, std::vector{4, 4}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {8, 1}, std::vector{3, 0, 9, 6, 0, 6, 3, 9}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {2}, std::vector{4, 4}), // expected_valid_outputs "multiclass_nms_two_batches_two_classes_by_score_cross_batch"), MulticlassNmsParams( 3, // nms_top_k @@ -290,15 +290,15 @@ std::vector generateParams() { ET_IND, // output_type true, // sort_result_across_batch true, // normalized - Tensor(ET, {2, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {2, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {8, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {8, 6}, std::vector{ 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, @@ -307,8 +307,8 @@ std::vector generateParams() { 1.00, 0.80, 0.00, 10.00, 1.00, 11.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores - Tensor(ET_IND, {8, 1}, std::vector{3, 0, 9, 6, 0, 3, 6, 9}), // expected_selected_indices - Tensor(ET_IND, {2}, std::vector{4, 4}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {8, 1}, std::vector{3, 0, 9, 6, 0, 3, 6, 9}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {2}, std::vector{4, 4}), // expected_valid_outputs "multiclass_nms_two_batches_two_classes_by_class_id_cross_batch"), MulticlassNmsParams( 3, // nms_top_k @@ -321,16 +321,16 @@ std::vector generateParams() { ET_IND, // output_type false, // sort_result_across_batch true, // normalized - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 1.0, 1.0, 0.0, 0.0, 0.0, 0.1, 1.0, 1.1, 0.0, 0.9, 1.0, -0.1, 0.0, 10.0, 1.0, 11.0, 1.0, 10.1, 0.0, 11.1, 1.0, 101.0, 0.0, 100.0}), // boxes - Tensor(ET_TH, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), // scores - Tensor(ET_TH, {3, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {3, 6}, std::vector{ 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 1.00, 1.00, 0.00, 0.00, 0.00, 0.75, 0.00, 0.10, 1.00, 1.10}), // expected_selected_scores - Tensor(ET_IND, {3, 1}, std::vector{3, 0, 1}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{3}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {3, 1}, std::vector{3, 0, 1}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{3}), // expected_valid_outputs "multiclass_nms_flipped_coordinates"), MulticlassNmsParams( 3, // nms_top_k @@ -343,17 +343,17 @@ std::vector generateParams() { ET_IND, // output_type false, // sort_result_across_batch true, // normalized - Tensor(ET, {1, 10, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 10, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0}), // boxes - Tensor(ET_TH, {1, 1, 10}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 1, 10}, std::vector{ 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9}), // scores - Tensor(ET_TH, {1, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 6}, std::vector{ 0.00, 0.90, 0.00, 0.00, 1.00, 1.00}), // expected_selected_scores - Tensor(ET_IND, {1, 1}, std::vector{0}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{1}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {1, 1}, std::vector{0}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{1}), // expected_valid_outputs "multiclass_nms_identical_boxes"), MulticlassNmsParams( 2, // nms_top_k @@ -366,16 +366,16 @@ std::vector generateParams() { ET_IND, // output_type false, // sort_result_across_batch true, // normalized - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), // scores - Tensor(ET_TH, {2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {2, 6}, std::vector{ 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00}), // expected_selected_scores - Tensor(ET_IND, {2, 1}, std::vector{3, 0}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{2}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {2, 1}, std::vector{3, 0}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{2}), // expected_valid_outputs "multiclass_nms_limit_output_size"), MulticlassNmsParams( 3, // nms_top_k @@ -388,12 +388,12 @@ std::vector generateParams() { ET_IND, // output_type false, // sort_result_across_batch true, // normalized - Tensor(ET, {1, 1, 4}, std::vector{0.0, 0.0, 1.0, 1.0}), // boxes - Tensor(ET_TH, {1, 1, 1}, std::vector{0.9}), // scores - Tensor(ET_TH, {1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 4}, std::vector{0.0, 0.0, 1.0, 1.0}), // boxes + reference_tests::Tensor(ET_TH, {1, 1, 1}, std::vector{0.9}), // scores + reference_tests::Tensor(ET_TH, {1, 6}, std::vector{ 0.00, 0.90, 0.00, 0.00, 1.00, 1.00}), // expected_selected_scores - Tensor(ET_IND, {1, 1}, std::vector{0}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{1}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {1, 1}, std::vector{0}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{1}), // expected_valid_outputs "multiclass_nms_single_box"), MulticlassNmsParams( 3, // nms_top_k @@ -406,16 +406,16 @@ std::vector generateParams() { ET_IND, // output_type false, // sort_result_across_batch true, // normalized - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), // scores - Tensor(ET_TH, {2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {2, 6}, std::vector{ 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00}), // expected_selected_scores - Tensor(ET_IND, {2, 1}, std::vector{3, 0}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{2}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {2, 1}, std::vector{3, 0}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{2}), // expected_valid_outputs "multiclass_nms_by_IOU"), MulticlassNmsParams( 3, // nms_top_k @@ -428,15 +428,15 @@ std::vector generateParams() { ET_IND, // output_type false, // sort_result_across_batch true, // normalized - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.96, 0.5, 0.3}), // scores - Tensor(ET_TH, {1, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 6}, std::vector{ 0.00, 0.96, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores - Tensor(ET_IND, {1, 1}, std::vector{3}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{1}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {1, 1}, std::vector{3}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{1}), // expected_valid_outputs "multiclass_nms_by_IOU_and_scores"), MulticlassNmsParams( 3, // nms_top_k @@ -449,14 +449,14 @@ std::vector generateParams() { ET_IND, // output_type false, // sort_result_across_batch true, // normalized - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3}), // scores - Tensor(ET_TH, {0, 6}, std::vector{}), // expected_selected_scores - Tensor(ET_IND, {0, 1}, std::vector{}), // expected_selected_indices - Tensor(ET_IND, {1}, std::vector{0}), // expected_valid_outputs + reference_tests::Tensor(ET_TH, {0, 6}, std::vector{}), // expected_selected_scores + reference_tests::Tensor(ET_IND, {0, 1}, std::vector{}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {1}, std::vector{0}), // expected_valid_outputs "multiclass_nms_no_output"), MulticlassNmsParams( 3, // nms_top_k @@ -469,20 +469,20 @@ std::vector generateParams() { ET_IND, // output_type false, // sort_result_across_batch true, // normalized - Tensor(ET, {2, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {2, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {4, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {4, 6}, std::vector{ 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00}), // expected_selected_scores - Tensor(ET_IND, {4, 1}, std::vector{0, 3, 6, 9}), // expected_selected_indices - Tensor(ET_IND, {2}, std::vector{2, 2}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {4, 1}, std::vector{0, 3, 6, 9}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {2}, std::vector{2, 2}), // expected_valid_outputs "multiclass_nms_by_background"), MulticlassNmsParams( 3, // nms_top_k @@ -495,21 +495,21 @@ std::vector generateParams() { ET_IND, // output_type false, // sort_result_across_batch true, // normalized - Tensor(ET, {2, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {2, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {6, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {6, 6}, std::vector{ 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00}), // expected_selected_scores - Tensor(ET_IND, {6, 1}, std::vector{3, 0, 0, 9, 6, 6}), // expected_selected_indices - Tensor(ET_IND, {2}, std::vector{3, 3}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {6, 1}, std::vector{3, 0, 0, 9, 6, 6}), // expected_selected_indices + reference_tests::Tensor(ET_IND, {2}, std::vector{3, 3}), // expected_valid_outputs "multiclass_nms_by_keep_top_k"), MulticlassNmsParams( -1, // nms_top_k @@ -522,24 +522,24 @@ std::vector generateParams() { ET_IND, // output_type false, // sort_result_across_batch true, // normalized - Tensor(ET, {2, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0}), // boxes - Tensor(ET_TH, {2, 2, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {2, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.95, 0.75, 0.6, 0.80, 0.5, 0.3}), // scores - Tensor(ET_TH, {12, 6}, std::vector{ + reference_tests::Tensor(ET_TH, {12, 6}, std::vector{ 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 0.00, 0.30, 0.00, 100.00, 1.00, 101.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00, 1.00, 0.30, 0.00, 100.00, 1.00, 101.00, 0.00, 0.95, 0.00, 10.00, 1.00, 11.00, 0.00, 0.90, 0.00, 0.00, 1.00, 1.00, 0.00, 0.30, 0.00, 100.00, 1.00, 101.00, 1.00, 0.95, 0.00, 0.00, 1.00, 1.00, 1.00, 0.80, 0.00, 10.00, 1.00, 11.00, 1.00, 0.30, 0.00, 100.00, 1.00, 101.00}), // expected_selected_scores - Tensor(ET_IND, {12, 1}, std::vector{ + reference_tests::Tensor(ET_IND, {12, 1}, std::vector{ 3, 0, 5, 0, 3, 5, 9, 6, 11, 6, 9, 11}), // expected_selected_indices - Tensor(ET_IND, {2}, std::vector{6, 6}), // expected_valid_outputs + reference_tests::Tensor(ET_IND, {2}, std::vector{6, 6}), // expected_valid_outputs "multiclass_nms_by_nms_eta"), }; return params; diff --git a/docs/template_plugin/tests/functional/op_reference/multiply.cpp b/docs/template_plugin/tests/functional/op_reference/multiply.cpp index 6410a039443..5d1dbde341f 100644 --- a/docs/template_plugin/tests/functional/op_reference/multiply.cpp +++ b/docs/template_plugin/tests/functional/op_reference/multiply.cpp @@ -31,9 +31,9 @@ struct MultiplyParams { PartialShape pshape2; element::Type inType; element::Type outType; - runtime::Tensor inputData1; - runtime::Tensor inputData2; - runtime::Tensor refData; + ov::Tensor inputData1; + ov::Tensor inputData2; + ov::Tensor refData; }; class ReferenceMultiplyLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/mvn.cpp b/docs/template_plugin/tests/functional/op_reference/mvn.cpp index a381e0749de..f57a5f2d70d 100644 --- a/docs/template_plugin/tests/functional/op_reference/mvn.cpp +++ b/docs/template_plugin/tests/functional/op_reference/mvn.cpp @@ -14,20 +14,20 @@ using namespace reference_tests; // ------------------------------ V0 ------------------------------ struct MVN1Params { - MVN1Params(const Tensor& paramInput, const ngraph::AxisSet& paramReductionAxes, const bool paramAcrossChannels, const bool paramNormalizeVariance, - const double paramEps, const Tensor& paramExpected) + MVN1Params(const reference_tests::Tensor& paramInput, const ngraph::AxisSet& paramReductionAxes, const bool paramAcrossChannels, const bool paramNormalizeVariance, + const double paramEps, const reference_tests::Tensor& paramExpected) : input(paramInput), reductionAxes(paramReductionAxes), acrossChannels(paramAcrossChannels), normalizeVariance(paramNormalizeVariance), eps(paramEps), expected(paramExpected) {} - Tensor input; + reference_tests::Tensor input; ngraph::AxisSet reductionAxes; bool acrossChannels; bool normalizeVariance; double eps; - Tensor expected; + reference_tests::Tensor expected; }; class ReferenceMVN1LayerTest : public testing::TestWithParam, public CommonReferenceTest { @@ -54,7 +54,7 @@ public: } private: - static std::shared_ptr CreateFunction(const Tensor& input, const ngraph::AxisSet& reductionAxes, const bool acrossChannels, + static std::shared_ptr CreateFunction(const reference_tests::Tensor& input, const ngraph::AxisSet& reductionAxes, const bool acrossChannels, const bool normalizeVariance, const double eps) { const auto in = std::make_shared(input.type, input.shape); auto mvn = std::make_shared(in, acrossChannels, normalizeVariance, eps); @@ -75,62 +75,62 @@ INSTANTIATE_TEST_SUITE_P( smoke_MVN1_With_Hardcoded_Refs, ReferenceMVN1LayerTest, ::testing::Values( // across_channels=false, variance=false - MVN1Params(Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, + MVN1Params(reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9}}, emptyReductionAxes, false, false, 1e-9, - Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {-4, -3, -2, -1, 0, 1, 2, 3, 4, -4, -3, -2, -1, 0, + reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {-4, -3, -2, -1, 0, 1, 2, 3, 4, -4, -3, -2, -1, 0, 1, 2, 3, 4, -4, -3, -2, -1, 0, 1, 2, 3, 4}}), // across_channels=true, variance=false MVN1Params( - Tensor {{1, 3, 2, 2}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3}}, + reference_tests::Tensor {{1, 3, 2, 2}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3}}, emptyReductionAxes, true, false, 1e-9, - Tensor {{1, 3, 2, 2}, ov::element::f32, std::vector {-3.25, -2.25, -1.25, -0.25, 0.75, 1.75, 2.75, 3.75, 4.75, -3.25, -2.25, -1.25}}), + reference_tests::Tensor {{1, 3, 2, 2}, ov::element::f32, std::vector {-3.25, -2.25, -1.25, -0.25, 0.75, 1.75, 2.75, 3.75, 4.75, -3.25, -2.25, -1.25}}), // across_channels=false, variance=true - MVN1Params(Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, + MVN1Params(reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9}}, emptyReductionAxes, false, true, 1e-9, - Tensor {{1, 3, 3, 3}, + reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934, -1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934, -1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934}}), // across_channels=true, variance=true - MVN1Params(Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, + MVN1Params(reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9}}, emptyReductionAxes, true, true, 1e-9, - Tensor {{1, 3, 3, 3}, + reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934, -1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934, -1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934}}), // reductionAxes, variance=false MVN1Params( - Tensor {{1, 3, 2, 2}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3}}, + reference_tests::Tensor {{1, 3, 2, 2}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3}}, {1, 2, 3}, false, false, 1e-9, - Tensor {{1, 3, 2, 2}, ov::element::f32, std::vector {-3.25, -2.25, -1.25, -0.25, 0.75, 1.75, 2.75, 3.75, 4.75, -3.25, -2.25, -1.25}}), + reference_tests::Tensor {{1, 3, 2, 2}, ov::element::f32, std::vector {-3.25, -2.25, -1.25, -0.25, 0.75, 1.75, 2.75, 3.75, 4.75, -3.25, -2.25, -1.25}}), // reductionAxes, variance=true - MVN1Params(Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, + MVN1Params(reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9}}, {2, 3}, false, true, 1e-9, - Tensor {{1, 3, 3, 3}, + reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934, -1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934, @@ -140,20 +140,20 @@ INSTANTIATE_TEST_SUITE_P( // ------------------------------ V6 ------------------------------ struct MVN6Params { - MVN6Params(const Tensor& paramInput, const Tensor& paramReductionAxes, const bool paramNormalizeVariance, const double paramEps, - const op::MVNEpsMode mode, const Tensor& paramExpected) + MVN6Params(const reference_tests::Tensor& paramInput, const reference_tests::Tensor& paramReductionAxes, const bool paramNormalizeVariance, const double paramEps, + const op::MVNEpsMode mode, const reference_tests::Tensor& paramExpected) : input(paramInput), reductionAxes(paramReductionAxes), normalizeVariance(paramNormalizeVariance), eps(paramEps), epsMode(mode), expected(paramExpected) {} - Tensor input; - Tensor reductionAxes; + reference_tests::Tensor input; + reference_tests::Tensor reductionAxes; bool normalizeVariance; double eps; op::MVNEpsMode epsMode; - Tensor expected; + reference_tests::Tensor expected; }; class ReferenceMVN6LayerTest : public testing::TestWithParam, public CommonReferenceTest { @@ -177,7 +177,7 @@ public: } private: - static std::shared_ptr CreateFunction(const Tensor& input, const Tensor& reductionAxes, const bool normalizeVariance, const double eps, + static std::shared_ptr CreateFunction(const reference_tests::Tensor& input, const reference_tests::Tensor& reductionAxes, const bool normalizeVariance, const double eps, const op::MVNEpsMode epsMode) { std::vector dataVector(reductionAxes.shape[0]); const auto in = std::make_shared(input.type, input.shape); @@ -199,46 +199,46 @@ INSTANTIATE_TEST_SUITE_P( smoke_MVN6_With_Hardcoded_Refs, ReferenceMVN6LayerTest, ::testing::Values( // variance=false, OUTSIDE_SQRT - MVN6Params(Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, + MVN6Params(reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9}}, - Tensor {Shape {2}, ov::element::i64, std::vector {2, 3}}, + reference_tests::Tensor {Shape {2}, ov::element::i64, std::vector {2, 3}}, false, 1e-9, op::MVNEpsMode::OUTSIDE_SQRT, - Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {-4, -3, -2, -1, 0, 1, 2, 3, 4, -4, -3, -2, -1, 0, + reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {-4, -3, -2, -1, 0, 1, 2, 3, 4, -4, -3, -2, -1, 0, 1, 2, 3, 4, -4, -3, -2, -1, 0, 1, 2, 3, 4}}), // variance=true, OUTSIDE_SQRT - MVN6Params(Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, + MVN6Params(reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9}}, - Tensor {Shape {2}, ov::element::i64, std::vector {2, 3}}, + reference_tests::Tensor {Shape {2}, ov::element::i64, std::vector {2, 3}}, true, 1e-9, op::MVNEpsMode::OUTSIDE_SQRT, - Tensor {{1, 3, 3, 3}, + reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934, -1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934, -1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934}}), // variance=true, INSIDE_SQRT - MVN6Params(Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, + MVN6Params(reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9}}, - Tensor {Shape {2}, ov::element::i64, std::vector {2, 3}}, + reference_tests::Tensor {Shape {2}, ov::element::i64, std::vector {2, 3}}, true, 1e-9, op::MVNEpsMode::INSIDE_SQRT, - Tensor {{1, 3, 3, 3}, + reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934, -1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934, -1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934}}), // variance=true, another reductionAxes, OUTSIDE_SQRT - MVN6Params(Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector({1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, + MVN6Params(reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector({1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9})}, - Tensor {Shape {3}, ov::element::i64, std::vector({1, 2, 3})}, + reference_tests::Tensor {Shape {3}, ov::element::i64, std::vector({1, 2, 3})}, true, 1e-9, op::MVNEpsMode::OUTSIDE_SQRT, - Tensor {{1, 3, 3, 3}, + reference_tests::Tensor {{1, 3, 3, 3}, ov::element::f32, std::vector {-1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934, -1.5491934, -1.161895, -0.7745967, -0.38729835, 0., 0.38729835, 0.7745967, 1.161895, 1.5491934, diff --git a/docs/template_plugin/tests/functional/op_reference/negative.cpp b/docs/template_plugin/tests/functional/op_reference/negative.cpp index d5dc16f4f75..04af284feab 100644 --- a/docs/template_plugin/tests/functional/op_reference/negative.cpp +++ b/docs/template_plugin/tests/functional/op_reference/negative.cpp @@ -26,8 +26,8 @@ struct NegativeParams { PartialShape pshape; element::Type inType; element::Type outType; - runtime::Tensor inputData; - runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceNegativeLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/non_max_suppression.cpp b/docs/template_plugin/tests/functional/op_reference/non_max_suppression.cpp index ffd4e610a6e..dfea18c74b3 100644 --- a/docs/template_plugin/tests/functional/op_reference/non_max_suppression.cpp +++ b/docs/template_plugin/tests/functional/op_reference/non_max_suppression.cpp @@ -15,16 +15,16 @@ using namespace ov; namespace { struct NonMaxSuppressionParams { - Tensor boxes; - Tensor scores; - Tensor maxOutputBoxesPerClass; - Tensor iouThreshold; - Tensor scoreThreshold; - Tensor softNmsSigma; + reference_tests::Tensor boxes; + reference_tests::Tensor scores; + reference_tests::Tensor maxOutputBoxesPerClass; + reference_tests::Tensor iouThreshold; + reference_tests::Tensor scoreThreshold; + reference_tests::Tensor softNmsSigma; opset5::NonMaxSuppression::BoxEncodingType boxEncoding; - Tensor expectedSelectedIndices; - Tensor expectedSelectedScores; - Tensor expectedValidOutputs; + reference_tests::Tensor expectedSelectedIndices; + reference_tests::Tensor expectedSelectedScores; + reference_tests::Tensor expectedValidOutputs; std::string testcaseName; }; @@ -153,257 +153,257 @@ std::vector generateParams() { std::vector params { Builder {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.5, 0.5, 1.0, 1.0, 0.5, 0.6, 1.0, 1.0, 0.5, 0.4, 1.0, 1.0, 0.5, 10.5, 1.0, 1.0, 0.5, 10.6, 1.0, 1.0, 0.5, 100.5, 1.0, 1.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .softNmsSigma( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset5::NonMaxSuppression::BoxEncodingType::CENTER) .expectedSelectedIndices( - Tensor(ET_IND, {3, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {3, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 0, 0, 5})) .expectedSelectedScores( - Tensor(ET_TH, {3, 3}, std::vector{ + reference_tests::Tensor(ET_TH, {3, 3}, std::vector{ 0.0, 0.0, 0.95, 0.0, 0.0, 0.9, 0.0, 0.0, 0.3})) .expectedValidOutputs( - Tensor(ET_IND, {1}, std::vector{3})) + reference_tests::Tensor(ET_IND, {1}, std::vector{3})) .testcaseName( "nonmaxsuppression_center_point_box_format"), Builder {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 1.0, 1.0, 0.0, 0.0, 0.0, 0.1, 1.0, 1.1, 0.0, 0.9, 1.0, -0.1, 0.0, 10.0, 1.0, 11.0, 1.0, 10.1, 0.0, 11.1, 1.0, 101.0, 0.0, 100.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .softNmsSigma( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {3, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {3, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 0, 0, 5})) .expectedSelectedScores( - Tensor(ET_TH, {3, 3}, std::vector{ + reference_tests::Tensor(ET_TH, {3, 3}, std::vector{ 0.0, 0.0, 0.95, 0.0, 0.0, 0.9, 0.0, 0.0, 0.3})) .expectedValidOutputs( - Tensor(ET_IND, {1}, std::vector{3})) + reference_tests::Tensor(ET_IND, {1}, std::vector{3})) .testcaseName( "nonmaxsuppression_flipped_coordinates"), Builder {} .boxes( - Tensor(ET, {1, 10, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 10, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0})) .scores( - Tensor(ET, {1, 1, 10}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 10}, std::vector{ 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .softNmsSigma( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) + reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) .expectedSelectedScores( - Tensor(ET_TH, {1, 3}, std::vector{0.0, 0.0, 0.9})) + reference_tests::Tensor(ET_TH, {1, 3}, std::vector{0.0, 0.0, 0.9})) .expectedValidOutputs( - Tensor(ET_IND, {1}, std::vector{1})) + reference_tests::Tensor(ET_IND, {1}, std::vector{1})) .testcaseName( "nonmaxsuppression_identical_boxes"), Builder {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{2})) + reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .softNmsSigma( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {2, 3}, std::vector{0, 0, 3, 0, 0, 0})) + reference_tests::Tensor(ET_IND, {2, 3}, std::vector{0, 0, 3, 0, 0, 0})) .expectedSelectedScores( - Tensor(ET_TH, {2, 3}, std::vector{ + reference_tests::Tensor(ET_TH, {2, 3}, std::vector{ 0.0, 0.0, 0.95, 0.0, 0.0, 0.9})) .expectedValidOutputs( - Tensor(ET_IND, {1}, std::vector{2})) + reference_tests::Tensor(ET_IND, {1}, std::vector{2})) .testcaseName( "nonmaxsuppression_limit_output_size"), Builder {} .boxes( - Tensor(ET, {1, 1, 4}, std::vector{0.0, 0.0, 1.0, 1.0})) + reference_tests::Tensor(ET, {1, 1, 4}, std::vector{0.0, 0.0, 1.0, 1.0})) .scores( - Tensor(ET, {1, 1, 1}, std::vector{0.9})) + reference_tests::Tensor(ET, {1, 1, 1}, std::vector{0.9})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .softNmsSigma( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) + reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) .expectedSelectedScores( - Tensor(ET_TH, {1, 3}, std::vector{0.0, 0.0, 0.9})) + reference_tests::Tensor(ET_TH, {1, 3}, std::vector{0.0, 0.0, 0.9})) .expectedValidOutputs( - Tensor(ET_IND, {1}, std::vector{1})) + reference_tests::Tensor(ET_IND, {1}, std::vector{1})) .testcaseName( "nonmaxsuppression_single_box"), Builder {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .softNmsSigma( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {3, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {3, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 0, 0, 5})) .expectedSelectedScores( - Tensor(ET_TH, {3, 3}, std::vector{ + reference_tests::Tensor(ET_TH, {3, 3}, std::vector{ 0.0, 0.0, 0.95, 0.0, 0.0, 0.9, 0.0, 0.0, 0.3})) .expectedValidOutputs( - Tensor(ET_IND, {1}, std::vector{3})) + reference_tests::Tensor(ET_IND, {1}, std::vector{3})) .testcaseName( "nonmaxsuppression_suppress_by_IOU"), Builder {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.4f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.4f})) .softNmsSigma( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {2, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {2, 3}, std::vector{ 0, 0, 3, 0, 0, 0})) .expectedSelectedScores( - Tensor(ET_TH, {2, 3}, std::vector{ + reference_tests::Tensor(ET_TH, {2, 3}, std::vector{ 0.0, 0.0, 0.95, 0.0, 0.0, 0.9})) .expectedValidOutputs( - Tensor(ET_IND, {1}, std::vector{2})) + reference_tests::Tensor(ET_IND, {1}, std::vector{2})) .testcaseName( "nonmaxsuppression_suppress_by_IOU_and_scores"), Builder {} .boxes( - Tensor(ET, {2, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {2, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {2, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{2})) + reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .softNmsSigma( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {4, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {4, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 1, 0, 3, 1, 0, 0})) .expectedSelectedScores( - Tensor(ET_TH, {4, 3}, std::vector{ + reference_tests::Tensor(ET_TH, {4, 3}, std::vector{ 0.0, 0.0, 0.95, 0.0, 0.0, 0.9, 1.0, 0.0, 0.95, 1.0, 0.0, 0.9})) .expectedValidOutputs( - Tensor(ET_IND, {1}, std::vector{4})) + reference_tests::Tensor(ET_IND, {1}, std::vector{4})) .testcaseName( "nonmaxsuppression_two_batches"), Builder {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {1, 2, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{2})) + reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .softNmsSigma( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {4, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {4, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 0, 1, 3, 0, 1, 0})) .expectedSelectedScores( - Tensor(ET_TH, {4, 3}, std::vector{ + reference_tests::Tensor(ET_TH, {4, 3}, std::vector{ 0.0, 0.0, 0.95, 0.0, 0.0, 0.9, 0.0, 1.0, 0.95, 0.0, 1.0, 0.9})) .expectedValidOutputs( - Tensor(ET_IND, {1}, std::vector{4})) + reference_tests::Tensor(ET_IND, {1}, std::vector{4})) .testcaseName( "nonmaxsuppression_two_classes"), }; @@ -436,28 +436,28 @@ std::vector generateParamsWithoutConstants() { std::vector params { Builder {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.1f, 1.0f, 1.1f, 0.0f, -0.1f, 1.0f, 0.9f, 0.0f, 10.0f, 1.0f, 11.0f, 0.0f, 10.1f, 1.0f, 11.1f, 0.0f, 100.0f, 1.0f, 101.0f})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9f, 0.75f, 0.6f, 0.95f, 0.5f, 0.3f})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {1}, std::vector{1})) + reference_tests::Tensor(ET_BOX, {1}, std::vector{1})) .iouThreshold( - Tensor(ET_TH, {1}, std::vector{0.4f})) + reference_tests::Tensor(ET_TH, {1}, std::vector{0.4f})) .scoreThreshold( - Tensor(ET_TH, {1}, std::vector{0.2f})) + reference_tests::Tensor(ET_TH, {1}, std::vector{0.2f})) .softNmsSigma( - Tensor(ET_TH, {1}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {1}, std::vector{0.0f})) .boxEncoding( opset5::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {1, 3}, std::vector{0, 0, 3})) + reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 3})) .expectedSelectedScores( - Tensor(ET_TH, {1, 3}, std::vector{0.0f, 0.0f, 0.95f})) + reference_tests::Tensor(ET_TH, {1, 3}, std::vector{0.0f, 0.0f, 0.95f})) .expectedValidOutputs( - Tensor(ET_IND, {1}, std::vector{1})) + reference_tests::Tensor(ET_IND, {1}, std::vector{1})) .testcaseName( "nonmaxsuppression_suppress_by_IOU_and_scores_without_constants"), }; @@ -488,13 +488,13 @@ INSTANTIATE_TEST_SUITE_P(smoke_NonMaxSuppression_With_Hardcoded_Refs, ReferenceN struct NonMaxSuppression4Params { - Tensor boxes; - Tensor scores; - Tensor maxOutputBoxesPerClass; - Tensor iouThreshold; - Tensor scoreThreshold; + reference_tests::Tensor boxes; + reference_tests::Tensor scores; + reference_tests::Tensor maxOutputBoxesPerClass; + reference_tests::Tensor iouThreshold; + reference_tests::Tensor scoreThreshold; opset4::NonMaxSuppression::BoxEncodingType boxEncoding; - Tensor expectedSelectedIndices; + reference_tests::Tensor expectedSelectedIndices; std::string testcaseName; }; @@ -606,195 +606,195 @@ std::vector generateParams4() { std::vector params { Builder4 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.5, 0.5, 1.0, 1.0, 0.5, 0.6, 1.0, 1.0, 0.5, 0.4, 1.0, 1.0, 0.5, 10.5, 1.0, 1.0, 0.5, 10.6, 1.0, 1.0, 0.5, 100.5, 1.0, 1.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset4::NonMaxSuppression::BoxEncodingType::CENTER) .expectedSelectedIndices( - Tensor(ET_IND, {3, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {3, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName( "nonmaxsuppression_center_point_box_format"), Builder4 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 1.0, 1.0, 0.0, 0.0, 0.0, 0.1, 1.0, 1.1, 0.0, 0.9, 1.0, -0.1, 0.0, 10.0, 1.0, 11.0, 1.0, 10.1, 0.0, 11.1, 1.0, 101.0, 0.0, 100.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {3, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {3, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName( "nonmaxsuppression_flipped_coordinates"), Builder4 {} .boxes( - Tensor(ET, {1, 10, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 10, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0})) .scores( - Tensor(ET, {1, 1, 10}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 10}, std::vector{ 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{1})) + reference_tests::Tensor(ET_BOX, {}, std::vector{1})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) + reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) .testcaseName( "nonmaxsuppression_identical_boxes"), Builder4 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{2})) + reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {2, 3}, std::vector{0, 0, 3, 0, 0, 0})) + reference_tests::Tensor(ET_IND, {2, 3}, std::vector{0, 0, 3, 0, 0, 0})) .testcaseName( "nonmaxsuppression_limit_output_size"), Builder4 {} .boxes( - Tensor(ET, {1, 1, 4}, std::vector{0.0, 0.0, 1.0, 1.0})) + reference_tests::Tensor(ET, {1, 1, 4}, std::vector{0.0, 0.0, 1.0, 1.0})) .scores( - Tensor(ET, {1, 1, 1}, std::vector{0.9})) + reference_tests::Tensor(ET, {1, 1, 1}, std::vector{0.9})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) + reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) .testcaseName( "nonmaxsuppression_single_box"), Builder4 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {3, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {3, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName( "nonmaxsuppression_suppress_by_IOU"), Builder4 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{2})) + reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.4f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.4f})) .boxEncoding( opset4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {2, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {2, 3}, std::vector{ 0, 0, 3, 0, 0, 0})) .testcaseName( "nonmaxsuppression_suppress_by_IOU_and_scores"), Builder4 {} .boxes( - Tensor(ET, {2, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {2, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {2, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{2})) + reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {4, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {4, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 1, 0, 3, 1, 0, 0})) .testcaseName( "nonmaxsuppression_two_batches"), Builder4 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {1, 2, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{2})) + reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {4, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {4, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 0, 1, 3, 0, 1, 0})) .testcaseName( "nonmaxsuppression_two_classes"), @@ -828,22 +828,22 @@ std::vector generateParams4WithoutConstants() { std::vector params { Builder4 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.1f, 1.0f, 1.1f, 0.0f, -0.1f, 1.0f, 0.9f, 0.0f, 10.0f, 1.0f, 11.0f, 0.0f, 10.1f, 1.0f, 11.1f, 0.0f, 100.0f, 1.0f, 101.0f})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9f, 0.75f, 0.6f, 0.95f, 0.5f, 0.3f})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{1})) + reference_tests::Tensor(ET_BOX, {}, std::vector{1})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.4f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.4f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.2f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.2f})) .boxEncoding( opset4::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {1, 3}, std::vector{0, 0, 3})) + reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 3})) .testcaseName( "nonmaxsuppression_suppress_by_IOU_and_scores_without_constants"), }; @@ -874,13 +874,13 @@ INSTANTIATE_TEST_SUITE_P(smoke_NonMaxSuppression_With_Hardcoded_Refs, ReferenceN struct NonMaxSuppression3Params { - Tensor boxes; - Tensor scores; - Tensor maxOutputBoxesPerClass; - Tensor iouThreshold; - Tensor scoreThreshold; + reference_tests::Tensor boxes; + reference_tests::Tensor scores; + reference_tests::Tensor maxOutputBoxesPerClass; + reference_tests::Tensor iouThreshold; + reference_tests::Tensor scoreThreshold; opset3::NonMaxSuppression::BoxEncodingType boxEncoding; - Tensor expectedSelectedIndices; + reference_tests::Tensor expectedSelectedIndices; std::string testcaseName; }; @@ -992,171 +992,171 @@ std::vector generateParams3() { std::vector params { Builder3 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.5, 0.5, 1.0, 1.0, 0.5, 0.6, 1.0, 1.0, 0.5, 0.4, 1.0, 1.0, 0.5, 10.5, 1.0, 1.0, 0.5, 10.6, 1.0, 1.0, 0.5, 100.5, 1.0, 1.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset3::NonMaxSuppression::BoxEncodingType::CENTER) .expectedSelectedIndices( - Tensor(ET_IND, {3, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {3, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName( "nonmaxsuppression_center_point_box_format"), Builder3 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 1.0, 1.0, 0.0, 0.0, 0.0, 0.1, 1.0, 1.1, 0.0, 0.9, 1.0, -0.1, 0.0, 10.0, 1.0, 11.0, 1.0, 10.1, 0.0, 11.1, 1.0, 101.0, 0.0, 100.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset3::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {3, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {3, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName( "nonmaxsuppression_flipped_coordinates"), Builder3 {} .boxes( - Tensor(ET, {1, 10, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 10, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0})) .scores( - Tensor(ET, {1, 1, 10}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 10}, std::vector{ 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{1})) + reference_tests::Tensor(ET_BOX, {}, std::vector{1})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset3::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) + reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) .testcaseName( "nonmaxsuppression_identical_boxes"), Builder3 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{2})) + reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset3::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {2, 3}, std::vector{0, 0, 3, 0, 0, 0})) + reference_tests::Tensor(ET_IND, {2, 3}, std::vector{0, 0, 3, 0, 0, 0})) .testcaseName( "nonmaxsuppression_limit_output_size"), Builder3 {} .boxes( - Tensor(ET, {1, 1, 4}, std::vector{0.0, 0.0, 1.0, 1.0})) + reference_tests::Tensor(ET, {1, 1, 4}, std::vector{0.0, 0.0, 1.0, 1.0})) .scores( - Tensor(ET, {1, 1, 1}, std::vector{0.9})) + reference_tests::Tensor(ET, {1, 1, 1}, std::vector{0.9})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset3::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) + reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) .testcaseName( "nonmaxsuppression_single_box"), Builder3 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset3::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {3, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {3, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName( "nonmaxsuppression_suppress_by_IOU"), Builder3 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{2})) + reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.4f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.4f})) .boxEncoding( opset3::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {2, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {2, 3}, std::vector{ 0, 0, 3, 0, 0, 0})) .testcaseName( "nonmaxsuppression_suppress_by_IOU_and_scores"), Builder3 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {1, 2, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{2})) + reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset3::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {4, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {4, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 0, 1, 3, 0, 1, 0})) .testcaseName( "nonmaxsuppression_two_classes"), @@ -1190,22 +1190,22 @@ std::vector generateParams3WithoutConstants() { std::vector params { Builder3 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.1f, 1.0f, 1.1f, 0.0f, -0.1f, 1.0f, 0.9f, 0.0f, 10.0f, 1.0f, 11.0f, 0.0f, 10.1f, 1.0f, 11.1f, 0.0f, 100.0f, 1.0f, 101.0f})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9f, 0.75f, 0.6f, 0.95f, 0.5f, 0.3f})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{1})) + reference_tests::Tensor(ET_BOX, {}, std::vector{1})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.4f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.4f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.2f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.2f})) .boxEncoding( opset3::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {1, 3}, std::vector{0, 0, 3})) + reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 3})) .testcaseName( "nonmaxsuppression_suppress_by_IOU_and_scores_without_constants"), }; @@ -1236,13 +1236,13 @@ INSTANTIATE_TEST_SUITE_P(smoke_NonMaxSuppression_With_Hardcoded_Refs, ReferenceN struct NonMaxSuppression1Params { - Tensor boxes; - Tensor scores; - Tensor maxOutputBoxesPerClass; - Tensor iouThreshold; - Tensor scoreThreshold; + reference_tests::Tensor boxes; + reference_tests::Tensor scores; + reference_tests::Tensor maxOutputBoxesPerClass; + reference_tests::Tensor iouThreshold; + reference_tests::Tensor scoreThreshold; opset1::NonMaxSuppression::BoxEncodingType boxEncoding; - Tensor expectedSelectedIndices; + reference_tests::Tensor expectedSelectedIndices; std::string testcaseName; }; @@ -1354,171 +1354,171 @@ std::vector generateParams1() { std::vector params { Builder1 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.5, 0.5, 1.0, 1.0, 0.5, 0.6, 1.0, 1.0, 0.5, 0.4, 1.0, 1.0, 0.5, 10.5, 1.0, 1.0, 0.5, 10.6, 1.0, 1.0, 0.5, 100.5, 1.0, 1.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset1::NonMaxSuppression::BoxEncodingType::CENTER) .expectedSelectedIndices( - Tensor(ET_IND, {3, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {3, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName( "nonmaxsuppression_center_point_box_format"), Builder1 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 1.0, 1.0, 0.0, 0.0, 0.0, 0.1, 1.0, 1.1, 0.0, 0.9, 1.0, -0.1, 0.0, 10.0, 1.0, 11.0, 1.0, 10.1, 0.0, 11.1, 1.0, 101.0, 0.0, 100.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset1::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {3, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {3, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName( "nonmaxsuppression_flipped_coordinates"), Builder1 {} .boxes( - Tensor(ET, {1, 10, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 10, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0})) .scores( - Tensor(ET, {1, 1, 10}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 10}, std::vector{ 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{1})) + reference_tests::Tensor(ET_BOX, {}, std::vector{1})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset1::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) + reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) .testcaseName( "nonmaxsuppression_identical_boxes"), Builder1 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{2})) + reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset1::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {2, 3}, std::vector{0, 0, 3, 0, 0, 0})) + reference_tests::Tensor(ET_IND, {2, 3}, std::vector{0, 0, 3, 0, 0, 0})) .testcaseName( "nonmaxsuppression_limit_output_size"), Builder1 {} .boxes( - Tensor(ET, {1, 1, 4}, std::vector{0.0, 0.0, 1.0, 1.0})) + reference_tests::Tensor(ET, {1, 1, 4}, std::vector{0.0, 0.0, 1.0, 1.0})) .scores( - Tensor(ET, {1, 1, 1}, std::vector{0.9})) + reference_tests::Tensor(ET, {1, 1, 1}, std::vector{0.9})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset1::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) + reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 0})) .testcaseName( "nonmaxsuppression_single_box"), Builder1 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{3})) + reference_tests::Tensor(ET_BOX, {}, std::vector{3})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset1::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {3, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {3, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 0, 0, 5})) .testcaseName( "nonmaxsuppression_suppress_by_IOU"), Builder1 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{2})) + reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.4f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.4f})) .boxEncoding( opset1::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {2, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {2, 3}, std::vector{ 0, 0, 3, 0, 0, 0})) .testcaseName( "nonmaxsuppression_suppress_by_IOU_and_scores"), Builder1 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0, 0.0, 1.0, 1.0, 0.0, 0.1, 1.0, 1.1, 0.0, -0.1, 1.0, 0.9, 0.0, 10.0, 1.0, 11.0, 0.0, 10.1, 1.0, 11.1, 0.0, 100.0, 1.0, 101.0})) .scores( - Tensor(ET, {1, 2, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 2, 6}, std::vector{ 0.9, 0.75, 0.6, 0.95, 0.5, 0.3, 0.9, 0.75, 0.6, 0.95, 0.5, 0.3})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{2})) + reference_tests::Tensor(ET_BOX, {}, std::vector{2})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.5f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.5f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.0f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.0f})) .boxEncoding( opset1::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {4, 3}, std::vector{ + reference_tests::Tensor(ET_IND, {4, 3}, std::vector{ 0, 0, 3, 0, 0, 0, 0, 1, 3, 0, 1, 0})) .testcaseName( "nonmaxsuppression_two_classes"), @@ -1552,22 +1552,22 @@ std::vector generateParams1WithoutConstants() { std::vector params { Builder1 {} .boxes( - Tensor(ET, {1, 6, 4}, std::vector{ + reference_tests::Tensor(ET, {1, 6, 4}, std::vector{ 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.1f, 1.0f, 1.1f, 0.0f, -0.1f, 1.0f, 0.9f, 0.0f, 10.0f, 1.0f, 11.0f, 0.0f, 10.1f, 1.0f, 11.1f, 0.0f, 100.0f, 1.0f, 101.0f})) .scores( - Tensor(ET, {1, 1, 6}, std::vector{ + reference_tests::Tensor(ET, {1, 1, 6}, std::vector{ 0.9f, 0.75f, 0.6f, 0.95f, 0.5f, 0.3f})) .maxOutputBoxesPerClass( - Tensor(ET_BOX, {}, std::vector{1})) + reference_tests::Tensor(ET_BOX, {}, std::vector{1})) .iouThreshold( - Tensor(ET_TH, {}, std::vector{0.4f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.4f})) .scoreThreshold( - Tensor(ET_TH, {}, std::vector{0.2f})) + reference_tests::Tensor(ET_TH, {}, std::vector{0.2f})) .boxEncoding( opset1::NonMaxSuppression::BoxEncodingType::CORNER) .expectedSelectedIndices( - Tensor(ET_IND, {1, 3}, std::vector{0, 0, 3})) + reference_tests::Tensor(ET_IND, {1, 3}, std::vector{0, 0, 3})) .testcaseName( "nonmaxsuppression_suppress_by_IOU_and_scores_without_constants"), }; diff --git a/docs/template_plugin/tests/functional/op_reference/nonzero.cpp b/docs/template_plugin/tests/functional/op_reference/nonzero.cpp index 29bea534711..67d07ec4a8f 100644 --- a/docs/template_plugin/tests/functional/op_reference/nonzero.cpp +++ b/docs/template_plugin/tests/functional/op_reference/nonzero.cpp @@ -30,8 +30,8 @@ struct NonZeroParams { PartialShape inputShape; element::Type inType; element::Type refType; - runtime::Tensor inputData; - runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; std::string testcaseName; }; diff --git a/docs/template_plugin/tests/functional/op_reference/normalize_l2.cpp b/docs/template_plugin/tests/functional/op_reference/normalize_l2.cpp index 50f24446e5b..992ecc4918f 100644 --- a/docs/template_plugin/tests/functional/op_reference/normalize_l2.cpp +++ b/docs/template_plugin/tests/functional/op_reference/normalize_l2.cpp @@ -66,8 +66,8 @@ struct NormalizeL2Params { Shape m_expected_shape; element::Type m_input_type; element::Type m_expected_type; - runtime::Tensor m_input_value; - runtime::Tensor m_expected_value; + ov::Tensor m_input_value; + ov::Tensor m_expected_value; std::vector m_axes; op::EpsMode m_eps_mode; float m_eps; diff --git a/docs/template_plugin/tests/functional/op_reference/one_hot.cpp b/docs/template_plugin/tests/functional/op_reference/one_hot.cpp index 7fdc971859c..8ab7d6f2ff7 100644 --- a/docs/template_plugin/tests/functional/op_reference/one_hot.cpp +++ b/docs/template_plugin/tests/functional/op_reference/one_hot.cpp @@ -14,19 +14,19 @@ using namespace ov; namespace { struct OneHotParams { OneHotParams( - const Tensor& dataTensor, const int32_t axis, - const Tensor& depthTensor, const Tensor& onValueTensor, const Tensor& offValueTensor, - const Tensor& expectedTensor, const std::string& testcaseName = "") : + const reference_tests::Tensor& dataTensor, const int32_t axis, + const reference_tests::Tensor& depthTensor, const reference_tests::Tensor& onValueTensor, const reference_tests::Tensor& offValueTensor, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dataTensor(dataTensor), axis(axis), depthTensor(depthTensor), onValueTensor(onValueTensor), offValueTensor(offValueTensor), expectedTensor(expectedTensor), testcaseName(testcaseName) {} - Tensor dataTensor; + reference_tests::Tensor dataTensor; int32_t axis; - Tensor depthTensor; - Tensor onValueTensor; - Tensor offValueTensor; - Tensor expectedTensor; + reference_tests::Tensor depthTensor; + reference_tests::Tensor onValueTensor; + reference_tests::Tensor offValueTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -97,75 +97,75 @@ std::vector generateParams() { using T2 = typename element_type_traits::value_type; std::vector params { OneHotParams( - Tensor(ET1, {}, std::vector{2}), + reference_tests::Tensor(ET1, {}, std::vector{2}), 0, - Tensor(ET1, {}, std::vector{3}), - Tensor(ET2, {}, std::vector{1}), - Tensor(ET2, {}, std::vector{0}), - Tensor(ET2, {3}, std::vector{0, 0, 1}), + reference_tests::Tensor(ET1, {}, std::vector{3}), + reference_tests::Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{0}), + reference_tests::Tensor(ET2, {3}, std::vector{0, 0, 1}), "one_hot_scalar_2_in_3"), OneHotParams( - Tensor(ET1, {}, std::vector{1}), + reference_tests::Tensor(ET1, {}, std::vector{1}), 0, - Tensor(ET1, {}, std::vector{3}), - Tensor(ET2, {}, std::vector{1}), - Tensor(ET2, {}, std::vector{0}), - Tensor(ET2, {3}, std::vector{0, 1, 0}), + reference_tests::Tensor(ET1, {}, std::vector{3}), + reference_tests::Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{0}), + reference_tests::Tensor(ET2, {3}, std::vector{0, 1, 0}), "one_hot_scalar_1_in_3"), OneHotParams( - Tensor(ET1, {}, std::vector{0}), + reference_tests::Tensor(ET1, {}, std::vector{0}), 0, - Tensor(ET1, {}, std::vector{3}), - Tensor(ET2, {}, std::vector{1}), - Tensor(ET2, {}, std::vector{0}), - Tensor(ET2, {3}, std::vector{1, 0, 0}), + reference_tests::Tensor(ET1, {}, std::vector{3}), + reference_tests::Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{0}), + reference_tests::Tensor(ET2, {3}, std::vector{1, 0, 0}), "one_hot_scalar_0_in_3"), OneHotParams( - Tensor(ET1, {8}, std::vector{2, 1, 0, 0, 2, 2, 1, 0}), + reference_tests::Tensor(ET1, {8}, std::vector{2, 1, 0, 0, 2, 2, 1, 0}), 0, - Tensor(ET1, {}, std::vector{3}), - Tensor(ET2, {}, std::vector{1}), - Tensor(ET2, {}, std::vector{0}), - Tensor(ET2, {3, 8}, std::vector{0, 0, 1, 1, 0, 0, 0, 1, + reference_tests::Tensor(ET1, {}, std::vector{3}), + reference_tests::Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{0}), + reference_tests::Tensor(ET2, {3, 8}, std::vector{0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0}), "one_hot_vector_0"), OneHotParams( - Tensor(ET1, {8}, std::vector{2, 1, 0, 0, 2, 2, 1, 0}), + reference_tests::Tensor(ET1, {8}, std::vector{2, 1, 0, 0, 2, 2, 1, 0}), 1, - Tensor(ET1, {}, std::vector{3}), - Tensor(ET2, {}, std::vector{1}), - Tensor(ET2, {}, std::vector{0}), - Tensor(ET2, {8, 3}, std::vector{0, 0, 1, 0, 1, 0, 1, 0, + reference_tests::Tensor(ET1, {}, std::vector{3}), + reference_tests::Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{0}), + reference_tests::Tensor(ET2, {8, 3}, std::vector{0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0}), "one_hot_vector_1"), OneHotParams( - Tensor(ET1, {8}, std::vector{2, 1, 0, 0, 3, 2, 1, 0}), + reference_tests::Tensor(ET1, {8}, std::vector{2, 1, 0, 0, 3, 2, 1, 0}), 1, - Tensor(ET1, {}, std::vector{3}), - Tensor(ET2, {}, std::vector{1}), - Tensor(ET2, {}, std::vector{0}), - Tensor(ET2, {8, 3}, std::vector{0, 0, 1, 0, 1, 0, 1, 0, + reference_tests::Tensor(ET1, {}, std::vector{3}), + reference_tests::Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{0}), + reference_tests::Tensor(ET2, {8, 3}, std::vector{0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0}), "one_hot_vector_1_barely_oob"), OneHotParams( - Tensor(ET1, {3, 3}, std::vector{0, 1, 1, 2, 1, 0, 0, 2, 1}), + reference_tests::Tensor(ET1, {3, 3}, std::vector{0, 1, 1, 2, 1, 0, 0, 2, 1}), 0, - Tensor(ET1, {}, std::vector{3}), - Tensor(ET2, {}, std::vector{1}), - Tensor(ET2, {}, std::vector{0}), - Tensor(ET2, {3, 3, 3}, std::vector{1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, + reference_tests::Tensor(ET1, {}, std::vector{3}), + reference_tests::Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{0}), + reference_tests::Tensor(ET2, {3, 3, 3}, std::vector{1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0}), "one_hot_matrix_0"), OneHotParams( - Tensor(ET1, {6}, std::vector{0, 11, 101, 1001, 10001, 19999}), + reference_tests::Tensor(ET1, {6}, std::vector{0, 11, 101, 1001, 10001, 19999}), 1, - Tensor(ET1, {}, std::vector{20000}), - Tensor(ET2, {}, std::vector{1}), - Tensor(ET2, {}, std::vector{0}), - Tensor(ET2, {6, 20000}, generateExpectedValues({6, 20000}, + reference_tests::Tensor(ET1, {}, std::vector{20000}), + reference_tests::Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{0}), + reference_tests::Tensor(ET2, {6, 20000}, generateExpectedValues({6, 20000}, std::vector{0, 11, 101, 1001, 10001, 19999}, 20000)), "one_hot_vector_many_categories"), @@ -179,12 +179,12 @@ std::vector generateParamsFloat() { using T2 = typename element_type_traits::value_type; std::vector params { OneHotParams( - Tensor(ET1, {3, 3}, std::vector{0, 1, 1, 2, 1, 0, 0, 2, 1}), + reference_tests::Tensor(ET1, {3, 3}, std::vector{0, 1, 1, 2, 1, 0, 0, 2, 1}), 0, - Tensor(ET1, {}, std::vector{3}), - Tensor(ET2, {}, std::vector{2.5}), - Tensor(ET2, {}, std::vector{0.5}), - Tensor(ET2, {3, 3, 3}, std::vector{ + reference_tests::Tensor(ET1, {}, std::vector{3}), + reference_tests::Tensor(ET2, {}, std::vector{2.5}), + reference_tests::Tensor(ET2, {}, std::vector{0.5}), + reference_tests::Tensor(ET2, {3, 3, 3}, std::vector{ 2.5, 0.5, 0.5, 0.5, 0.5, 2.5, 2.5, 0.5, 0.5, 0.5, 2.5, 2.5, 0.5, 2.5, 0.5, 0.5, 0.5, 2.5, 0.5, 0.5, 0.5, 2.5, 0.5, 0.5, 0.5, 2.5, 0.5}), "one_hot_on_off_float"), diff --git a/docs/template_plugin/tests/functional/op_reference/pad.cpp b/docs/template_plugin/tests/functional/op_reference/pad.cpp index 76247573ce0..544962fd83d 100644 --- a/docs/template_plugin/tests/functional/op_reference/pad.cpp +++ b/docs/template_plugin/tests/functional/op_reference/pad.cpp @@ -15,8 +15,8 @@ using namespace ov; namespace { struct PadParams { PadParams( - const Tensor& inputData, const Tensor& padsBegin, const Tensor& padsEnd, - const Tensor& expectedOutput, op::PadMode padMode, const Tensor& constantValue, + const reference_tests::Tensor& inputData, const reference_tests::Tensor& padsBegin, const reference_tests::Tensor& padsEnd, + const reference_tests::Tensor& expectedOutput, op::PadMode padMode, const reference_tests::Tensor& constantValue, const std::string& testcaseName = "") : inputData(inputData), padsBegin(padsBegin), padsEnd(padsEnd), expectedOutput(expectedOutput), padMode(padMode), @@ -24,20 +24,20 @@ struct PadParams { testcaseName(testcaseName) {} PadParams( - const Tensor& inputData, const Tensor& padsBegin, const Tensor& padsEnd, - const Tensor& expectedOutput, op::PadMode padMode, + const reference_tests::Tensor& inputData, const reference_tests::Tensor& padsBegin, const reference_tests::Tensor& padsEnd, + const reference_tests::Tensor& expectedOutput, op::PadMode padMode, const std::string& testcaseName = "") : inputData(inputData), padsBegin(padsBegin), padsEnd(padsEnd), expectedOutput(expectedOutput), padMode(padMode), testcaseName(testcaseName) {} - Tensor inputData; - Tensor padsBegin; - Tensor padsEnd; - Tensor expectedOutput; + reference_tests::Tensor inputData; + reference_tests::Tensor padsBegin; + reference_tests::Tensor padsEnd; + reference_tests::Tensor expectedOutput; op::PadMode padMode; bool useConstValue{false}; - Tensor constantValue; + reference_tests::Tensor constantValue; std::string testcaseName; }; @@ -182,83 +182,83 @@ std::vector generateParams() { using T_INT = typename element_type_traits::value_type; std::vector params { PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{4}), - Tensor(ET_INT, {1}, std::vector{5}), - Tensor(ET, {15}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{4}), + reference_tests::Tensor(ET_INT, {1}, std::vector{5}), + reference_tests::Tensor(ET, {15}, std::vector{ 2112, 2112, 2112, 2112, 1, 2, 3, 4, 5, 6, 2112, 2112, 2112, 2112, 2112, }), op::PadMode::CONSTANT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_1d_constant_const_value_provided_0"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{4}), - Tensor(ET_INT, {1}, std::vector{0}), - Tensor(ET, {10}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{4}), + reference_tests::Tensor(ET_INT, {1}, std::vector{0}), + reference_tests::Tensor(ET, {10}, std::vector{ 2112, 2112, 2112, 2112, 1, 2, 3, 4, 5, 6, }), op::PadMode::CONSTANT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_1d_constant_const_value_provided_1"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{0}), - Tensor(ET_INT, {1}, std::vector{3}), - Tensor(ET, {9}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{0}), + reference_tests::Tensor(ET_INT, {1}, std::vector{3}), + reference_tests::Tensor(ET, {9}, std::vector{ 1, 2, 3, 4, 5, 6, 2112, 2112, 2112, }), op::PadMode::CONSTANT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_1d_constant_const_value_provided_2"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{4}), - Tensor(ET_INT, {1}, std::vector{5}), - Tensor(ET, {15}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{4}), + reference_tests::Tensor(ET_INT, {1}, std::vector{5}), + reference_tests::Tensor(ET, {15}, std::vector{ 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 0, 0, 0, }), op::PadMode::CONSTANT, "pad_1d_constant_use_default_const_0"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{4}), - Tensor(ET_INT, {1}, std::vector{0}), - Tensor(ET, {10}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{4}), + reference_tests::Tensor(ET_INT, {1}, std::vector{0}), + reference_tests::Tensor(ET, {10}, std::vector{ 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, }), op::PadMode::CONSTANT, "pad_1d_constant_use_default_const_1"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{0}), - Tensor(ET_INT, {1}, std::vector{3}), - Tensor(ET, {9}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{0}), + reference_tests::Tensor(ET_INT, {1}, std::vector{3}), + reference_tests::Tensor(ET, {9}, std::vector{ 1, 2, 3, 4, 5, 6, 0, 0, 0, }), op::PadMode::CONSTANT, "pad_1d_constant_use_default_const_2"), PadParams( - Tensor(ET, {2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2}, std::vector{ 1, 2, 3, 4, }), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET_INT, {2}, std::vector{3, 4}), - Tensor(ET, {6, 8}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET_INT, {2}, std::vector{3, 4}), + reference_tests::Tensor(ET, {6, 8}, std::vector{ 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 1, 2, 2112, 2112, 2112, 2112, 2112, 2112, 3, 4, 2112, 2112, 2112, 2112, @@ -267,44 +267,44 @@ std::vector generateParams() { 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, }), op::PadMode::CONSTANT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_2d_constant_const_value_provided_0"), PadParams( - Tensor(ET, {2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2}, std::vector{ 1, 2, 3, 4, }), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET_INT, {2}, std::vector{0, 0}), - Tensor(ET, {3, 4}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 0}), + reference_tests::Tensor(ET, {3, 4}, std::vector{ 2112, 2112, 2112, 2112, 2112, 2112, 1, 2, 2112, 2112, 3, 4, }), op::PadMode::CONSTANT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_2d_constant_const_value_provided_1"), PadParams( - Tensor(ET, {2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2}, std::vector{ 1, 2, 3, 4, }), - Tensor(ET_INT, {2}, std::vector{0, 0}), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET, {3, 4}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 0}), + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET, {3, 4}, std::vector{ 1, 2, 2112, 2112, 3, 4, 2112, 2112, 2112, 2112, 2112, 2112, }), op::PadMode::CONSTANT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_2d_constant_const_value_provided_2"), PadParams( - Tensor(ET, {2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2}, std::vector{ 1, 2, 3, 4, }), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET_INT, {2}, std::vector{3, 4}), - Tensor(ET, {6, 8}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET_INT, {2}, std::vector{3, 4}), + reference_tests::Tensor(ET, {6, 8}, std::vector{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, @@ -315,12 +315,12 @@ std::vector generateParams() { op::PadMode::CONSTANT, "pad_2d_constant_use_default_const_0"), PadParams( - Tensor(ET, {2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2}, std::vector{ 1, 2, 3, 4, }), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET_INT, {2}, std::vector{0, 0}), - Tensor(ET, {3, 4}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 0}), + reference_tests::Tensor(ET, {3, 4}, std::vector{ 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 3, 4, @@ -328,12 +328,12 @@ std::vector generateParams() { op::PadMode::CONSTANT, "pad_2d_constant_use_default_const_1"), PadParams( - Tensor(ET, {2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2}, std::vector{ 1, 2, 3, 4, }), - Tensor(ET_INT, {2}, std::vector{0, 0}), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET, {3, 4}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 0}), + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET, {3, 4}, std::vector{ 1, 2, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, @@ -342,46 +342,46 @@ std::vector generateParams() { "pad_2d_constant_use_default_const_2"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{2}), - Tensor(ET_INT, {1}, std::vector{3}), - Tensor(ET, {11}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{2}), + reference_tests::Tensor(ET_INT, {1}, std::vector{3}), + reference_tests::Tensor(ET, {11}, std::vector{ 1, 1, 1, 2, 3, 4, 5, 6, 6, 6, 6, }), op::PadMode::EDGE, "pad_1d_edge_0"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{1}), - Tensor(ET_INT, {1}, std::vector{0}), - Tensor(ET, {7}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{1}), + reference_tests::Tensor(ET_INT, {1}, std::vector{0}), + reference_tests::Tensor(ET, {7}, std::vector{ 1, 1, 2, 3, 4, 5, 6, }), op::PadMode::EDGE, "pad_1d_edge_1"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{0}), - Tensor(ET_INT, {1}, std::vector{2}), - Tensor(ET, {8}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{0}), + reference_tests::Tensor(ET_INT, {1}, std::vector{2}), + reference_tests::Tensor(ET, {8}, std::vector{ 1, 2, 3, 4, 5, 6, 6, 6, }), op::PadMode::EDGE, "pad_1d_edge_2"), PadParams( - Tensor(ET, {2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2}, std::vector{ 1, 2, 3, 4, }), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET_INT, {2}, std::vector{2, 1}), - Tensor(ET, {5, 5}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET_INT, {2}, std::vector{2, 1}), + reference_tests::Tensor(ET, {5, 5}, std::vector{ 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, @@ -391,12 +391,12 @@ std::vector generateParams() { op::PadMode::EDGE, "pad_2d_edge_0"), PadParams( - Tensor(ET, {2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2}, std::vector{ 1, 2, 3, 4, }), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET_INT, {2}, std::vector{0, 0}), - Tensor(ET, {3, 4}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 0}), + reference_tests::Tensor(ET, {3, 4}, std::vector{ 1, 1, 1, 2, 1, 1, 1, 2, 3, 3, 3, 4, @@ -404,12 +404,12 @@ std::vector generateParams() { op::PadMode::EDGE, "pad_2d_edge_1"), PadParams( - Tensor(ET, {2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2}, std::vector{ 1, 2, 3, 4, }), - Tensor(ET_INT, {2}, std::vector{0, 0}), - Tensor(ET_INT, {2}, std::vector{2, 1}), - Tensor(ET, {4, 3}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 0}), + reference_tests::Tensor(ET_INT, {2}, std::vector{2, 1}), + reference_tests::Tensor(ET, {4, 3}, std::vector{ 1, 2, 2, 3, 4, 4, 3, 4, 4, @@ -419,46 +419,46 @@ std::vector generateParams() { "pad_2d_edge_2"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{2}), - Tensor(ET_INT, {1}, std::vector{3}), - Tensor(ET, {11}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{2}), + reference_tests::Tensor(ET_INT, {1}, std::vector{3}), + reference_tests::Tensor(ET, {11}, std::vector{ 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, }), op::PadMode::REFLECT, "pad_1d_reflect_0"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{1}), - Tensor(ET_INT, {1}, std::vector{0}), - Tensor(ET, {7}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{1}), + reference_tests::Tensor(ET_INT, {1}, std::vector{0}), + reference_tests::Tensor(ET, {7}, std::vector{ 2, 1, 2, 3, 4, 5, 6, }), op::PadMode::REFLECT, "pad_1d_reflect_1"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{0}), - Tensor(ET_INT, {1}, std::vector{2}), - Tensor(ET, {8}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{0}), + reference_tests::Tensor(ET_INT, {1}, std::vector{2}), + reference_tests::Tensor(ET, {8}, std::vector{ 1, 2, 3, 4, 5, 6, 5, 4, }), op::PadMode::REFLECT, "pad_1d_reflect_2"), PadParams( - Tensor(ET, {3, 3}, std::vector{ + reference_tests::Tensor(ET, {3, 3}, std::vector{ 1, 2, 3, 4, 5, 6, 7, 8, 9, }), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET_INT, {2}, std::vector{2, 1}), - Tensor(ET, {6, 6}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET_INT, {2}, std::vector{2, 1}), + reference_tests::Tensor(ET, {6, 6}, std::vector{ 6, 5, 4, 5, 6, 5, 3, 2, 1, 2, 3, 2, 6, 5, 4, 5, 6, 5, @@ -469,12 +469,12 @@ std::vector generateParams() { op::PadMode::REFLECT, "pad_2d_reflect_0"), PadParams( - Tensor(ET, {3, 3}, std::vector{ + reference_tests::Tensor(ET, {3, 3}, std::vector{ 1, 2, 3, 4, 5, 6, 7, 8, 9, }), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET_INT, {2}, std::vector{0, 0}), - Tensor(ET, {4, 5}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 0}), + reference_tests::Tensor(ET, {4, 5}, std::vector{ 6, 5, 4, 5, 6, 3, 2, 1, 2, 3, 6, 5, 4, 5, 6, @@ -483,12 +483,12 @@ std::vector generateParams() { op::PadMode::REFLECT, "pad_2d_reflect_1"), PadParams( - Tensor(ET, {3, 3}, std::vector{ + reference_tests::Tensor(ET, {3, 3}, std::vector{ 1, 2, 3, 4, 5, 6, 7, 8, 9, }), - Tensor(ET_INT, {2}, std::vector{0, 0}), - Tensor(ET_INT, {2}, std::vector{2, 1}), - Tensor(ET, {5, 4}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 0}), + reference_tests::Tensor(ET_INT, {2}, std::vector{2, 1}), + reference_tests::Tensor(ET, {5, 4}, std::vector{ 1, 2, 3, 2, 4, 5, 6, 5, 7, 8, 9, 8, @@ -499,46 +499,46 @@ std::vector generateParams() { "pad_2d_reflect_2"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{2}), - Tensor(ET_INT, {1}, std::vector{3}), - Tensor(ET, {11}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{2}), + reference_tests::Tensor(ET_INT, {1}, std::vector{3}), + reference_tests::Tensor(ET, {11}, std::vector{ 2, 1, 1, 2, 3, 4, 5, 6, 6, 5, 4, }), op::PadMode::SYMMETRIC, "pad_1d_symmetric_0"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{1}), - Tensor(ET_INT, {1}, std::vector{0}), - Tensor(ET, {7}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{1}), + reference_tests::Tensor(ET_INT, {1}, std::vector{0}), + reference_tests::Tensor(ET, {7}, std::vector{ 1, 1, 2, 3, 4, 5, 6, }), op::PadMode::SYMMETRIC, "pad_1d_symmetric_1"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{0}), - Tensor(ET_INT, {1}, std::vector{2}), - Tensor(ET, {8}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{0}), + reference_tests::Tensor(ET_INT, {1}, std::vector{2}), + reference_tests::Tensor(ET, {8}, std::vector{ 1, 2, 3, 4, 5, 6, 6, 5, }), op::PadMode::SYMMETRIC, "pad_1d_symmetric_2"), PadParams( - Tensor(ET, {3, 3}, std::vector{ + reference_tests::Tensor(ET, {3, 3}, std::vector{ 1, 2, 3, 4, 5, 6, 7, 8, 9, }), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET_INT, {2}, std::vector{2, 1}), - Tensor(ET, {6, 6}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET_INT, {2}, std::vector{2, 1}), + reference_tests::Tensor(ET, {6, 6}, std::vector{ 2, 1, 1, 2, 3, 3, 2, 1, 1, 2, 3, 3, 5, 4, 4, 5, 6, 6, @@ -549,12 +549,12 @@ std::vector generateParams() { op::PadMode::SYMMETRIC, "pad_2d_symmetric_0"), PadParams( - Tensor(ET, {3, 3}, std::vector{ + reference_tests::Tensor(ET, {3, 3}, std::vector{ 1, 2, 3, 4, 5, 6, 7, 8, 9, }), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET_INT, {2}, std::vector{0, 0}), - Tensor(ET, {4, 5}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 0}), + reference_tests::Tensor(ET, {4, 5}, std::vector{ 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 5, 4, 4, 5, 6, @@ -563,12 +563,12 @@ std::vector generateParams() { op::PadMode::SYMMETRIC, "pad_2d_symmetric_1"), PadParams( - Tensor(ET, {3, 3}, std::vector{ + reference_tests::Tensor(ET, {3, 3}, std::vector{ 1, 2, 3, 4, 5, 6, 7, 8, 9, }), - Tensor(ET_INT, {2}, std::vector{0, 0}), - Tensor(ET_INT, {2}, std::vector{2, 1}), - Tensor(ET, {5, 4}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 0}), + reference_tests::Tensor(ET_INT, {2}, std::vector{2, 1}), + reference_tests::Tensor(ET, {5, 4}, std::vector{ 1, 2, 3, 3, 4, 5, 6, 6, 7, 8, 9, 9, @@ -579,116 +579,116 @@ std::vector generateParams() { "pad_2d_symmetric"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{4}), - Tensor(ET_INT, {1}, std::vector{5}), - Tensor(ET, {15}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{4}), + reference_tests::Tensor(ET_INT, {1}, std::vector{5}), + reference_tests::Tensor(ET, {15}, std::vector{ 2112, 2112, 2112, 2112, 1, 2, 3, 4, 5, 6, 2112, 2112, 2112, 2112, 2112, }), op::PadMode::CONSTANT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_exterior_1d"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{4}), - Tensor(ET_INT, {1}, std::vector{-2}), - Tensor(ET, {8}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{4}), + reference_tests::Tensor(ET_INT, {1}, std::vector{-2}), + reference_tests::Tensor(ET, {8}, std::vector{ 2112, 2112, 2112, 2112, 1, 2, 3, 4, }), op::PadMode::CONSTANT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_negative_exterior_1d"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{4}), - Tensor(ET_INT, {1}, std::vector{-7}), - Tensor(ET, {3}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{4}), + reference_tests::Tensor(ET_INT, {1}, std::vector{-7}), + reference_tests::Tensor(ET, {3}, std::vector{ 2112, 2112, 2112, }), op::PadMode::CONSTANT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_negative_exterior_1d_check_limits"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{2}), - Tensor(ET_INT, {1}, std::vector{3}), - Tensor(ET, {11}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{2}), + reference_tests::Tensor(ET_INT, {1}, std::vector{3}), + reference_tests::Tensor(ET, {11}, std::vector{ 1, 1, 1, 2, 3, 4, 5, 6, 6, 6, 6, }), op::PadMode::EDGE, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_edge_1d"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{2}), - Tensor(ET_INT, {1}, std::vector{-3}), - Tensor(ET, {5}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{2}), + reference_tests::Tensor(ET_INT, {1}, std::vector{-3}), + reference_tests::Tensor(ET, {5}, std::vector{ 1, 1, 1, 2, 3, }), op::PadMode::EDGE, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_edge_1d_top_neg"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{2}), - Tensor(ET_INT, {1}, std::vector{-7}), - Tensor(ET, {1}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{2}), + reference_tests::Tensor(ET_INT, {1}, std::vector{-7}), + reference_tests::Tensor(ET, {1}, std::vector{ 1, }), op::PadMode::EDGE, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_edge_1d_top_neg_bigger_than_tensor"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{-2}), - Tensor(ET_INT, {1}, std::vector{3}), - Tensor(ET, {7}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{-2}), + reference_tests::Tensor(ET_INT, {1}, std::vector{3}), + reference_tests::Tensor(ET, {7}, std::vector{ 3, 4, 5, 6, 6, 6, 6, }), op::PadMode::EDGE, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_edge_1d_bottom_neg"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{-7}), - Tensor(ET_INT, {1}, std::vector{3}), - Tensor(ET, {2}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{-7}), + reference_tests::Tensor(ET_INT, {1}, std::vector{3}), + reference_tests::Tensor(ET, {2}, std::vector{ 6, 6, }), op::PadMode::EDGE, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_edge_1d_bottom_neg_bigger_than_tensor"), PadParams( - Tensor(ET, {3, 4}, std::vector{ + reference_tests::Tensor(ET, {3, 4}, std::vector{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, }), - Tensor(ET_INT, {2}, std::vector{2, 3}), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET, {6, 9}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{2, 3}), + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET, {6, 9}, std::vector{ 1, 1, 1, 1, 2, 3, 4, 4, 4, 1, 1, 1, 1, 2, 3, 4, 4, 4, 1, 1, 1, 1, 2, 3, 4, 4, 4, @@ -697,16 +697,16 @@ std::vector generateParams() { 9, 9, 9, 9, 10, 11, 12, 12, 12, }), op::PadMode::EDGE, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_edge_2d"), PadParams( - Tensor(ET, {3, 4}, std::vector{ + reference_tests::Tensor(ET, {3, 4}, std::vector{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, }), - Tensor(ET_INT, {2}, std::vector{2, -1}), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET, {6, 5}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{2, -1}), + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET, {6, 5}, std::vector{ 2, 3, 4, 4, 4, 2, 3, 4, 4, 4, 2, 3, 4, 4, 4, @@ -715,83 +715,83 @@ std::vector generateParams() { 10, 11, 12, 12, 12, }), op::PadMode::EDGE, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_edge_2d_with_neg"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{2}), - Tensor(ET_INT, {1}, std::vector{3}), - Tensor(ET, {11}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{2}), + reference_tests::Tensor(ET_INT, {1}, std::vector{3}), + reference_tests::Tensor(ET, {11}, std::vector{ 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, }), op::PadMode::REFLECT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_reflect_1d"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{2}), - Tensor(ET_INT, {1}, std::vector{-3}), - Tensor(ET, {5}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{2}), + reference_tests::Tensor(ET_INT, {1}, std::vector{-3}), + reference_tests::Tensor(ET, {5}, std::vector{ 3, 2, 1, 2, 3, }), op::PadMode::REFLECT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_reflect_1d_top_neg"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{2}), - Tensor(ET_INT, {1}, std::vector{-7}), - Tensor(ET, {1}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{2}), + reference_tests::Tensor(ET_INT, {1}, std::vector{-7}), + reference_tests::Tensor(ET, {1}, std::vector{ 3, }), op::PadMode::REFLECT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_reflect_1d_top_neg_bigger_than_tensor"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{-2}), - Tensor(ET_INT, {1}, std::vector{3}), - Tensor(ET, {7}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{-2}), + reference_tests::Tensor(ET_INT, {1}, std::vector{3}), + reference_tests::Tensor(ET, {7}, std::vector{ 3, 4, 5, 6, 5, 4, 3, }), op::PadMode::REFLECT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_reflect_1d_bottom_neg"), PadParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{-7}), - Tensor(ET_INT, {1}, std::vector{3}), - Tensor(ET, {2}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{-7}), + reference_tests::Tensor(ET_INT, {1}, std::vector{3}), + reference_tests::Tensor(ET, {2}, std::vector{ 4, 3, }), op::PadMode::REFLECT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_reflect_1d_bottom_neg_bigger_than_tensor"), PadParams( - Tensor(ET, {3, 4}, std::vector{ + reference_tests::Tensor(ET, {3, 4}, std::vector{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, }), - Tensor(ET_INT, {2}, std::vector{2, 3}), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET, {6, 9}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{2, 3}), + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET, {6, 9}, std::vector{ 12, 11, 10, 9, 10, 11, 12, 11, 10, 8, 7, 6, 5, 6, 7, 8, 7, 6, 4, 3, 2, 1, 2, 3, 4, 3, 2, @@ -800,18 +800,18 @@ std::vector generateParams() { 8, 7, 6, 5, 6, 7, 8, 7, 6, }), op::PadMode::REFLECT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_reflect_2d"), PadParams( - Tensor(ET, {3, 4}, std::vector{ + reference_tests::Tensor(ET, {3, 4}, std::vector{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, }), - Tensor(ET_INT, {2}, std::vector{2, -1}), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET, {6, 5}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{2, -1}), + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET, {6, 5}, std::vector{ 10, 11, 12, 11, 10, 6, 7, 8, 7, 6, 2, 3, 4, 3, 2, @@ -820,17 +820,17 @@ std::vector generateParams() { 6, 7, 8, 7, 6, }), op::PadMode::REFLECT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_reflect_2d_with_neg"), PadParams( - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {2}, std::vector{1, -1}), - Tensor(ET_INT, {2}, std::vector{2, 0}), - Tensor(ET, {5, 2}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{1, -1}), + reference_tests::Tensor(ET_INT, {2}, std::vector{2, 0}), + reference_tests::Tensor(ET, {5, 2}, std::vector{ 9, 9, 2, 3, 5, 6, @@ -838,26 +838,26 @@ std::vector generateParams() { 9, 9, }), op::PadMode::CONSTANT, - Tensor(ET, {}, std::vector{9}), + reference_tests::Tensor(ET, {}, std::vector{9}), "pad_negative_exterior_2d"), PadParams( - Tensor(ET, {3, 3}, std::vector{ + reference_tests::Tensor(ET, {3, 3}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {2}, std::vector{-1, -1}), - Tensor(ET_INT, {2}, std::vector{-1, -1}), - Tensor(ET, {1, 1}, std::vector{5}), + reference_tests::Tensor(ET_INT, {2}, std::vector{-1, -1}), + reference_tests::Tensor(ET_INT, {2}, std::vector{-1, -1}), + reference_tests::Tensor(ET, {1, 1}, std::vector{5}), op::PadMode::CONSTANT, - Tensor(ET, {}, std::vector{9}), + reference_tests::Tensor(ET, {}, std::vector{9}), "pad_negative_exterior_2d_all_negative"), PadParams( - Tensor(ET, {0, 0}, std::vector{}), - Tensor(ET_INT, {2}, std::vector{2, 3}), - Tensor(ET_INT, {2}, std::vector{3, 2}), - Tensor(ET, {5, 5}, std::vector{ + reference_tests::Tensor(ET, {0, 0}, std::vector{}), + reference_tests::Tensor(ET_INT, {2}, std::vector{2, 3}), + reference_tests::Tensor(ET_INT, {2}, std::vector{3, 2}), + reference_tests::Tensor(ET, {5, 5}, std::vector{ 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, @@ -865,14 +865,14 @@ std::vector generateParams() { 2112, 2112, 2112, 2112, 2112, }), op::PadMode::CONSTANT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_exterior_2d_0x0"), PadParams( - Tensor(ET, {0, 3}, std::vector{}), - Tensor(ET_INT, {2}, std::vector{2, 1}), - Tensor(ET_INT, {2}, std::vector{3, 1}), - Tensor(ET, {5, 5}, std::vector{ + reference_tests::Tensor(ET, {0, 3}, std::vector{}), + reference_tests::Tensor(ET_INT, {2}, std::vector{2, 1}), + reference_tests::Tensor(ET_INT, {2}, std::vector{3, 1}), + reference_tests::Tensor(ET, {5, 5}, std::vector{ 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, @@ -880,14 +880,14 @@ std::vector generateParams() { 2112, 2112, 2112, 2112, 2112, }), op::PadMode::CONSTANT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_exterior_2d_0x3"), PadParams( - Tensor(ET, {3, 0}, std::vector{}), - Tensor(ET_INT, {2}, std::vector{1, 3}), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET, {5, 5}, std::vector{ + reference_tests::Tensor(ET, {3, 0}, std::vector{}), + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 3}), + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET, {5, 5}, std::vector{ 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, @@ -895,11 +895,11 @@ std::vector generateParams() { 2112, 2112, 2112, 2112, 2112, }), op::PadMode::CONSTANT, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_exterior_2d_3x0"), PadParams( - Tensor(ET, {2, 2, 4, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 2, 4, 4}, std::vector{ 0, 1, 0, 2, 0, 3, 2, 0, 2, 0, 0, 0, @@ -920,9 +920,9 @@ std::vector generateParams() { 1, 1, 2, 0, 1, 0, 0, 0, }), - Tensor(ET_INT, {4}, std::vector{0, 0, 0, 0}), - Tensor(ET_INT, {4}, std::vector{0, 0, 2, 2}), - Tensor(ET, {2, 2, 6, 6}, std::vector{ + reference_tests::Tensor(ET_INT, {4}, std::vector{0, 0, 0, 0}), + reference_tests::Tensor(ET_INT, {4}, std::vector{0, 0, 2, 2}), + reference_tests::Tensor(ET, {2, 2, 6, 6}, std::vector{ 0, 1, 0, 2, 42, 42, 0, 3, 2, 0, 42, 42, 2, 0, 0, 0, 42, 42, @@ -952,24 +952,24 @@ std::vector generateParams() { 42, 42, 42, 42, 42, 42, }), op::PadMode::CONSTANT, - Tensor(ET, {}, std::vector{42}), + reference_tests::Tensor(ET, {}, std::vector{42}), "pad_2channel_2image_asym"), PadParams( - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET_INT, {2}, std::vector{1, 2}), - Tensor(ET, {4, 7}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET_INT, {2}, std::vector{1, 2}), + reference_tests::Tensor(ET, {4, 7}, std::vector{ 2, 1, 1, 2, 3, 3, 2, 2, 1, 1, 2, 3, 3, 2, 5, 4, 4, 5, 6, 6, 5, 5, 4, 4, 5, 6, 6, 5, }), op::PadMode::SYMMETRIC, - Tensor(ET, {}, std::vector{2112}), + reference_tests::Tensor(ET, {}, std::vector{2112}), "pad_symmetric"), }; return params; @@ -981,15 +981,15 @@ std::vector generateParamsFloatValue() { using T_INT = typename element_type_traits::value_type; std::vector params { PadParams( - Tensor(ET, {1, 2, 2, 2}, std::vector{ + reference_tests::Tensor(ET, {1, 2, 2, 2}, std::vector{ 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, }), - Tensor(ET_INT, {4}, std::vector{0, 0, 1, 1}), - Tensor(ET_INT, {4}, std::vector{0, 0, 1, 1}), - Tensor(ET, {1, 2, 4, 4}, std::vector{ + reference_tests::Tensor(ET_INT, {4}, std::vector{0, 0, 1, 1}), + reference_tests::Tensor(ET_INT, {4}, std::vector{0, 0, 1, 1}), + reference_tests::Tensor(ET, {1, 2, 4, 4}, std::vector{ 42.0f, 42.0f, 42.0f, 42.0f, 42.0f, 0.0f, 0.0f, 42.0f, 42.0f, 0.0f, 0.0f, 42.0f, @@ -1000,11 +1000,11 @@ std::vector generateParamsFloatValue() { 42.0f, 42.0f, 42.0f, 42.0f, }), op::PadMode::CONSTANT, - Tensor(ET, {}, std::vector{42}), + reference_tests::Tensor(ET, {}, std::vector{42}), "pad_exterior_4d_1x2x2x2"), PadParams( - Tensor(ET, {1, 3, 2, 2}, std::vector{ + reference_tests::Tensor(ET, {1, 3, 2, 2}, std::vector{ 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, @@ -1012,16 +1012,16 @@ std::vector generateParamsFloatValue() { 2.0f, 2.0f, 2.0f, 2.0f, }), - Tensor(ET_INT, {4}, std::vector{0, -1, 1, 1}), - Tensor(ET_INT, {4}, std::vector{0, -1, 1, 1}), - Tensor(ET, {1, 1, 4, 4}, std::vector{ + reference_tests::Tensor(ET_INT, {4}, std::vector{0, -1, 1, 1}), + reference_tests::Tensor(ET_INT, {4}, std::vector{0, -1, 1, 1}), + reference_tests::Tensor(ET, {1, 1, 4, 4}, std::vector{ 42.0f, 42.0f, 42.0f, 42.0f, 42.0f, 1.0f, 1.0f, 42.0f, 42.0f, 1.0f, 1.0f, 42.0f, 42.0f, 42.0f, 42.0f, 42.0f, }), op::PadMode::CONSTANT, - Tensor(ET, {}, std::vector{42}), + reference_tests::Tensor(ET, {}, std::vector{42}), "pad_negative_exterior_4d"), }; return params; @@ -1074,24 +1074,24 @@ std::vector generateParamsTooLarge() { using T_INT = typename element_type_traits::value_type; std::vector params { PadParams( - Tensor(ET, {2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2}, std::vector{ 1, 2, 4, 5, }), - Tensor(ET_INT, {2}, std::vector{0, 3}), - Tensor(ET_INT, {2}, std::vector{0, 0}), - Tensor(ET, {2, 5}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 3}), + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 0}), + reference_tests::Tensor(ET, {2, 5}, std::vector{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }), op::PadMode::SYMMETRIC, "pad_to_large_symmetric_padding"), PadParams( - Tensor(ET, {2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2}, std::vector{ 1, 2, 4, 5, }), - Tensor(ET_INT, {2}, std::vector{0, 2}), - Tensor(ET_INT, {2}, std::vector{0, 0}), - Tensor(ET, {2, 4}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 2}), + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 0}), + reference_tests::Tensor(ET, {2, 4}, std::vector{ 0, 0, 0, 0, 0, 0, 0, 0, }), op::PadMode::REFLECT, @@ -1124,24 +1124,24 @@ std::vector generateParamsOk() { using T_INT = typename element_type_traits::value_type; std::vector params { PadParams( - Tensor(ET, {2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2}, std::vector{ 1, 2, 4, 5, }), - Tensor(ET_INT, {2}, std::vector{0, 2}), - Tensor(ET_INT, {2}, std::vector{0, 0}), - Tensor(ET, {2, 4}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 2}), + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 0}), + reference_tests::Tensor(ET, {2, 4}, std::vector{ 2, 1, 1, 2, 5, 4, 4, 5, }), op::PadMode::SYMMETRIC, "pad_ok_symmetric_padding"), PadParams( - Tensor(ET, {2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2}, std::vector{ 1, 2, 4, 5, }), - Tensor(ET_INT, {2}, std::vector{0, 1}), - Tensor(ET_INT, {2}, std::vector{0, 0}), - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 1}), + reference_tests::Tensor(ET_INT, {2}, std::vector{0, 0}), + reference_tests::Tensor(ET, {2, 3}, std::vector{ 2, 1, 2, 5, 4, 5, }), op::PadMode::REFLECT, diff --git a/docs/template_plugin/tests/functional/op_reference/parameter_as_output.cpp b/docs/template_plugin/tests/functional/op_reference/parameter_as_output.cpp index 9ca5180f996..f5e77add7c5 100644 --- a/docs/template_plugin/tests/functional/op_reference/parameter_as_output.cpp +++ b/docs/template_plugin/tests/functional/op_reference/parameter_as_output.cpp @@ -32,8 +32,8 @@ struct ParameterParams { Shape m_expected_shape; element::Type m_input_type; element::Type m_expected_type; - runtime::Tensor m_input_value; - runtime::Tensor m_expected_value; + ov::Tensor m_input_value; + ov::Tensor m_expected_value; }; class ReferenceParameterLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/power.cpp b/docs/template_plugin/tests/functional/op_reference/power.cpp index 6d255e0cdf8..7ed77c9fae1 100644 --- a/docs/template_plugin/tests/functional/op_reference/power.cpp +++ b/docs/template_plugin/tests/functional/op_reference/power.cpp @@ -31,9 +31,9 @@ struct PowerParams { PartialShape pshape2; element::Type inType; element::Type outType; - runtime::Tensor inputData1; - runtime::Tensor inputData2; - runtime::Tensor refData; + ov::Tensor inputData1; + ov::Tensor inputData2; + ov::Tensor refData; }; class ReferencePowerLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/prelu.cpp b/docs/template_plugin/tests/functional/op_reference/prelu.cpp index 1e5a6e70ae8..37cd68fce0e 100644 --- a/docs/template_plugin/tests/functional/op_reference/prelu.cpp +++ b/docs/template_plugin/tests/functional/op_reference/prelu.cpp @@ -28,10 +28,10 @@ struct PreluParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; ov::Shape negativeSlopeShape; - ov::runtime::Tensor negativeSlope; + ov::Tensor negativeSlope; std::string testcaseName; }; diff --git a/docs/template_plugin/tests/functional/op_reference/prior_box.cpp b/docs/template_plugin/tests/functional/op_reference/prior_box.cpp index e00b5ae1951..29769385932 100644 --- a/docs/template_plugin/tests/functional/op_reference/prior_box.cpp +++ b/docs/template_plugin/tests/functional/op_reference/prior_box.cpp @@ -43,9 +43,9 @@ struct PriorBoxParams { ov::Shape imageShapeShape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor layerShapeData; - ov::runtime::Tensor imageShapeData; - ov::runtime::Tensor refData; + ov::Tensor layerShapeData; + ov::Tensor imageShapeData; + ov::Tensor refData; std::string testcaseName; }; @@ -83,9 +83,9 @@ struct PriorBoxV8Params { ov::Shape imageShapeShape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor layerShapeData; - ov::runtime::Tensor imageShapeData; - ov::runtime::Tensor refData; + ov::Tensor layerShapeData; + ov::Tensor imageShapeData; + ov::Tensor refData; std::string testcaseName; }; diff --git a/docs/template_plugin/tests/functional/op_reference/prior_box_clustered.cpp b/docs/template_plugin/tests/functional/op_reference/prior_box_clustered.cpp index edefedab93d..a7d50738176 100644 --- a/docs/template_plugin/tests/functional/op_reference/prior_box_clustered.cpp +++ b/docs/template_plugin/tests/functional/op_reference/prior_box_clustered.cpp @@ -43,9 +43,9 @@ struct PriorBoxClusteredParams { ov::Shape imageShapeShape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor layerShapeData; - ov::runtime::Tensor imageShapeData; - ov::runtime::Tensor refData; + ov::Tensor layerShapeData; + ov::Tensor imageShapeData; + ov::Tensor refData; std::string testcaseName; }; diff --git a/docs/template_plugin/tests/functional/op_reference/proposal.cpp b/docs/template_plugin/tests/functional/op_reference/proposal.cpp index 80774b3df9d..f680b267935 100644 --- a/docs/template_plugin/tests/functional/op_reference/proposal.cpp +++ b/docs/template_plugin/tests/functional/op_reference/proposal.cpp @@ -73,10 +73,10 @@ struct ProposalV1Params { ov::PartialShape imageShapeShape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor clsScoreData; - ov::runtime::Tensor bboxPredData; - ov::runtime::Tensor imageShapeData; - ov::runtime::Tensor refProposalData; + ov::Tensor clsScoreData; + ov::Tensor bboxPredData; + ov::Tensor imageShapeData; + ov::Tensor refProposalData; std::string testcaseName; }; @@ -144,11 +144,11 @@ struct ProposalV4Params { ov::PartialShape imageShapeShape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor clsScoreData; - ov::runtime::Tensor bboxPredData; - ov::runtime::Tensor imageShapeData; - ov::runtime::Tensor refProposalData; - ov::runtime::Tensor refProbsData; + ov::Tensor clsScoreData; + ov::Tensor bboxPredData; + ov::Tensor imageShapeData; + ov::Tensor refProposalData; + ov::Tensor refProbsData; std::string testcaseName; }; diff --git a/docs/template_plugin/tests/functional/op_reference/psroi_pooling.cpp b/docs/template_plugin/tests/functional/op_reference/psroi_pooling.cpp index 8fa2d638f7b..76267696bc4 100644 --- a/docs/template_plugin/tests/functional/op_reference/psroi_pooling.cpp +++ b/docs/template_plugin/tests/functional/op_reference/psroi_pooling.cpp @@ -56,9 +56,9 @@ struct PSROIPoolingParams { ov::element::Type imageInputType; ov::element::Type coordsInputType; ov::element::Type outType; - ov::runtime::Tensor imageData; - ov::runtime::Tensor coordsData; - ov::runtime::Tensor refData; + ov::Tensor imageData; + ov::Tensor coordsData; + ov::Tensor refData; std::string testcaseName; }; diff --git a/docs/template_plugin/tests/functional/op_reference/random_uniform.cpp b/docs/template_plugin/tests/functional/op_reference/random_uniform.cpp index 99441258dcc..89b86d7eda1 100644 --- a/docs/template_plugin/tests/functional/op_reference/random_uniform.cpp +++ b/docs/template_plugin/tests/functional/op_reference/random_uniform.cpp @@ -14,12 +14,12 @@ namespace { struct RandomUniformParams { RandomUniformParams(const std::vector& paramOutShape, - const Tensor& paramMinValue, - const Tensor& paramMaxValue, + const reference_tests::Tensor& paramMinValue, + const reference_tests::Tensor& paramMaxValue, ov::element::Type paramOutType, int64_t paramGlobalSeed, int64_t paramOpSeed, - const Tensor& paramExpected, + const reference_tests::Tensor& paramExpected, const std::string& test_name) : out_shape(paramOutShape), min_val(paramMinValue), @@ -30,12 +30,12 @@ struct RandomUniformParams { expected(paramExpected), test_case_name(test_name) {} std::vector out_shape; - Tensor min_val; - Tensor max_val; + reference_tests::Tensor min_val; + reference_tests::Tensor max_val; ov::element::Type out_type; int64_t global_seed; int64_t op_seed; - Tensor expected; + reference_tests::Tensor expected; std::string test_case_name; }; @@ -59,8 +59,8 @@ public: private: static std::shared_ptr CreateFunction(const std::vector& out_shape, - const Tensor& min_val, - const Tensor& max_val, + const reference_tests::Tensor& min_val, + const reference_tests::Tensor& max_val, const ov::element::Type& out_type, int64_t global_seed, int64_t op_seed) { @@ -90,12 +90,12 @@ INSTANTIATE_TEST_SUITE_P( ReferenceRandomUniformLayerTest, ::testing::Values( RandomUniformParams(std::vector{3, 2, 4}, - Tensor{{1}, element::f32, std::vector{0}}, - Tensor{{1}, element::f32, std::vector{1}}, + reference_tests::Tensor{{1}, element::f32, std::vector{0}}, + reference_tests::Tensor{{1}, element::f32, std::vector{1}}, element::Type_t::f32, 150, 10, - Tensor{{3, 2, 4}, + reference_tests::Tensor{{3, 2, 4}, element::f32, std::vector{0.70112360, 0.30539632, 0.93931055, 0.94560349, 0.11694777, 0.50770056, 0.51971972, 0.22727466, 0.99137402, 0.35519040, @@ -104,12 +104,12 @@ INSTANTIATE_TEST_SUITE_P( 0.23655081, 0.81056309, 0.74226606, 0.76106691}}, "float32_default_min_max"), RandomUniformParams(std::vector{3, 2, 4}, - Tensor{{1}, element::f16, std::vector{0}}, - Tensor{{1}, element::f16, std::vector{1}}, + reference_tests::Tensor{{1}, element::f16, std::vector{0}}, + reference_tests::Tensor{{1}, element::f16, std::vector{1}}, element::Type_t::f16, 150, 10, - Tensor{{3, 2, 4}, + reference_tests::Tensor{{3, 2, 4}, element::f16, std::vector{0.60449219, 0.80664062, 0.83203125, 0.38378906, 0.03613281, 0.08300781, 0.54394531, 0.83398438, 0.33593750, 0.71972656, @@ -118,12 +118,12 @@ INSTANTIATE_TEST_SUITE_P( 0.82421875, 0.13281250, 0.64355469, 0.66015625}}, "float16_default_min_max"), RandomUniformParams(std::vector{3, 2, 4}, - Tensor{{1}, element::f32, std::vector{-650}}, - Tensor{{1}, element::f32, std::vector{450}}, + reference_tests::Tensor{{1}, element::f32, std::vector{-650}}, + reference_tests::Tensor{{1}, element::f32, std::vector{450}}, element::Type_t::f32, 150, 10, - Tensor{{3, 2, 4}, + reference_tests::Tensor{{3, 2, 4}, element::f32, std::vector{121.23596191, -314.06405640, 383.24157715, 390.16381836, -521.35742188, -91.52935791, -78.30828857, -399.99786377, @@ -133,12 +133,12 @@ INSTANTIATE_TEST_SUITE_P( -389.79409790, 241.61938477, 166.49267578, 187.17358398}}, "float32_non_default_min_max"), RandomUniformParams(std::vector{3, 2, 4}, - Tensor{{1}, element::f16, std::vector{-1.5}}, - Tensor{{1}, element::f16, std::vector{-1.0}}, + reference_tests::Tensor{{1}, element::f16, std::vector{-1.5}}, + reference_tests::Tensor{{1}, element::f16, std::vector{-1.0}}, element::Type_t::f16, 150, 10, - Tensor{{3, 2, 4}, + reference_tests::Tensor{{3, 2, 4}, element::f16, std::vector{-1.19726562, -1.09667969, -1.08398438, -1.30859375, -1.48242188, -1.45898438, -1.22851562, -1.08300781, -1.33203125, -1.14062500, @@ -147,12 +147,12 @@ INSTANTIATE_TEST_SUITE_P( -1.08789062, -1.43359375, -1.17773438, -1.16992188}}, "float16_non_default_min_max"), RandomUniformParams(std::vector{2, 3, 4}, - Tensor{{1}, element::i32, std::vector{-100}}, - Tensor{{1}, element::i32, std::vector{50}}, + reference_tests::Tensor{{1}, element::i32, std::vector{-100}}, + reference_tests::Tensor{{1}, element::i32, std::vector{50}}, element::Type_t::i32, 100, 350, - Tensor{{2, 3, 4}, + reference_tests::Tensor{{2, 3, 4}, element::i32, std::vector{ 22, -56, -33, -89, -98, -33, -3, -48, -82, 5, -66, 21, @@ -160,12 +160,12 @@ INSTANTIATE_TEST_SUITE_P( }}, "int32"), RandomUniformParams(std::vector{5, 4, 3}, - Tensor{{1}, element::i64, std::vector{-2600}}, - Tensor{{1}, element::i64, std::vector{3700}}, + reference_tests::Tensor{{1}, element::i64, std::vector{-2600}}, + reference_tests::Tensor{{1}, element::i64, std::vector{3700}}, element::Type_t::i64, 755, 951, - Tensor{{5, 4, 3}, + reference_tests::Tensor{{5, 4, 3}, element::i64, std::vector{ 2116, -1581, 2559, -339, -1660, 519, 90, 2027, -210, 3330, 1831, -1737, @@ -175,12 +175,12 @@ INSTANTIATE_TEST_SUITE_P( 1242, 2672, -1585, -2271, 3536, -1502, 400, 2241, 3126, 908, 1073, -2110}}, "int64"), RandomUniformParams(std::vector{7, 3}, - Tensor{{1}, element::bf16, std::vector{0}}, - Tensor{{1}, element::bf16, std::vector{1}}, + reference_tests::Tensor{{1}, element::bf16, std::vector{0}}, + reference_tests::Tensor{{1}, element::bf16, std::vector{1}}, element::Type_t::bf16, 4978, 5164, - Tensor{{7, 3}, + reference_tests::Tensor{{7, 3}, element::bf16, std::vector{0.8984375, 0.84375, 0.1640625, 0.1875, 0.46875, 0.6875, 0.5234375, 0.3046875, 0.9140625, 0.453125, 0.953125, 0.328125, @@ -188,12 +188,12 @@ INSTANTIATE_TEST_SUITE_P( 0.8203125, 0.453125, 0.875}}, "bfloat16_default_min_max"), RandomUniformParams(std::vector{7, 3}, - Tensor{{1}, element::bf16, std::vector{-150}}, - Tensor{{1}, element::bf16, std::vector{200}}, + reference_tests::Tensor{{1}, element::bf16, std::vector{-150}}, + reference_tests::Tensor{{1}, element::bf16, std::vector{200}}, element::Type_t::bf16, 4978, 5164, - Tensor{{7, 3}, + reference_tests::Tensor{{7, 3}, element::bf16, std::vector{164, 146, -92.5, -84.5, 14, 90, 33, -43.5, 170, 8, 182, -35, -24, -84.5, 180, -14, -73.5, 198, 138, 8, 156}}, diff --git a/docs/template_plugin/tests/functional/op_reference/range.cpp b/docs/template_plugin/tests/functional/op_reference/range.cpp index 9ea1d536275..7c7d02ae5a7 100644 --- a/docs/template_plugin/tests/functional/op_reference/range.cpp +++ b/docs/template_plugin/tests/functional/op_reference/range.cpp @@ -38,8 +38,8 @@ struct RangeParams { element::Type inType; element::Type outType; element::Type nodeType; - runtime::Tensor inData; - runtime::Tensor outData; + ov::Tensor inData; + ov::Tensor outData; float start; float stop; float step; diff --git a/docs/template_plugin/tests/functional/op_reference/reduce_l1.cpp b/docs/template_plugin/tests/functional/op_reference/reduce_l1.cpp index df8b1a7bd4e..da0032c5c5e 100644 --- a/docs/template_plugin/tests/functional/op_reference/reduce_l1.cpp +++ b/docs/template_plugin/tests/functional/op_reference/reduce_l1.cpp @@ -19,8 +19,8 @@ std::vector generateReductionParams(const bool keep_dims) { using T = typename element_type_traits::value_type; std::vector params = { ReductionParams(ReductionType::L1, keep_dims, std::vector{2}, - Tensor({3, 2, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), - Tensor(ngraph::reduce(Shape{3, 2, 2}, AxisSet{2}, keep_dims), + reference_tests::Tensor({3, 2, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), + reference_tests::Tensor(ngraph::reduce(Shape{3, 2, 2}, AxisSet{2}, keep_dims), element::Type(IN_ET), std::vector{3, 7, 11, 15, 19, 23})) }; return params; diff --git a/docs/template_plugin/tests/functional/op_reference/reduce_l2.cpp b/docs/template_plugin/tests/functional/op_reference/reduce_l2.cpp index 98053d727f4..21c73035119 100644 --- a/docs/template_plugin/tests/functional/op_reference/reduce_l2.cpp +++ b/docs/template_plugin/tests/functional/op_reference/reduce_l2.cpp @@ -20,8 +20,8 @@ std::vector generateReductionParams(const bool keep_dims) { using T = typename element_type_traits::value_type; std::vector params = { ReductionParams(ReductionType::L2, keep_dims, std::vector{2}, - Tensor({3, 2, 2}, element::Type(IN_ET), std::vector{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0}), - Tensor(ngraph::reduce(Shape{3, 2, 2}, AxisSet{2}, keep_dims), + reference_tests::Tensor({3, 2, 2}, element::Type(IN_ET), std::vector{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0}), + reference_tests::Tensor(ngraph::reduce(Shape{3, 2, 2}, AxisSet{2}, keep_dims), element::Type(IN_ET), std::vector{2.23606798, 5.0, 7.81024968, 10.63014581, 13.45362405, 16.2788206})) }; return params; @@ -33,8 +33,8 @@ std::vector generateReductionParams(const bool keep_dims) { using T = typename element_type_traits::value_type; std::vector params = { ReductionParams(ReductionType::L2, keep_dims, std::vector{2}, - Tensor({3, 2, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), - Tensor(ngraph::reduce(Shape{3, 2, 2}, AxisSet{2}, keep_dims), element::Type(IN_ET), std::vector{2, 5, 8, 11, 13, 16})) + reference_tests::Tensor({3, 2, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), + reference_tests::Tensor(ngraph::reduce(Shape{3, 2, 2}, AxisSet{2}, keep_dims), element::Type(IN_ET), std::vector{2, 5, 8, 11, 13, 16})) }; return params; } diff --git a/docs/template_plugin/tests/functional/op_reference/reduce_max.cpp b/docs/template_plugin/tests/functional/op_reference/reduce_max.cpp index d4b0571a793..c4374dd5521 100644 --- a/docs/template_plugin/tests/functional/op_reference/reduce_max.cpp +++ b/docs/template_plugin/tests/functional/op_reference/reduce_max.cpp @@ -19,31 +19,31 @@ std::vector generateReductionParams(const bool keep_dims) { using T = typename element_type_traits::value_type; std::vector params = { ReductionParams(ReductionType::Max, keep_dims, std::vector{0, 1}, - Tensor({2, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4}), - Tensor(ngraph::reduce(Shape{2, 2}, AxisSet{0, 1}, keep_dims), element::Type(IN_ET), std::vector{4})), + reference_tests::Tensor({2, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4}), + reference_tests::Tensor(ngraph::reduce(Shape{2, 2}, AxisSet{0, 1}, keep_dims), element::Type(IN_ET), std::vector{4})), ReductionParams(ReductionType::Max, keep_dims, std::vector{0}, - Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{5, 6})), + reference_tests::Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{5, 6})), ReductionParams(ReductionType::Max, keep_dims, std::vector{1}, - Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{1}, keep_dims), element::Type(IN_ET), std::vector{2, 4, 6})), + reference_tests::Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{1}, keep_dims), element::Type(IN_ET), std::vector{2, 4, 6})), ReductionParams(ReductionType::Max, keep_dims, std::vector{0}, - Tensor({3, 3, 3}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({3, 3, 3}, element::Type(IN_ET), std::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}), - Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0}, keep_dims), + reference_tests::Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{19, 20, 21, 22, 23, 24, 25, 26, 27})), ReductionParams(ReductionType::Max, keep_dims, std::vector{2}, - Tensor({3, 3, 3}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({3, 3, 3}, element::Type(IN_ET), std::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}), - Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{2}, keep_dims), element::Type(IN_ET), std::vector{3, 6, 9, 12, 15, 18, 21, 24, 27})), + reference_tests::Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{2}, keep_dims), element::Type(IN_ET), std::vector{3, 6, 9, 12, 15, 18, 21, 24, 27})), ReductionParams(ReductionType::Max, keep_dims, std::vector{0, 1}, - Tensor({3, 3, 3}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({3, 3, 3}, element::Type(IN_ET), std::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}), - Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0, 1}, keep_dims), element::Type(IN_ET), std::vector{25, 26, 27})), + reference_tests::Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0, 1}, keep_dims), element::Type(IN_ET), std::vector{25, 26, 27})), ReductionParams(ReductionType::Max, keep_dims, std::vector{0, 1, 2}, - Tensor({3, 3, 3}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({3, 3, 3}, element::Type(IN_ET), std::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}), - Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0, 1, 2}, keep_dims), element::Type(IN_ET), std::vector{27})) + reference_tests::Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0, 1, 2}, keep_dims), element::Type(IN_ET), std::vector{27})) }; return params; } diff --git a/docs/template_plugin/tests/functional/op_reference/reduce_mean.cpp b/docs/template_plugin/tests/functional/op_reference/reduce_mean.cpp index cab654c1793..8ea4cbd8fcb 100644 --- a/docs/template_plugin/tests/functional/op_reference/reduce_mean.cpp +++ b/docs/template_plugin/tests/functional/op_reference/reduce_mean.cpp @@ -20,14 +20,14 @@ std::vector generateReductionParams(const bool keep_dims) { using T = typename element_type_traits::value_type; std::vector params = { ReductionParams(ReductionType::Mean, keep_dims, std::vector{0, 1}, - Tensor({2, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4}), - Tensor(ngraph::reduce(Shape{2, 2}, AxisSet{0, 1}, keep_dims), element::Type(IN_ET), std::vector{2.5})), + reference_tests::Tensor({2, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4}), + reference_tests::Tensor(ngraph::reduce(Shape{2, 2}, AxisSet{0, 1}, keep_dims), element::Type(IN_ET), std::vector{2.5})), ReductionParams(ReductionType::Mean, keep_dims, std::vector{0}, - Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{3, 4})), + reference_tests::Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{3, 4})), ReductionParams(ReductionType::Mean, keep_dims, std::vector{1}, - Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{1}, keep_dims), element::Type(IN_ET), std::vector{1.5, 3.5, 5.5})) + reference_tests::Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{1}, keep_dims), element::Type(IN_ET), std::vector{1.5, 3.5, 5.5})) }; return params; } @@ -38,14 +38,14 @@ std::vector generateReductionParams(const bool keep_dims) { using T = typename element_type_traits::value_type; std::vector params = { ReductionParams(ReductionType::Mean, keep_dims, std::vector{0, 1}, - Tensor({2, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4}), - Tensor(ngraph::reduce(Shape{2, 2}, AxisSet{0, 1}, keep_dims), element::Type(IN_ET), std::vector{2})), + reference_tests::Tensor({2, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4}), + reference_tests::Tensor(ngraph::reduce(Shape{2, 2}, AxisSet{0, 1}, keep_dims), element::Type(IN_ET), std::vector{2})), ReductionParams(ReductionType::Mean, keep_dims, std::vector{0}, - Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{3, 4})), + reference_tests::Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{3, 4})), ReductionParams(ReductionType::Mean, keep_dims, std::vector{1}, - Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{1}, keep_dims), element::Type(IN_ET), std::vector{1, 3, 5})) + reference_tests::Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{1}, keep_dims), element::Type(IN_ET), std::vector{1, 3, 5})) }; return params; } diff --git a/docs/template_plugin/tests/functional/op_reference/reduce_min.cpp b/docs/template_plugin/tests/functional/op_reference/reduce_min.cpp index ad49ad9e987..f7ab4eaa10b 100644 --- a/docs/template_plugin/tests/functional/op_reference/reduce_min.cpp +++ b/docs/template_plugin/tests/functional/op_reference/reduce_min.cpp @@ -19,30 +19,30 @@ std::vector generateReductionParams(const bool keep_dims) { using T = typename element_type_traits::value_type; std::vector params = { ReductionParams(ReductionType::Min, keep_dims, std::vector{0, 1}, - Tensor({2, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4}), - Tensor(ngraph::reduce(Shape{2, 2}, AxisSet{0, 1}, keep_dims), element::Type(IN_ET), std::vector{1})), + reference_tests::Tensor({2, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4}), + reference_tests::Tensor(ngraph::reduce(Shape{2, 2}, AxisSet{0, 1}, keep_dims), element::Type(IN_ET), std::vector{1})), ReductionParams(ReductionType::Min, keep_dims, std::vector{0}, - Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{1, 2})), + reference_tests::Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{1, 2})), ReductionParams(ReductionType::Min, keep_dims, std::vector{1}, - Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{1}, keep_dims), element::Type(IN_ET), std::vector{1, 3, 5})), + reference_tests::Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{1}, keep_dims), element::Type(IN_ET), std::vector{1, 3, 5})), ReductionParams(ReductionType::Min, keep_dims, std::vector{0}, - Tensor({3, 3, 3}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({3, 3, 3}, element::Type(IN_ET), std::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}), - Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9})), + reference_tests::Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9})), ReductionParams(ReductionType::Min, keep_dims, std::vector{2}, - Tensor({3, 3, 3}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({3, 3, 3}, element::Type(IN_ET), std::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}), - Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{2}, keep_dims), element::Type(IN_ET), std::vector{1, 4, 7, 10, 13, 16, 19, 22, 25})), + reference_tests::Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{2}, keep_dims), element::Type(IN_ET), std::vector{1, 4, 7, 10, 13, 16, 19, 22, 25})), ReductionParams(ReductionType::Min, keep_dims, std::vector{0, 1}, - Tensor({3, 3, 3}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({3, 3, 3}, element::Type(IN_ET), std::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}), - Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0, 1}, keep_dims), element::Type(IN_ET), std::vector{1, 2, 3})), + reference_tests::Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0, 1}, keep_dims), element::Type(IN_ET), std::vector{1, 2, 3})), ReductionParams(ReductionType::Min, keep_dims, std::vector{0, 1, 2}, - Tensor({3, 3, 3}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({3, 3, 3}, element::Type(IN_ET), std::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}), - Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0, 1, 2}, keep_dims), element::Type(IN_ET), std::vector{1})) + reference_tests::Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0, 1, 2}, keep_dims), element::Type(IN_ET), std::vector{1})) }; return params; } diff --git a/docs/template_plugin/tests/functional/op_reference/reduce_prod.cpp b/docs/template_plugin/tests/functional/op_reference/reduce_prod.cpp index 5a17c0b91d8..67f9e558bc1 100644 --- a/docs/template_plugin/tests/functional/op_reference/reduce_prod.cpp +++ b/docs/template_plugin/tests/functional/op_reference/reduce_prod.cpp @@ -18,18 +18,18 @@ std::vector generateReductionParams(const bool keep_dims) { using T = typename element_type_traits::value_type; std::vector params = { ReductionParams(ReductionType::Prod, keep_dims, std::vector{0, 1}, - Tensor({2, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4}), - Tensor(ngraph::reduce(Shape{2, 2}, AxisSet{0, 1}, keep_dims), element::Type(IN_ET), std::vector{24})), + reference_tests::Tensor({2, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4}), + reference_tests::Tensor(ngraph::reduce(Shape{2, 2}, AxisSet{0, 1}, keep_dims), element::Type(IN_ET), std::vector{24})), ReductionParams(ReductionType::Prod, keep_dims, std::vector{0}, - Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{15, 48})), + reference_tests::Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{15, 48})), ReductionParams(ReductionType::Prod, keep_dims, std::vector{1}, - Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{1}, keep_dims), element::Type(IN_ET), std::vector{2, 12, 30})), + reference_tests::Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{1}, keep_dims), element::Type(IN_ET), std::vector{2, 12, 30})), ReductionParams(ReductionType::Prod, keep_dims, std::vector{0}, - Tensor({3, 3, 3}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({3, 3, 3}, element::Type(IN_ET), std::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}), - Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{1 * 10 * 19, + reference_tests::Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{1 * 10 * 19, 2 * 11 * 20, 3 * 12 * 21, 4 * 13 * 22, @@ -39,9 +39,9 @@ std::vector generateReductionParams(const bool keep_dims) { 8 * 17 * 26, 9 * 18 * 27})), ReductionParams(ReductionType::Prod, keep_dims, std::vector{2}, - Tensor({3, 3, 3}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({3, 3, 3}, element::Type(IN_ET), std::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}), - Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{2}, keep_dims), element::Type(IN_ET), std::vector{1 * 2 * 3, + reference_tests::Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{2}, keep_dims), element::Type(IN_ET), std::vector{1 * 2 * 3, 4 * 5 * 6, 7 * 8 * 9, 10 * 11 * 12, @@ -74,16 +74,16 @@ std::vector generateReductionCombinedParams() { combinedParams.push_back( ReductionParams(ReductionType::Prod, true, std::vector{0, 1}, - Tensor({3, 3, 3}, element::Type_t::f32, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({3, 3, 3}, element::Type_t::f32, std::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}), - Tensor({1, 1, 3}, element::Type_t::f32, std::vector{1.0f * 10.0f * 19.0f * 4.0f * 13.0f * 22.0f * 7.0f * 16.0f * 25.0f, + reference_tests::Tensor({1, 1, 3}, element::Type_t::f32, std::vector{1.0f * 10.0f * 19.0f * 4.0f * 13.0f * 22.0f * 7.0f * 16.0f * 25.0f, 2.0f * 11.0f * 20.0f * 5.0f * 14.0f * 23.0f * 8.0f * 17.0f * 26.0f, 3.0f * 12.0f * 21.0f * 6.0f * 15.0f * 24.0f * 9.0f * 18.0f * 27.0f}))); combinedParams.push_back( ReductionParams(ReductionType::Prod, true, std::vector{0, 1, 2}, - Tensor({3, 3, 3}, element::Type_t::f32, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + reference_tests::Tensor({3, 3, 3}, element::Type_t::f32, std::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}), - Tensor({1, 1, 1}, element::Type_t::f32, std::vector{1.0f * 10.0f * 9.0f * 4.0f * 13.0f * 6.0f * 7.0f * + reference_tests::Tensor({1, 1, 1}, element::Type_t::f32, std::vector{1.0f * 10.0f * 9.0f * 4.0f * 13.0f * 6.0f * 7.0f * 12.0f * 3.0f * 2.0f * 11.0f * 8.0f * 5.0f * 14.0f * 5.0f * 8.0f * 11.0f * 2.0f * 3.0f * 12.0f * 7.0f * 6.0f * 13.0f * 4.0f * 9.0f * 10.0f * 1.0f}))); diff --git a/docs/template_plugin/tests/functional/op_reference/reduce_sum.cpp b/docs/template_plugin/tests/functional/op_reference/reduce_sum.cpp index ff843dfd734..710a25d7d77 100644 --- a/docs/template_plugin/tests/functional/op_reference/reduce_sum.cpp +++ b/docs/template_plugin/tests/functional/op_reference/reduce_sum.cpp @@ -30,18 +30,18 @@ std::vector generateReductionParams(const bool keep_dims) { using T = typename element_type_traits::value_type; std::vector params = { ReductionParams(ReductionType::Sum, keep_dims, std::vector{0, 1}, - Tensor({2, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4}), - Tensor(ngraph::reduce(Shape{2, 2}, AxisSet{0, 1}, keep_dims), element::Type(IN_ET), std::vector{10})), + reference_tests::Tensor({2, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4}), + reference_tests::Tensor(ngraph::reduce(Shape{2, 2}, AxisSet{0, 1}, keep_dims), element::Type(IN_ET), std::vector{10})), ReductionParams(ReductionType::Sum, keep_dims, std::vector{0}, - Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{9, 12})), + reference_tests::Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{9, 12})), ReductionParams(ReductionType::Sum, keep_dims, std::vector{1}, - Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{1}, keep_dims), element::Type(IN_ET), std::vector{3, 7, 11})), + reference_tests::Tensor({3, 2}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ngraph::reduce(Shape{3, 2}, AxisSet{1}, keep_dims), element::Type(IN_ET), std::vector{3, 7, 11})), ReductionParams(ReductionType::Sum, keep_dims, std::vector{0}, - Tensor({3, 3, 3}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({3, 3, 3}, element::Type(IN_ET), std::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}), - Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{1 + 10 + 19, + reference_tests::Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0}, keep_dims), element::Type(IN_ET), std::vector{1 + 10 + 19, 2 + 11 + 20, 3 + 12 + 21, 4 + 13 + 22, @@ -51,9 +51,9 @@ std::vector generateReductionParams(const bool keep_dims) { 8 + 17 + 26, 9 + 18 + 27})), ReductionParams(ReductionType::Sum, keep_dims, std::vector{2}, - Tensor({3, 3, 3}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({3, 3, 3}, element::Type(IN_ET), std::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}), - Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{2}, keep_dims), element::Type(IN_ET), std::vector{1 + 2 + 3, + reference_tests::Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{2}, keep_dims), element::Type(IN_ET), std::vector{1 + 2 + 3, 4 + 5 + 6, 7 + 8 + 9, 10 + 11 + 12, @@ -63,21 +63,21 @@ std::vector generateReductionParams(const bool keep_dims) { 22 + 23 + 24, 25 + 26 + 27})), ReductionParams(ReductionType::Sum, keep_dims, std::vector{0, 1}, - Tensor({3, 3, 3}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({3, 3, 3}, element::Type(IN_ET), std::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}), - Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0, 1}, keep_dims), + reference_tests::Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0, 1}, keep_dims), element::Type(IN_ET), std::vector{1 + 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})), ReductionParams(ReductionType::Sum, keep_dims, std::vector{0, 1, 2}, - Tensor({3, 3, 3}, element::Type(IN_ET), std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + reference_tests::Tensor({3, 3, 3}, element::Type(IN_ET), std::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}), - Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0, 1, 2}, keep_dims), element::Type(IN_ET), + reference_tests::Tensor(ngraph::reduce(Shape{3, 3, 3}, AxisSet{0, 1, 2}, keep_dims), element::Type(IN_ET), std::vector{1 + 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})), ReductionParams(ReductionType::Sum, keep_dims, std::vector{0, 1, 2, 3, 4}, - Tensor({3, 3, 3, 3, 3}, element::Type(IN_ET), std::vector(std::pow(3, 5), 1)), - Tensor(ngraph::reduce(Shape{3, 3, 3, 3, 3}, AxisSet{0, 1, 2, 3, 4}, keep_dims), element::Type(IN_ET), std::vector{243})) + reference_tests::Tensor({3, 3, 3, 3, 3}, element::Type(IN_ET), std::vector(std::pow(3, 5), 1)), + reference_tests::Tensor(ngraph::reduce(Shape{3, 3, 3, 3, 3}, AxisSet{0, 1, 2, 3, 4}, keep_dims), element::Type(IN_ET), std::vector{243})) }; return params; } @@ -87,13 +87,13 @@ std::vector generateReductionParamsFloat(const bool keep_dims) float res = std::accumulate(std::begin(in), std::end(in), 0); std::vector params = { ReductionParams(ReductionType::Sum, keep_dims, std::vector{0}, - Tensor({1000000}, element::f32, in), - Tensor(ngraph::reduce(Shape{1000000}, AxisSet{0}, keep_dims), element::f32, std::vector{res})), + reference_tests::Tensor({1000000}, element::f32, in), + reference_tests::Tensor(ngraph::reduce(Shape{1000000}, AxisSet{0}, keep_dims), element::f32, std::vector{res})), ReductionParams(ReductionType::Sum, keep_dims, std::vector{0}, - Tensor({20}, element::f32, std::vector{10000000.0f, 0.9f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, + reference_tests::Tensor({20}, element::f32, std::vector{10000000.0f, 0.9f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.1f, 0.9f, 0.5f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 0.1f}), - Tensor(ngraph::reduce(Shape{20}, AxisSet{0}, keep_dims), element::f32, std::vector{10000010.2f})) + reference_tests::Tensor(ngraph::reduce(Shape{20}, AxisSet{0}, keep_dims), element::f32, std::vector{10000010.2f})) }; return params; } diff --git a/docs/template_plugin/tests/functional/op_reference/reduction.hpp b/docs/template_plugin/tests/functional/op_reference/reduction.hpp index 2613ada8983..852feedddea 100644 --- a/docs/template_plugin/tests/functional/op_reference/reduction.hpp +++ b/docs/template_plugin/tests/functional/op_reference/reduction.hpp @@ -16,14 +16,14 @@ namespace ReductionOpsRefTestDefinitions { struct ReductionParams { ReductionParams(const ngraph::helpers::ReductionType& reductType, const bool keepDims, const std::vector& axes, - const Tensor& dataTensor, const Tensor& outputTensor) : reductionType(reductType), keepDimensions(keepDims), reductionAxes(axes), + const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& outputTensor) : reductionType(reductType), keepDimensions(keepDims), reductionAxes(axes), data(dataTensor), output(outputTensor) {} ngraph::helpers::ReductionType reductionType; bool keepDimensions; std::vector reductionAxes; - Tensor data; - Tensor output; + reference_tests::Tensor data; + reference_tests::Tensor output; }; class ReferenceReductionLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/relu.cpp b/docs/template_plugin/tests/functional/op_reference/relu.cpp index ce10cfd33a5..29158a01133 100644 --- a/docs/template_plugin/tests/functional/op_reference/relu.cpp +++ b/docs/template_plugin/tests/functional/op_reference/relu.cpp @@ -23,8 +23,8 @@ struct ReluParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceReluLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/reorg_yolo.cpp b/docs/template_plugin/tests/functional/op_reference/reorg_yolo.cpp index ed7d2de66e6..adfe1f0557c 100644 --- a/docs/template_plugin/tests/functional/op_reference/reorg_yolo.cpp +++ b/docs/template_plugin/tests/functional/op_reference/reorg_yolo.cpp @@ -33,8 +33,8 @@ struct ReorgYoloParams { ov::PartialShape inputShape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; std::string testcaseName; }; diff --git a/docs/template_plugin/tests/functional/op_reference/reshape.cpp b/docs/template_plugin/tests/functional/op_reference/reshape.cpp index 8acedb7f4b1..becac9eb8f2 100644 --- a/docs/template_plugin/tests/functional/op_reference/reshape.cpp +++ b/docs/template_plugin/tests/functional/op_reference/reshape.cpp @@ -63,8 +63,8 @@ struct ReshapeParams { Shape m_expected_shape; element::Type m_input_type; element::Type m_expected_type; - runtime::Tensor m_input_value; - runtime::Tensor m_expected_value; + ov::Tensor m_input_value; + ov::Tensor m_expected_value; bool m_zero_flag; }; @@ -98,8 +98,8 @@ struct ReshapeShuffleParams { Shape m_expected_shape; element::Type m_input_type; element::Type m_expected_type; - runtime::Tensor m_input_value; - runtime::Tensor m_expected_value; + ov::Tensor m_input_value; + ov::Tensor m_expected_value; bool m_zero_flag; }; diff --git a/docs/template_plugin/tests/functional/op_reference/result.cpp b/docs/template_plugin/tests/functional/op_reference/result.cpp index de89a31a6e3..baca1bc9691 100644 --- a/docs/template_plugin/tests/functional/op_reference/result.cpp +++ b/docs/template_plugin/tests/functional/op_reference/result.cpp @@ -32,8 +32,8 @@ struct ResultParams { Shape m_expected_shape; element::Type m_input_type; element::Type m_expected_type; - runtime::Tensor m_input_value; - runtime::Tensor m_expected_value; + ov::Tensor m_input_value; + ov::Tensor m_expected_value; }; class ReferenceResultLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/reverse.cpp b/docs/template_plugin/tests/functional/op_reference/reverse.cpp index b20e465116f..a15f82a6d9a 100644 --- a/docs/template_plugin/tests/functional/op_reference/reverse.cpp +++ b/docs/template_plugin/tests/functional/op_reference/reverse.cpp @@ -13,16 +13,16 @@ using namespace ov; namespace { struct ReverseParams { - ReverseParams(const Tensor& constantTensor, const op::v1::Reverse::Mode reverseMode, - const Tensor& dataTensor, const Tensor& expectedTensor, const std::string& testcaseName = "") : + ReverseParams(const reference_tests::Tensor& constantTensor, const op::v1::Reverse::Mode reverseMode, + const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : constantTensor(constantTensor), reverseMode(reverseMode), dataTensor(dataTensor), expectedTensor(expectedTensor), testcaseName(testcaseName) {} - Tensor constantTensor; + reference_tests::Tensor constantTensor; op::v1::Reverse::Mode reverseMode; - Tensor dataTensor; - Tensor expectedTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -114,101 +114,101 @@ std::vector generateParams() { using T = typename element_type_traits::value_type; std::vector params { // nothing_to_reverse - ReverseParams(Tensor({0}, element::i64, std::vector{}), + ReverseParams(reference_tests::Tensor({0}, element::i64, std::vector{}), op::v1::Reverse::Mode::INDEX, - Tensor({8}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7}), - Tensor({8}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7}), + reference_tests::Tensor({8}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7}), + reference_tests::Tensor({8}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7}), "nothing_to_reverse"), // reverse_1d - ReverseParams(Tensor({1}, element::i64, std::vector{0}), + ReverseParams(reference_tests::Tensor({1}, element::i64, std::vector{0}), op::v1::Reverse::Mode::INDEX, - Tensor({8}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7}), - Tensor({8}, IN_ET, std::vector{7, 6, 5, 4, 3, 2, 1, 0}), + reference_tests::Tensor({8}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7}), + reference_tests::Tensor({8}, IN_ET, std::vector{7, 6, 5, 4, 3, 2, 1, 0}), "reverse_1d"), // reverse_2d_0 - ReverseParams(Tensor({1}, element::i64, std::vector{0}), + ReverseParams(reference_tests::Tensor({1}, element::i64, std::vector{0}), op::v1::Reverse::Mode::INDEX, - Tensor({4, 3}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), - Tensor({4, 3}, IN_ET, std::vector{9, 10, 11, 6, 7, 8, 3, 4, 5, 0, 1, 2}), + reference_tests::Tensor({4, 3}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), + reference_tests::Tensor({4, 3}, IN_ET, std::vector{9, 10, 11, 6, 7, 8, 3, 4, 5, 0, 1, 2}), "reverse_2d_0"), // reverse_2d_1 - ReverseParams(Tensor({1}, element::i64, std::vector{1}), + ReverseParams(reference_tests::Tensor({1}, element::i64, std::vector{1}), op::v1::Reverse::Mode::INDEX, - Tensor({4, 3}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), - Tensor({4, 3}, IN_ET, std::vector{2, 1, 0, 5, 4, 3, 8, 7, 6, 11, 10, 9}), + reference_tests::Tensor({4, 3}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), + reference_tests::Tensor({4, 3}, IN_ET, std::vector{2, 1, 0, 5, 4, 3, 8, 7, 6, 11, 10, 9}), "reverse_2d_1"), // reverse_2d_1_mask - ReverseParams(Tensor({2}, element::boolean, std::vector{false, true}), + ReverseParams(reference_tests::Tensor({2}, element::boolean, std::vector{false, true}), op::v1::Reverse::Mode::MASK, - Tensor({4, 3}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), - Tensor({4, 3}, IN_ET, std::vector{2, 1, 0, 5, 4, 3, 8, 7, 6, 11, 10, 9}), + reference_tests::Tensor({4, 3}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), + reference_tests::Tensor({4, 3}, IN_ET, std::vector{2, 1, 0, 5, 4, 3, 8, 7, 6, 11, 10, 9}), "reverse_2d_1_mask"), // reverse_2d_01 - ReverseParams(Tensor({2}, element::i64, std::vector{0, 1}), + ReverseParams(reference_tests::Tensor({2}, element::i64, std::vector{0, 1}), op::v1::Reverse::Mode::INDEX, - Tensor({4, 3}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), - Tensor({4, 3}, IN_ET, std::vector{11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}), + reference_tests::Tensor({4, 3}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), + reference_tests::Tensor({4, 3}, IN_ET, std::vector{11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}), "reverse_2d_01"), // reverse_2d_01_mask - ReverseParams(Tensor({2}, element::boolean, std::vector{true, true}), + ReverseParams(reference_tests::Tensor({2}, element::boolean, std::vector{true, true}), op::v1::Reverse::Mode::MASK, - Tensor({4, 3}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), - Tensor({4, 3}, IN_ET, std::vector{11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}), + reference_tests::Tensor({4, 3}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), + reference_tests::Tensor({4, 3}, IN_ET, std::vector{11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}), "reverse_2d_01_mask"), // reverse_3d_0 - ReverseParams(Tensor({1}, element::i64, std::vector{0}), + ReverseParams(reference_tests::Tensor({1}, element::i64, std::vector{0}), op::v1::Reverse::Mode::INDEX, - Tensor({2, 4, 3}, IN_ET, std::vector{ + reference_tests::Tensor({2, 4, 3}, IN_ET, 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}), - Tensor({2, 4, 3}, IN_ET, std::vector{ + reference_tests::Tensor({2, 4, 3}, IN_ET, std::vector{ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), "reverse_3d_0"), // reverse_3d_1 - ReverseParams(Tensor({1}, element::i64, std::vector{1}), + ReverseParams(reference_tests::Tensor({1}, element::i64, std::vector{1}), op::v1::Reverse::Mode::INDEX, - Tensor({2, 4, 3}, IN_ET, std::vector{ + reference_tests::Tensor({2, 4, 3}, IN_ET, 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}), - Tensor({2, 4, 3}, IN_ET, std::vector{ + reference_tests::Tensor({2, 4, 3}, IN_ET, std::vector{ 9, 10, 11, 6, 7, 8, 3, 4, 5, 0, 1, 2, 21, 22, 23, 18, 19, 20, 15, 16, 17, 12, 13, 14}), "reverse_3d_1"), // reverse_3d_2 - ReverseParams(Tensor({1}, element::i64, std::vector{2}), + ReverseParams(reference_tests::Tensor({1}, element::i64, std::vector{2}), op::v1::Reverse::Mode::INDEX, - Tensor({2, 4, 3}, IN_ET, std::vector{ + reference_tests::Tensor({2, 4, 3}, IN_ET, 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}), - Tensor({2, 4, 3}, IN_ET, std::vector{ + reference_tests::Tensor({2, 4, 3}, IN_ET, std::vector{ 2, 1, 0, 5, 4, 3, 8, 7, 6, 11, 10, 9, 14, 13, 12, 17, 16, 15, 20, 19, 18, 23, 22, 21}), "reverse_3d_2"), // reverse_3d_01 - ReverseParams(Tensor({2}, element::i64, std::vector{0, 1}), + ReverseParams(reference_tests::Tensor({2}, element::i64, std::vector{0, 1}), op::v1::Reverse::Mode::INDEX, - Tensor({2, 4, 3}, IN_ET, std::vector{ + reference_tests::Tensor({2, 4, 3}, IN_ET, 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}), - Tensor({2, 4, 3}, IN_ET, std::vector{ + reference_tests::Tensor({2, 4, 3}, IN_ET, std::vector{ 21, 22, 23, 18, 19, 20, 15, 16, 17, 12, 13, 14, 9, 10, 11, 6, 7, 8, 3, 4, 5, 0, 1, 2}), "reverse_3d_01"), // reverse_3d_02 - ReverseParams(Tensor({2}, element::i64, std::vector{0, 2}), + ReverseParams(reference_tests::Tensor({2}, element::i64, std::vector{0, 2}), op::v1::Reverse::Mode::INDEX, - Tensor({2, 4, 3}, IN_ET, std::vector{ + reference_tests::Tensor({2, 4, 3}, IN_ET, 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}), - Tensor({2, 4, 3}, IN_ET, std::vector{ + reference_tests::Tensor({2, 4, 3}, IN_ET, std::vector{ 14, 13, 12, 17, 16, 15, 20, 19, 18, 23, 22, 21, 2, 1, 0, 5, 4, 3, 8, 7, 6, 11, 10, 9}), "reverse_3d_02"), // reverse_3d_12 - ReverseParams(Tensor({2}, element::i64, std::vector{1, 2}), + ReverseParams(reference_tests::Tensor({2}, element::i64, std::vector{1, 2}), op::v1::Reverse::Mode::INDEX, - Tensor({2, 4, 3}, IN_ET, std::vector{ + reference_tests::Tensor({2, 4, 3}, IN_ET, 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}), - Tensor({2, 4, 3}, IN_ET, std::vector{ + reference_tests::Tensor({2, 4, 3}, IN_ET, std::vector{ 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12}), "reverse_3d_12"), // reverse_3d_012 - ReverseParams(Tensor({3}, element::i64, std::vector{0, 1, 2}), + ReverseParams(reference_tests::Tensor({3}, element::i64, std::vector{0, 1, 2}), op::v1::Reverse::Mode::INDEX, - Tensor({2, 4, 3}, IN_ET, std::vector{ + reference_tests::Tensor({2, 4, 3}, IN_ET, 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}), - Tensor({2, 4, 3}, IN_ET, std::vector{ + reference_tests::Tensor({2, 4, 3}, IN_ET, std::vector{ 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}), "reverse_3d_012"), }; @@ -239,10 +239,10 @@ std::vector generateCombinedParams() { std::vector generateParamsAxesRankIndexMode() { std::vector params { // reverse_v1_incorrect_rev_axes_rank_index_mode - ReverseParams(Tensor({1}, element::i64, std::vector{0}), + ReverseParams(reference_tests::Tensor({1}, element::i64, std::vector{0}), op::v1::Reverse::Mode::INDEX, - Tensor({1}, element::i64, std::vector{0}), - Tensor({1}, element::i64, std::vector{0}), + reference_tests::Tensor({1}, element::i64, std::vector{0}), + reference_tests::Tensor({1}, element::i64, std::vector{0}), "reverse_v1_incorrect_rev_axes_rank_index_mode"), }; return params; @@ -251,10 +251,10 @@ std::vector generateParamsAxesRankIndexMode() { std::vector generateParamsAxesElemsMaskMode() { std::vector params { // reverse_v1_incorrect_rev_axes_elems_mask_mode - ReverseParams(Tensor({1}, element::i64, std::vector{0}), + ReverseParams(reference_tests::Tensor({1}, element::i64, std::vector{0}), op::v1::Reverse::Mode::INDEX, - Tensor({1}, element::i64, std::vector{0}), - Tensor({1}, element::i64, std::vector{0}), + reference_tests::Tensor({1}, element::i64, std::vector{0}), + reference_tests::Tensor({1}, element::i64, std::vector{0}), "reverse_v1_incorrect_rev_axes_elems_mask_mode"), }; return params; @@ -263,10 +263,10 @@ std::vector generateParamsAxesElemsMaskMode() { std::vector generateParamsAxesOutOfBounds() { std::vector params { // reverse_v1_axes_out_of_bounds - ReverseParams(Tensor({1}, element::i64, std::vector{0}), + ReverseParams(reference_tests::Tensor({1}, element::i64, std::vector{0}), op::v1::Reverse::Mode::INDEX, - Tensor({1}, element::i64, std::vector{0}), - Tensor({1}, element::i64, std::vector{0}), + reference_tests::Tensor({1}, element::i64, std::vector{0}), + reference_tests::Tensor({1}, element::i64, std::vector{0}), "reverse_v1_axes_out_of_bounds"), }; return params; @@ -275,10 +275,10 @@ std::vector generateParamsAxesOutOfBounds() { std::vector generateParamsAxesOutOfBounds4() { std::vector params { // reverse_v1_axes_out_of_bounds_4 - ReverseParams(Tensor({1}, element::i64, std::vector{0}), + ReverseParams(reference_tests::Tensor({1}, element::i64, std::vector{0}), op::v1::Reverse::Mode::INDEX, - Tensor({1}, element::i64, std::vector{0}), - Tensor({1}, element::i64, std::vector{0}), + reference_tests::Tensor({1}, element::i64, std::vector{0}), + reference_tests::Tensor({1}, element::i64, std::vector{0}), "reverse_v1_axes_out_of_bounds_4"), }; return params; diff --git a/docs/template_plugin/tests/functional/op_reference/reverse_sequence.cpp b/docs/template_plugin/tests/functional/op_reference/reverse_sequence.cpp index 5f4c2714b60..cbf809b3aae 100644 --- a/docs/template_plugin/tests/functional/op_reference/reverse_sequence.cpp +++ b/docs/template_plugin/tests/functional/op_reference/reverse_sequence.cpp @@ -12,15 +12,16 @@ using namespace ov; namespace { struct ReverseSequenceParams { - ReverseSequenceParams(const int64_t batchAxis, const int64_t seqAxis, const Tensor& dataTensor, const Tensor& seqLengthsTensor, - const Tensor& expectedTensor) : mBatchAxis(batchAxis), mSeqAxis(seqAxis), mDataTensor(dataTensor), + ReverseSequenceParams(const int64_t batchAxis, const int64_t seqAxis, const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& seqLengthsTensor, + const reference_tests::Tensor& expectedTensor) : mBatchAxis(batchAxis), mSeqAxis(seqAxis), mDataTensor(dataTensor), mSeqLengthsTensor(seqLengthsTensor), mExpectedTensor(expectedTensor) {} -int64_t mBatchAxis; -int64_t mSeqAxis; -Tensor mDataTensor; -Tensor mSeqLengthsTensor; -Tensor mExpectedTensor; + int64_t mBatchAxis; + int64_t mSeqAxis; + reference_tests::Tensor mDataTensor; + reference_tests::Tensor mSeqLengthsTensor; + reference_tests::Tensor mExpectedTensor; }; + class ReferenceReverseSequenceTest : public testing::TestWithParam, public CommonReferenceTest { public: void SetUp() override { @@ -60,62 +61,62 @@ std::vector generateReverseSeqParams() { std::vector reverseSeqParams { // 2D ReverseSequenceParams(1, 0, - Tensor({4, 4}, IN_ET, std::vector{0, 4, 8, 12, + reference_tests::Tensor({4, 4}, IN_ET, std::vector{0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15}), - Tensor({4}, element::i32, std::vector{4, 3, 2, 1}), - Tensor({4, 4}, IN_ET, std::vector{3, 6, 9, 12, + reference_tests::Tensor({4}, element::i32, std::vector{4, 3, 2, 1}), + reference_tests::Tensor({4, 4}, IN_ET, std::vector{3, 6, 9, 12, 2, 5, 8, 13, 1, 4, 10, 14, 0, 7, 11, 15})), ReverseSequenceParams(0, 1, - Tensor({4, 4}, IN_ET, std::vector{0, 1, 2, 3, + reference_tests::Tensor({4, 4}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}), - Tensor({4}, element::i32, std::vector{1, 2, 3, 4}), - Tensor({4, 4}, IN_ET, std::vector{0, 1, 2, 3, + reference_tests::Tensor({4}, element::i32, std::vector{1, 2, 3, 4}), + reference_tests::Tensor({4, 4}, IN_ET, std::vector{0, 1, 2, 3, 5, 4, 6, 7, 10, 9, 8, 11, 15, 14, 13, 12})), // 4D ReverseSequenceParams(2, 1, - Tensor({2, 3, 4, 2}, IN_ET, std::vector{ + reference_tests::Tensor({2, 3, 4, 2}, IN_ET, std::vector{ 0, 0, 3, 0, 6, 0, 9, 0, 1, 0, 4, 0, 7, 0, 10, 0, 2, 0, 5, 0, 8, 0, 11, 0, 12, 0, 15, 0, 18, 0, 21, 0, 13, 0, 16, 0, 19, 0, 22, 0, 14, 0, 17, 0, 20, 0, 23, 0}), - Tensor({4}, element::i32, std::vector{1, 2, 1, 2}), - Tensor({2, 3, 4, 2}, IN_ET, std::vector{ + reference_tests::Tensor({4}, element::i32, std::vector{1, 2, 1, 2}), + reference_tests::Tensor({2, 3, 4, 2}, IN_ET, std::vector{ 0, 0, 4, 0, 6, 0, 10, 0, 1, 0, 3, 0, 7, 0, 9, 0, 2, 0, 5, 0, 8, 0, 11, 0, 12, 0, 16, 0, 18, 0, 22, 0, 13, 0, 15, 0, 19, 0, 21, 0, 14, 0, 17, 0, 20, 0, 23, 0})), ReverseSequenceParams(-2, -3, - Tensor({2, 3, 4, 2}, IN_ET, std::vector{ + reference_tests::Tensor({2, 3, 4, 2}, IN_ET, std::vector{ 0, 0, 3, 0, 6, 0, 9, 0, 1, 0, 4, 0, 7, 0, 10, 0, 2, 0, 5, 0, 8, 0, 11, 0, 12, 0, 15, 0, 18, 0, 21, 0, 13, 0, 16, 0, 19, 0, 22, 0, 14, 0, 17, 0, 20, 0, 23, 0}), - Tensor({4}, element::i32, std::vector{1, 2, 1, 2}), - Tensor({2, 3, 4, 2}, IN_ET, std::vector{ + reference_tests::Tensor({4}, element::i32, std::vector{1, 2, 1, 2}), + reference_tests::Tensor({2, 3, 4, 2}, IN_ET, std::vector{ 0, 0, 4, 0, 6, 0, 10, 0, 1, 0, 3, 0, 7, 0, 9, 0, 2, 0, 5, 0, 8, 0, 11, 0, 12, 0, 16, 0, 18, 0, 22, 0, 13, 0, 15, 0, 19, 0, 21, 0, 14, 0, 17, 0, 20, 0, 23, 0})), ReverseSequenceParams(0, 1, - Tensor({4, 3, 2, 2}, IN_ET, std::vector{ + reference_tests::Tensor({4, 3, 2, 2}, IN_ET, 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, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}), - Tensor({4}, element::i32, std::vector{1, 2, 3, 3}), - Tensor({4, 3, 2, 2}, IN_ET, std::vector{ + reference_tests::Tensor({4}, element::i32, std::vector{1, 2, 3, 3}), + reference_tests::Tensor({4, 3, 2, 2}, IN_ET, std::vector{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 16, 17, 18, 19, 12, 13, 14, 15, 20, 21, 22, 23, 32, 33, 34, 35, 28, 29, 30, 31, 24, 25, 26, 27, 44, 45, 46, 47, 40, 41, 42, 43, 36, 37, 38, 39})), // 5D ReverseSequenceParams(0, 2, - Tensor({4, 2, 3, 2, 2}, IN_ET, std::vector{ + reference_tests::Tensor({4, 2, 3, 2, 2}, IN_ET, 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, 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, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95}), - Tensor({4}, element::i32, std::vector{1, 2, 1, 2}), - Tensor({4, 3, 2, 2}, IN_ET, std::vector{ + reference_tests::Tensor({4}, element::i32, std::vector{1, 2, 1, 2}), + reference_tests::Tensor({4, 3, 2, 2}, IN_ET, 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, 28, 29, 30, 31, 24, 25, 26, 27, 32, 33, 34, 35, 40, 41, 42, 43, 36, 37, 38, 39, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, diff --git a/docs/template_plugin/tests/functional/op_reference/rnn_cell.cpp b/docs/template_plugin/tests/functional/op_reference/rnn_cell.cpp index e02ba1b9c59..022bc4631d7 100644 --- a/docs/template_plugin/tests/functional/op_reference/rnn_cell.cpp +++ b/docs/template_plugin/tests/functional/op_reference/rnn_cell.cpp @@ -14,20 +14,20 @@ namespace { struct RNNCellParams { RNNCellParams( int32_t batchSize, int32_t inputSize, int32_t hiddenSize, - const Tensor& X, const Tensor& H_t, const Tensor& W, const Tensor& R, const Tensor& B, - const Tensor& Ho, const std::string& testcaseName = "") : + const reference_tests::Tensor& X, const reference_tests::Tensor& H_t, const reference_tests::Tensor& W, const reference_tests::Tensor& R, const reference_tests::Tensor& B, + const reference_tests::Tensor& Ho, const std::string& testcaseName = "") : batchSize(batchSize), inputSize(inputSize), hiddenSize(hiddenSize), X(X), H_t(H_t), W(W), R(R), B(B), Ho(Ho), testcaseName(testcaseName) {} int32_t batchSize; int32_t inputSize; int32_t hiddenSize; - Tensor X; - Tensor H_t; - Tensor W; - Tensor R; - Tensor B; - Tensor Ho; + reference_tests::Tensor X; + reference_tests::Tensor H_t; + reference_tests::Tensor W; + reference_tests::Tensor R; + reference_tests::Tensor B; + reference_tests::Tensor Ho; std::string testcaseName; }; @@ -149,11 +149,11 @@ std::vector generateParams() { std::vector params { RNNCellParams( 2, 3, 3, - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.3432185f, 0.612268f, 0.20272376f, 0.9513413f, 0.30585995f, 0.7265472f}), - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.12444675f, 0.52055854f, 0.46489045f, 0.4983964f, 0.7730452f, 0.28439692f}), - Tensor(ET, {3, 3}, std::vector{0.41930267f, + reference_tests::Tensor(ET, {3, 3}, std::vector{0.41930267f, 0.7872176f, 0.89940447f, 0.23659843f, @@ -162,7 +162,7 @@ std::vector generateParams() { 0.3147149f, 0.6555601f, 0.4559603f}), - Tensor(ET, {3, 3}, std::vector{0.8374871f, + reference_tests::Tensor(ET, {3, 3}, std::vector{0.8374871f, 0.86660194f, 0.82114047f, 0.71549815f, @@ -171,8 +171,8 @@ std::vector generateParams() { 0.25392973f, 0.38301638f, 0.85531586f}), - Tensor(ET, {3}, std::vector{0.0f, 0.0f, 0.0f}), - Tensor(ET, {2, 3}, std::vector{0.9408395f, 0.53823817f, 0.84270686f, 0.98932856f, 0.768665f, 0.90461975f}), + reference_tests::Tensor(ET, {3}, std::vector{0.0f, 0.0f, 0.0f}), + reference_tests::Tensor(ET, {2, 3}, std::vector{0.9408395f, 0.53823817f, 0.84270686f, 0.98932856f, 0.768665f, 0.90461975f}), "rnn_cell_zero_bias_default_attrs"), }; return params; @@ -199,11 +199,11 @@ std::vector generateParamsBiasClip() { std::vector params { RNNCellParams( 2, 3, 3, - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.3432185f, 0.612268f, 0.20272376f, 0.9513413f, 0.30585995f, 0.7265472f}), - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.12444675f, 0.52055854f, 0.46489045f, 0.4983964f, 0.7730452f, 0.28439692f}), - Tensor(ET, {3, 3}, std::vector{0.41930267f, + reference_tests::Tensor(ET, {3, 3}, std::vector{0.41930267f, 0.7872176f, 0.89940447f, 0.23659843f, @@ -212,7 +212,7 @@ std::vector generateParamsBiasClip() { 0.3147149f, 0.6555601f, 0.4559603f}), - Tensor(ET, {3, 3}, std::vector{0.8374871f, + reference_tests::Tensor(ET, {3, 3}, std::vector{0.8374871f, 0.86660194f, 0.82114047f, 0.71549815f, @@ -221,8 +221,8 @@ std::vector generateParamsBiasClip() { 0.25392973f, 0.38301638f, 0.85531586f}), - Tensor(ET, {3}, std::vector{1.0289404f, 1.6362579f, 0.4370661f}), - Tensor(ET, {2, 3}, std::vector{0.9922437f, 0.97749525f, 0.9312212f, 0.9937176f, 0.9901317f, 0.95906746f}), + reference_tests::Tensor(ET, {3}, std::vector{1.0289404f, 1.6362579f, 0.4370661f}), + reference_tests::Tensor(ET, {2, 3}, std::vector{0.9922437f, 0.97749525f, 0.9312212f, 0.9937176f, 0.9901317f, 0.95906746f}), "rnn_cell_bias_clip"), }; return params; @@ -249,11 +249,11 @@ std::vector generateParamsSigmoidActivationFunction() { std::vector params { RNNCellParams( 2, 3, 3, - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.3432185f, 0.612268f, 0.20272376f, 0.9513413f, 0.30585995f, 0.7265472f}), - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 0.12444675f, 0.52055854f, 0.46489045f, 0.4983964f, 0.7730452f, 0.28439692f}), - Tensor(ET, {3, 3}, std::vector{0.41930267f, + reference_tests::Tensor(ET, {3, 3}, std::vector{0.41930267f, 0.7872176f, 0.89940447f, 0.23659843f, @@ -262,7 +262,7 @@ std::vector generateParamsSigmoidActivationFunction() { 0.3147149f, 0.6555601f, 0.4559603f}), - Tensor(ET, {3, 3}, std::vector{0.8374871f, + reference_tests::Tensor(ET, {3, 3}, std::vector{0.8374871f, 0.86660194f, 0.82114047f, 0.71549815f, @@ -271,8 +271,8 @@ std::vector generateParamsSigmoidActivationFunction() { 0.25392973f, 0.38301638f, 0.85531586f}), - Tensor(ET, {3}, std::vector{1.0289404f, 1.6362579f, 0.4370661f}), - Tensor(ET, {2, 3}, std::vector{0.94126844f, 0.9036043f, 0.841243f, 0.9468489f, 0.934215f, 0.873708f}), + reference_tests::Tensor(ET, {3}, std::vector{1.0289404f, 1.6362579f, 0.4370661f}), + reference_tests::Tensor(ET, {2, 3}, std::vector{0.94126844f, 0.9036043f, 0.841243f, 0.9468489f, 0.934215f, 0.873708f}), "rnn_cell_sigmoid_activation_function"), }; return params; diff --git a/docs/template_plugin/tests/functional/op_reference/roi_pooling.cpp b/docs/template_plugin/tests/functional/op_reference/roi_pooling.cpp index fb7ae981f98..d0bbea2ef92 100644 --- a/docs/template_plugin/tests/functional/op_reference/roi_pooling.cpp +++ b/docs/template_plugin/tests/functional/op_reference/roi_pooling.cpp @@ -28,9 +28,9 @@ struct ROIPoolingParams { float spatialScale; std::string poolingMode; ov::element::Type dataType; - ov::runtime::Tensor featureMap; - ov::runtime::Tensor proposal; - ov::runtime::Tensor refData; + ov::Tensor featureMap; + ov::Tensor proposal; + ov::Tensor refData; public: template diff --git a/docs/template_plugin/tests/functional/op_reference/roll.cpp b/docs/template_plugin/tests/functional/op_reference/roll.cpp index f5e520fa277..8b334c8d0ca 100644 --- a/docs/template_plugin/tests/functional/op_reference/roll.cpp +++ b/docs/template_plugin/tests/functional/op_reference/roll.cpp @@ -13,15 +13,15 @@ using namespace ov; namespace { struct RollParams { - RollParams(const Tensor& dataTensor, const Tensor& shiftTensor, const Tensor& axesTensor, - const Tensor& expectedTensor, const std::string& testcaseName = "") : + RollParams(const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& shiftTensor, const reference_tests::Tensor& axesTensor, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dataTensor(dataTensor), shiftTensor(shiftTensor), axesTensor(axesTensor), expectedTensor(expectedTensor), testcaseName(testcaseName) {} - Tensor dataTensor; - Tensor shiftTensor; - Tensor axesTensor; - Tensor expectedTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor shiftTensor; + reference_tests::Tensor axesTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -77,18 +77,18 @@ std::vector generateRollParams() { std::vector rollParams { // roll_repeated_axes RollParams( - Tensor({4, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), - Tensor({3}, element::i64, std::vector{1, 2, 1}), - Tensor({3}, element::i64, std::vector{0, 1, 0}), - Tensor({4, 3}, IN_ET, std::vector{8, 9, 7, 11, 12, 10, 2, 3, 1, 5, 6, 4}), + reference_tests::Tensor({4, 3}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), + reference_tests::Tensor({3}, element::i64, std::vector{1, 2, 1}), + reference_tests::Tensor({3}, element::i64, std::vector{0, 1, 0}), + reference_tests::Tensor({4, 3}, IN_ET, std::vector{8, 9, 7, 11, 12, 10, 2, 3, 1, 5, 6, 4}), "roll_repeated_axes"), // roll_negative_axes RollParams( - Tensor({4, 2, 3}, IN_ET, std::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}), - Tensor({3}, element::i64, std::vector{2, -1, -7}), - Tensor({3}, element::i64, std::vector{-1, -1, -2}), - Tensor({4, 2, 3}, IN_ET, std::vector{6, 4, 5, 3, 1, 2, 12, 10, 11, 9, 7, 8, 18, 16, 17, 15, 13, 14, 24, 22, 23, 21, 19, 20}), + reference_tests::Tensor({4, 2, 3}, IN_ET, std::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}), + reference_tests::Tensor({3}, element::i64, std::vector{2, -1, -7}), + reference_tests::Tensor({3}, element::i64, std::vector{-1, -1, -2}), + reference_tests::Tensor({4, 2, 3}, IN_ET, std::vector{6, 4, 5, 3, 1, 2, 12, 10, 11, 9, 7, 8, 18, 16, 17, 15, 13, 14, 24, 22, 23, 21, 19, 20}), "roll_negative_axes"), }; return rollParams; @@ -98,7 +98,7 @@ std::vector generateRollFloatingPointParams() { std::vector rollParams { // roll_2d_input RollParams( - Tensor({4, 3}, element::f32, std::vector{50.2907, + reference_tests::Tensor({4, 3}, element::f32, std::vector{50.2907, 70.8054, -68.3403, 62.6444, @@ -110,9 +110,9 @@ std::vector generateRollFloatingPointParams() { -43.3479, 94.1676, -95.7097}), - Tensor({1}, element::i64, std::vector{1}), - Tensor({1}, element::i64, std::vector{0}), - Tensor({4, 3}, element::f32, std::vector{-43.3479, + reference_tests::Tensor({1}, element::i64, std::vector{1}), + reference_tests::Tensor({1}, element::i64, std::vector{0}), + reference_tests::Tensor({4, 3}, element::f32, std::vector{-43.3479, 94.1676, -95.7097, 50.2907, @@ -128,7 +128,7 @@ std::vector generateRollFloatingPointParams() { // roll_2d_input_negative_shift RollParams( - Tensor({4, 3}, element::f32, std::vector{50.2907, + reference_tests::Tensor({4, 3}, element::f32, std::vector{50.2907, 70.8054, -68.3403, 62.6444, @@ -140,9 +140,9 @@ std::vector generateRollFloatingPointParams() { -43.3479, 94.1676, -95.7097}), - Tensor({2}, element::i64, std::vector{-1, 2}), - Tensor({2}, element::i64, std::vector{0, 1}), - Tensor({4, 3}, element::f32, std::vector{4.9748, + reference_tests::Tensor({2}, element::i64, std::vector{-1, 2}), + reference_tests::Tensor({2}, element::i64, std::vector{0, 1}), + reference_tests::Tensor({4, 3}, element::f32, std::vector{4.9748, -18.5551, 62.6444, -15.3859, @@ -158,24 +158,24 @@ std::vector generateRollFloatingPointParams() { // roll_3d_input RollParams( - Tensor({4, 2, 3}, element::f32, std::vector{94.0773, 33.0599, 58.1724, -20.3640, 54.5372, -54.3023, 10.4662, 11.7532, + reference_tests::Tensor({4, 2, 3}, element::f32, std::vector{94.0773, 33.0599, 58.1724, -20.3640, 54.5372, -54.3023, 10.4662, 11.7532, -11.7692, 56.4223, -95.3774, 8.8978, 1.9305, 13.8025, 12.0827, 81.4669, 19.5321, -8.9553, -75.3226, 20.8033, 20.7660, 62.7361, 14.9372, -33.0825}), - Tensor({3}, element::i64, std::vector{2, 1, 3}), - Tensor({3}, element::i64, std::vector{0, 1, 2}), - Tensor({4, 2, 3}, element::f32, std::vector{81.4669, 19.5321, -8.9553, 1.9305, 13.8025, 12.0827, 62.7361, 14.9372, + reference_tests::Tensor({3}, element::i64, std::vector{2, 1, 3}), + reference_tests::Tensor({3}, element::i64, std::vector{0, 1, 2}), + reference_tests::Tensor({4, 2, 3}, element::f32, std::vector{81.4669, 19.5321, -8.9553, 1.9305, 13.8025, 12.0827, 62.7361, 14.9372, -33.0825, -75.3226, 20.8033, 20.7660, -20.3640, 54.5372, -54.3023, 94.0773, 33.0599, 58.1724, 56.4223, -95.3774, 8.8978, 10.4662, 11.7532, -11.7692}), "roll_3d_input"), // roll_3d_input_negative_shift RollParams( - Tensor({4, 2, 3}, element::f32, std::vector{94.0773, 33.0599, 58.1724, -20.3640, 54.5372, -54.3023, 10.4662, 11.7532, + reference_tests::Tensor({4, 2, 3}, element::f32, std::vector{94.0773, 33.0599, 58.1724, -20.3640, 54.5372, -54.3023, 10.4662, 11.7532, -11.7692, 56.4223, -95.3774, 8.8978, 1.9305, 13.8025, 12.0827, 81.4669, 19.5321, -8.9553, -75.3226, 20.8033, 20.7660, 62.7361, 14.9372, -33.0825}), - Tensor({3}, element::i64, std::vector{-5, 1, 3}), - Tensor({3}, element::i64, std::vector{0, 1, 1}), - Tensor({4, 2, 3}, element::f32, std::vector{10.4662, 11.7532, -11.7692, 56.4223, -95.3774, 8.8978, 1.9305, 13.8025, + reference_tests::Tensor({3}, element::i64, std::vector{-5, 1, 3}), + reference_tests::Tensor({3}, element::i64, std::vector{0, 1, 1}), + reference_tests::Tensor({4, 2, 3}, element::f32, std::vector{10.4662, 11.7532, -11.7692, 56.4223, -95.3774, 8.8978, 1.9305, 13.8025, 12.0827, 81.4669, 19.5321, -8.9553, -75.3226, 20.8033, 20.7660, 62.7361, 14.9372, -33.0825, 94.0773, 33.0599, 58.1724, -20.3640, 54.5372, -54.3023}), "roll_3d_input_negative_shift"), diff --git a/docs/template_plugin/tests/functional/op_reference/round.cpp b/docs/template_plugin/tests/functional/op_reference/round.cpp index f1766b77629..7b749486eb8 100644 --- a/docs/template_plugin/tests/functional/op_reference/round.cpp +++ b/docs/template_plugin/tests/functional/op_reference/round.cpp @@ -23,8 +23,8 @@ struct RoundParams { PartialShape pshape; element::Type inType; element::Type outType; - runtime::Tensor inputData; - runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceRoundHalfToEvenLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/scatter_elements_update.cpp b/docs/template_plugin/tests/functional/op_reference/scatter_elements_update.cpp index 67b0ad95ff6..3e74941c533 100644 --- a/docs/template_plugin/tests/functional/op_reference/scatter_elements_update.cpp +++ b/docs/template_plugin/tests/functional/op_reference/scatter_elements_update.cpp @@ -12,22 +12,22 @@ using namespace ov; namespace { struct ScatterElementsUpdateParams { - ScatterElementsUpdateParams(const Tensor& paramData, - const Tensor& paramIndices, - const Tensor& paramUpdates, - const Tensor& paramAxis, - const Tensor& paramExpected) + ScatterElementsUpdateParams(const reference_tests::Tensor& paramData, + const reference_tests::Tensor& paramIndices, + const reference_tests::Tensor& paramUpdates, + const reference_tests::Tensor& paramAxis, + const reference_tests::Tensor& paramExpected) : input(paramData), indices(paramIndices), updates(paramUpdates), axis(paramAxis), expected(paramExpected) {} - Tensor input; - Tensor indices; - Tensor updates; - Tensor axis; - Tensor expected; + reference_tests::Tensor input; + reference_tests::Tensor indices; + reference_tests::Tensor updates; + reference_tests::Tensor axis; + reference_tests::Tensor expected; }; class ReferenceScatterElementsUpdateLayerTest : public testing::TestWithParam, @@ -76,17 +76,17 @@ std::vector generateScatterParams() { using T_INT = typename element_type_traits::value_type; std::vector scatterParams{ // axis = 0 - ScatterElementsUpdateParams(Tensor({2, 2}, element::Type(ET), std::vector{1, 2, 3, 4}), // input - Tensor({2, 2}, element::Type(ET_IND), std::vector{1, 1, 0, 0}), // indices - Tensor({2, 2}, element::Type(ET), std::vector{10, 20, 30, 40}), // updates - Tensor({1}, element::Type(ET_IND), std::vector{0}), // axis - Tensor({2, 2}, element::Type(ET), std::vector{30, 40, 10, 20})), // expected + ScatterElementsUpdateParams(reference_tests::Tensor({2, 2}, element::Type(ET), std::vector{1, 2, 3, 4}), // input + reference_tests::Tensor({2, 2}, element::Type(ET_IND), std::vector{1, 1, 0, 0}), // indices + reference_tests::Tensor({2, 2}, element::Type(ET), std::vector{10, 20, 30, 40}), // updates + reference_tests::Tensor({1}, element::Type(ET_IND), std::vector{0}), // axis + reference_tests::Tensor({2, 2}, element::Type(ET), std::vector{30, 40, 10, 20})), // expected // axis = 1 - ScatterElementsUpdateParams(Tensor({2, 1}, element::Type(ET), std::vector{1, 2}), // input - Tensor({2, 1}, element::Type(ET_IND), std::vector{0, 0}), // indices - Tensor({2, 1}, element::Type(ET), std::vector{10, 20}), // updates - Tensor({1}, element::Type(ET_IND), std::vector{1}), // axis - Tensor({2, 1}, element::Type(ET), std::vector{10, 20})), // expected + ScatterElementsUpdateParams(reference_tests::Tensor({2, 1}, element::Type(ET), std::vector{1, 2}), // input + reference_tests::Tensor({2, 1}, element::Type(ET_IND), std::vector{0, 0}), // indices + reference_tests::Tensor({2, 1}, element::Type(ET), std::vector{10, 20}), // updates + reference_tests::Tensor({1}, element::Type(ET_IND), std::vector{1}), // axis + reference_tests::Tensor({2, 1}, element::Type(ET), std::vector{10, 20})), // expected }; return scatterParams; } diff --git a/docs/template_plugin/tests/functional/op_reference/scatter_nd_update.cpp b/docs/template_plugin/tests/functional/op_reference/scatter_nd_update.cpp index 953c27640d8..e59608b1f0c 100644 --- a/docs/template_plugin/tests/functional/op_reference/scatter_nd_update.cpp +++ b/docs/template_plugin/tests/functional/op_reference/scatter_nd_update.cpp @@ -13,15 +13,15 @@ using namespace ov; namespace { struct ScatterNDUpdateParams { - ScatterNDUpdateParams(const Tensor& dataTensor, const Tensor& indexTensor, const Tensor& updateTensor, - const Tensor& expectedTensor, const std::string& testcaseName = "") : + ScatterNDUpdateParams(const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& indexTensor, const reference_tests::Tensor& updateTensor, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dataTensor(dataTensor), indexTensor(indexTensor), updateTensor(updateTensor), expectedTensor(expectedTensor), testcaseName(testcaseName) {} - Tensor dataTensor; - Tensor indexTensor; - Tensor updateTensor; - Tensor expectedTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor indexTensor; + reference_tests::Tensor updateTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -77,92 +77,92 @@ std::vector generateScatterNDUpdateParams() { using U = typename element_type_traits::value_type; std::vector scatterParams { // scatter_nd_update_1x1 - ScatterNDUpdateParams(Tensor({1}, IN_ET, std::vector{1}), - Tensor({1}, IU_ET, std::vector{0}), - Tensor({1}, IN_ET, std::vector{20}), - Tensor({1}, IN_ET, std::vector{20}), + ScatterNDUpdateParams(reference_tests::Tensor({1}, IN_ET, std::vector{1}), + reference_tests::Tensor({1}, IU_ET, std::vector{0}), + reference_tests::Tensor({1}, IN_ET, std::vector{20}), + reference_tests::Tensor({1}, IN_ET, std::vector{20}), "scatter_nd_update_1x1"), // scatter_nd_update_2x2_by_1 - ScatterNDUpdateParams(Tensor({2, 2}, IN_ET, std::vector{1, 2, 3, 4}), - Tensor({2, 1}, IU_ET, std::vector{1, 0}), - Tensor({2, 2}, IN_ET, std::vector{10, 20, 30, 40}), - Tensor({2, 2}, IN_ET, std::vector{30, 40, 10, 20}), + ScatterNDUpdateParams(reference_tests::Tensor({2, 2}, IN_ET, std::vector{1, 2, 3, 4}), + reference_tests::Tensor({2, 1}, IU_ET, std::vector{1, 0}), + reference_tests::Tensor({2, 2}, IN_ET, std::vector{10, 20, 30, 40}), + reference_tests::Tensor({2, 2}, IN_ET, std::vector{30, 40, 10, 20}), "scatter_nd_update_2x2_by_1"), // scatter_nd_update_2x2_by_2 - ScatterNDUpdateParams(Tensor({2, 2}, IN_ET, std::vector{1, 2, 3, 4}), - Tensor({2, 2}, IU_ET, std::vector{0, 0, 1, 1}), - Tensor({2}, IN_ET, std::vector{10, 40}), - Tensor({2, 2}, IN_ET, std::vector{10, 2, 3, 40}), + ScatterNDUpdateParams(reference_tests::Tensor({2, 2}, IN_ET, std::vector{1, 2, 3, 4}), + reference_tests::Tensor({2, 2}, IU_ET, std::vector{0, 0, 1, 1}), + reference_tests::Tensor({2}, IN_ET, std::vector{10, 40}), + reference_tests::Tensor({2, 2}, IN_ET, std::vector{10, 2, 3, 40}), "scatter_nd_update_2x2_by_2"), // scatter_nd_update_3x3_by_1 - ScatterNDUpdateParams(Tensor({3, 3, 3}, IN_ET, std::vector{11, 12, 13, 14, 15, 16, 17, 18, 19, + ScatterNDUpdateParams(reference_tests::Tensor({3, 3, 3}, IN_ET, std::vector{11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39}), - Tensor({2, 1}, IU_ET, std::vector{0, 2}), - Tensor({2, 3, 3}, IN_ET, std::vector{91, 92, 93, 94, 95, 96, 97, 98, 99, + reference_tests::Tensor({2, 1}, IU_ET, std::vector{0, 2}), + reference_tests::Tensor({2, 3, 3}, IN_ET, std::vector{91, 92, 93, 94, 95, 96, 97, 98, 99, 81, 82, 83, 84, 85, 86, 87, 88, 89}), - Tensor({3, 3, 3}, IN_ET, std::vector{91, 92, 93, 94, 95, 96, 97, 98, 99, + reference_tests::Tensor({3, 3, 3}, IN_ET, std::vector{91, 92, 93, 94, 95, 96, 97, 98, 99, 21, 22, 23, 24, 25, 26, 27, 28, 29, 81, 82, 83, 84, 85, 86, 87, 88, 89}), "scatter_nd_update_3x3_by_1"), // scatter_nd_update_3x3_by_2v2 - ScatterNDUpdateParams(Tensor({3, 3, 3}, IN_ET, std::vector{11, 12, 13, 14, 15, 16, 17, 18, 19, + ScatterNDUpdateParams(reference_tests::Tensor({3, 3, 3}, IN_ET, std::vector{11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39}), - Tensor({2, 2, 3}, IU_ET, std::vector{0, 0, 0, 2, 2, 2, 1, 0, 0, 1, 2, 2}), - Tensor({2, 2}, IN_ET, std::vector{91, 92, 81, 82}), - Tensor({3, 3, 3}, IN_ET, std::vector{91, 12, 13, 14, 15, 16, 17, 18, 19, + reference_tests::Tensor({2, 2, 3}, IU_ET, std::vector{0, 0, 0, 2, 2, 2, 1, 0, 0, 1, 2, 2}), + reference_tests::Tensor({2, 2}, IN_ET, std::vector{91, 92, 81, 82}), + reference_tests::Tensor({3, 3, 3}, IN_ET, std::vector{91, 12, 13, 14, 15, 16, 17, 18, 19, 81, 22, 23, 24, 25, 26, 27, 28, 82, 31, 32, 33, 34, 35, 36, 37, 38, 92}), "scatter_nd_update_3x3_by_2v2"), // scatter_nd_update_3x3_by_2 - ScatterNDUpdateParams(Tensor({3, 3, 3}, IN_ET, std::vector{11, 12, 13, 14, 15, 16, 17, 18, 19, + ScatterNDUpdateParams(reference_tests::Tensor({3, 3, 3}, IN_ET, std::vector{11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39}), - Tensor({2, 2}, IU_ET, std::vector{0, 0, 2, 2}), - Tensor({2, 3}, IN_ET, std::vector{91, 92, 93, 87, 88, 89}), - Tensor({3, 3, 3}, IN_ET, std::vector{91, 92, 93, 14, 15, 16, 17, 18, 19, + reference_tests::Tensor({2, 2}, IU_ET, std::vector{0, 0, 2, 2}), + reference_tests::Tensor({2, 3}, IN_ET, std::vector{91, 92, 93, 87, 88, 89}), + reference_tests::Tensor({3, 3, 3}, IN_ET, std::vector{91, 92, 93, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 87, 88, 89}), "scatter_nd_update_3x3_by_2"), // scatter_nd_update_3x3_by_3 - ScatterNDUpdateParams(Tensor({3, 3, 3}, IN_ET, std::vector{11, 12, 13, 14, 15, 16, 17, 18, 19, + ScatterNDUpdateParams(reference_tests::Tensor({3, 3, 3}, IN_ET, std::vector{11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39}), - Tensor({2, 3}, IU_ET, std::vector{0, 0, 0, 2, 2, 2}), - Tensor({2}, IN_ET, std::vector{91, 99}), - Tensor({3, 3, 3}, IN_ET, std::vector{91, 12, 13, 14, 15, 16, 17, 18, 19, + reference_tests::Tensor({2, 3}, IU_ET, std::vector{0, 0, 0, 2, 2, 2}), + reference_tests::Tensor({2}, IN_ET, std::vector{91, 99}), + reference_tests::Tensor({3, 3, 3}, IN_ET, std::vector{91, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 99}), "scatter_nd_update_3x3_by_3"), // scatter_nd_update_1d_from_examples - ScatterNDUpdateParams(Tensor({8}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8}), - Tensor({4, 1}, IU_ET, std::vector{4, 3, 1, 7}), - Tensor({4}, IN_ET, std::vector{9, 10, 11, 12}), - Tensor({8}, IN_ET, std::vector{1, 11, 3, 10, 9, 6, 7, 12}), + ScatterNDUpdateParams(reference_tests::Tensor({8}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8}), + reference_tests::Tensor({4, 1}, IU_ET, std::vector{4, 3, 1, 7}), + reference_tests::Tensor({4}, IN_ET, std::vector{9, 10, 11, 12}), + reference_tests::Tensor({8}, IN_ET, std::vector{1, 11, 3, 10, 9, 6, 7, 12}), "scatter_nd_update_1d_from_examples"), // scatter_nd_update_4x4_shape_from_examples - ScatterNDUpdateParams(Tensor({4, 4, 4}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, + ScatterNDUpdateParams(reference_tests::Tensor({4, 4, 4}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8}), - Tensor({2, 1}, IU_ET, std::vector{0, 2}), - Tensor({2, 4, 4}, IN_ET, std::vector{5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, + reference_tests::Tensor({2, 1}, IU_ET, std::vector{0, 2}), + reference_tests::Tensor({2, 4, 4}, IN_ET, std::vector{5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4}), - Tensor({4, 4, 4}, IN_ET, std::vector{5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, + reference_tests::Tensor({4, 4, 4}, IN_ET, std::vector{5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8}), "scatter_nd_update_4x4_shape_from_examples"), // scatter_nd_update_4x4_v2 - ScatterNDUpdateParams(Tensor({4, 4, 4}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, + ScatterNDUpdateParams(reference_tests::Tensor({4, 4, 4}, IN_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8}), - Tensor({2, 2, 2}, IU_ET, std::vector{0, 0, 2, 2, 1, 1, 3, 3}), - Tensor({2, 2, 4}, IN_ET, std::vector{15, 16, 17, 18, 25, 26, 27, 28, + reference_tests::Tensor({2, 2, 2}, IU_ET, std::vector{0, 0, 2, 2, 1, 1, 3, 3}), + reference_tests::Tensor({2, 2, 4}, IN_ET, std::vector{15, 16, 17, 18, 25, 26, 27, 28, 35, 36, 37, 38, 45, 46, 47, 58}), - Tensor({4, 4, 4}, IN_ET, std::vector{15, 16, 17, 18, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, + reference_tests::Tensor({4, 4, 4}, IN_ET, std::vector{15, 16, 17, 18, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 35, 36, 37, 38, 8, 7, 6, 5, 4, 3, 2, 1, 8, 7, 6, 5, 4, 3, 2, 1, 25, 26, 27, 28, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 45, 46, 47, 58}), diff --git a/docs/template_plugin/tests/functional/op_reference/scatter_update.cpp b/docs/template_plugin/tests/functional/op_reference/scatter_update.cpp index 952c11247cb..3856c79e510 100644 --- a/docs/template_plugin/tests/functional/op_reference/scatter_update.cpp +++ b/docs/template_plugin/tests/functional/op_reference/scatter_update.cpp @@ -24,11 +24,11 @@ namespace { // ---------------------- V3 ------------------------------ struct ScatterUpdate3Params { - Tensor data; - Tensor indices; - Tensor updates; - Tensor axis; - Tensor expected; + reference_tests::Tensor data; + reference_tests::Tensor indices; + reference_tests::Tensor updates; + reference_tests::Tensor axis; + reference_tests::Tensor expected; }; struct Builder : ParamsBuilder { diff --git a/docs/template_plugin/tests/functional/op_reference/select.cpp b/docs/template_plugin/tests/functional/op_reference/select.cpp index ab770e63137..233d8b69829 100644 --- a/docs/template_plugin/tests/functional/op_reference/select.cpp +++ b/docs/template_plugin/tests/functional/op_reference/select.cpp @@ -28,12 +28,12 @@ struct SelectParams { element::Type data_type; op::AutoBroadcastSpec broadcast; PartialShape select_input_pshape; - ov::runtime::Tensor select_input; + ov::Tensor select_input; PartialShape if_input_pshape; - ov::runtime::Tensor if_input; + ov::Tensor if_input; PartialShape else_input_pshape; - ov::runtime::Tensor else_input; - ov::runtime::Tensor expected_output; + ov::Tensor else_input; + ov::Tensor expected_output; }; class ReferenceSelectLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/selu.cpp b/docs/template_plugin/tests/functional/op_reference/selu.cpp index 29d6adfaeb0..098da5743c2 100644 --- a/docs/template_plugin/tests/functional/op_reference/selu.cpp +++ b/docs/template_plugin/tests/functional/op_reference/selu.cpp @@ -31,12 +31,12 @@ struct SeluParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; ov::Shape alphaShape; ov::Shape lambdaShape; - ov::runtime::Tensor alpha; - ov::runtime::Tensor lambda; + ov::Tensor alpha; + ov::Tensor lambda; std::string testcaseName; }; diff --git a/docs/template_plugin/tests/functional/op_reference/shape_of.cpp b/docs/template_plugin/tests/functional/op_reference/shape_of.cpp index 102fdf8fadd..77d8f68c11f 100644 --- a/docs/template_plugin/tests/functional/op_reference/shape_of.cpp +++ b/docs/template_plugin/tests/functional/op_reference/shape_of.cpp @@ -32,8 +32,8 @@ struct ShapeOfParamsV1 { Shape m_expected_shape; element::Type m_input_type; element::Type m_expected_type; - runtime::Tensor m_input_value; - runtime::Tensor m_expected_value; + ov::Tensor m_input_value; + ov::Tensor m_expected_value; }; struct ShapeOfParamsV3 { @@ -60,9 +60,9 @@ struct ShapeOfParamsV3 { element::Type m_input_type; element::Type m_expected_type1; element::Type m_expected_type2; - runtime::Tensor m_input_value; - runtime::Tensor m_expected_value1; - runtime::Tensor m_expected_value2; + ov::Tensor m_input_value; + ov::Tensor m_expected_value1; + ov::Tensor m_expected_value2; }; class ReferenceShapeOfV1LayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/shuffle_channels.cpp b/docs/template_plugin/tests/functional/op_reference/shuffle_channels.cpp index e35b226edf2..55b6b55ed85 100644 --- a/docs/template_plugin/tests/functional/op_reference/shuffle_channels.cpp +++ b/docs/template_plugin/tests/functional/op_reference/shuffle_channels.cpp @@ -12,15 +12,15 @@ using namespace ov; namespace { struct ShuffleChannelsParams { - ShuffleChannelsParams(const Tensor& dataTensor, const int32_t axis, const int32_t group, - const Tensor& expectedTensor, const std::string& testcaseName = "") : + ShuffleChannelsParams(const reference_tests::Tensor& dataTensor, const int32_t axis, const int32_t group, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dataTensor(dataTensor), axis(axis), group(group), expectedTensor(expectedTensor), testcaseName(testcaseName) {} - Tensor dataTensor; + reference_tests::Tensor dataTensor; int32_t axis; int32_t group; - Tensor expectedTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -68,13 +68,13 @@ std::vector generateParams() { std::vector params { // shuffle_channels_simple ShuffleChannelsParams( - Tensor({1, 15, 2, 2}, IN_ET, std::vector{ + reference_tests::Tensor({1, 15, 2, 2}, IN_ET, 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, 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, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59}), 1, 5, - Tensor({1, 15, 2, 2}, IN_ET, std::vector{ + reference_tests::Tensor({1, 15, 2, 2}, IN_ET, std::vector{ 0, 1, 2, 3, 12, 13, 14, 15, 24, 25, 26, 27, 36, 37, 38, 39, 48, 49, 50, 51, 4, 5, 6, 7, 16, 17, 18, 19, 28, 29, 30, 31, 40, 41, 42, 43, 52, 53, 54, 55, 8, 9, 10, 11, 20, 21, 22, 23, 32, 33, 34, 35, 44, 45, 46, 47, 56, 57, 58, 59}), @@ -82,13 +82,13 @@ std::vector generateParams() { // shuffle_channels_negative_axis ShuffleChannelsParams( - Tensor({15, 2, 1, 2}, IN_ET, std::vector{ + reference_tests::Tensor({15, 2, 1, 2}, IN_ET, 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, 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, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59}), -4, 5, - Tensor({15, 2, 1, 2}, IN_ET, std::vector{ + reference_tests::Tensor({15, 2, 1, 2}, IN_ET, std::vector{ 0, 1, 2, 3, 12, 13, 14, 15, 24, 25, 26, 27, 36, 37, 38, 39, 48, 49, 50, 51, 4, 5, 6, 7, 16, 17, 18, 19, 28, 29, 30, 31, 40, 41, 42, 43, 52, 53, 54, 55, 8, 9, 10, 11, 20, 21, 22, 23, 32, 33, 34, 35, 44, 45, 46, 47, 56, 57, 58, 59}), @@ -96,29 +96,29 @@ std::vector generateParams() { // shuffle_channels_float ShuffleChannelsParams( - Tensor({6, 1, 1, 1}, IN_ET, std::vector{0, 1, 2, 3, 4, 5}), + reference_tests::Tensor({6, 1, 1, 1}, IN_ET, std::vector{0, 1, 2, 3, 4, 5}), 0, 2, - Tensor({6, 1, 1, 1}, IN_ET, std::vector{0, 3, 1, 4, 2, 5}), + reference_tests::Tensor({6, 1, 1, 1}, IN_ET, std::vector{0, 3, 1, 4, 2, 5}), "shuffle_channels_float"), // shuffle_channels_1d ShuffleChannelsParams( - Tensor({15}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}), + reference_tests::Tensor({15}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}), 0, 5, - Tensor({15}, IN_ET, std::vector{0, 3, 6, 9, 12, 1, 4, 7, 10, 13, 2, 5, 8, 11, 14}), + reference_tests::Tensor({15}, IN_ET, std::vector{0, 3, 6, 9, 12, 1, 4, 7, 10, 13, 2, 5, 8, 11, 14}), "shuffle_channels_1d"), // shuffle_channels_2d ShuffleChannelsParams( - Tensor({15, 4}, IN_ET, std::vector{ + reference_tests::Tensor({15, 4}, IN_ET, 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, 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, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59}), 0, 5, - Tensor({15, 4}, IN_ET, std::vector{ + reference_tests::Tensor({15, 4}, IN_ET, std::vector{ 0, 1, 2, 3, 12, 13, 14, 15, 24, 25, 26, 27, 36, 37, 38, 39, 48, 49, 50, 51, 4, 5, 6, 7, 16, 17, 18, 19, 28, 29, 30, 31, 40, 41, 42, 43, 52, 53, 54, 55, 8, 9, 10, 11, 20, @@ -127,13 +127,13 @@ std::vector generateParams() { // shuffle_channels_3d ShuffleChannelsParams( - Tensor({15, 2, 2}, IN_ET, std::vector{ + reference_tests::Tensor({15, 2, 2}, IN_ET, 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, 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, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59}), 0, 5, - Tensor({15, 2, 2}, IN_ET, std::vector{ + reference_tests::Tensor({15, 2, 2}, IN_ET, std::vector{ 0, 1, 2, 3, 12, 13, 14, 15, 24, 25, 26, 27, 36, 37, 38, 39, 48, 49, 50, 51, 4, 5, 6, 7, 16, 17, 18, 19, 28, 29, 30, 31, 40, 41, 42, 43, 52, 53, 54, 55, 8, 9, 10, 11, 20, @@ -142,7 +142,7 @@ std::vector generateParams() { // shuffle_channels_5d ShuffleChannelsParams( - Tensor({2, 2, 15, 2, 2}, IN_ET, std::vector{ + reference_tests::Tensor({2, 2, 15, 2, 2}, IN_ET, 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, 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, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, @@ -160,7 +160,7 @@ std::vector generateParams() { 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59}), 2, 5, - Tensor({2, 2, 15, 2, 2}, IN_ET, std::vector{ + reference_tests::Tensor({2, 2, 15, 2, 2}, IN_ET, std::vector{ 0, 1, 2, 3, 12, 13, 14, 15, 24, 25, 26, 27, 36, 37, 38, 39, 48, 49, 50, 51, 4, 5, 6, 7, 16, 17, 18, 19, 28, 29, 30, 31, 40, 41, 42, 43, 52, 53, 54, 55, 8, 9, 10, 11, 20, 21, 22, 23, 32, 33, 34, 35, 44, 45, 46, 47, 56, 57, 58, 59, diff --git a/docs/template_plugin/tests/functional/op_reference/sigmoid.cpp b/docs/template_plugin/tests/functional/op_reference/sigmoid.cpp index 582a73f9ef3..75a6e12a0b0 100644 --- a/docs/template_plugin/tests/functional/op_reference/sigmoid.cpp +++ b/docs/template_plugin/tests/functional/op_reference/sigmoid.cpp @@ -23,8 +23,8 @@ struct SigmoidParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceSigmoidLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/sign.cpp b/docs/template_plugin/tests/functional/op_reference/sign.cpp index 3f66e8d795b..512d7986e36 100644 --- a/docs/template_plugin/tests/functional/op_reference/sign.cpp +++ b/docs/template_plugin/tests/functional/op_reference/sign.cpp @@ -18,8 +18,8 @@ struct SignParams { PartialShape pshape; element::Type inType; element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceSignLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/sin.cpp b/docs/template_plugin/tests/functional/op_reference/sin.cpp index b6d2e759c5f..a4eff35832f 100644 --- a/docs/template_plugin/tests/functional/op_reference/sin.cpp +++ b/docs/template_plugin/tests/functional/op_reference/sin.cpp @@ -13,8 +13,8 @@ namespace reference_tests { namespace { struct SinParams { - Tensor input; - Tensor expected; + reference_tests::Tensor input; + reference_tests::Tensor expected; }; struct Builder : ParamsBuilder { diff --git a/docs/template_plugin/tests/functional/op_reference/sinh.cpp b/docs/template_plugin/tests/functional/op_reference/sinh.cpp index ea6ebd7840b..3bda9d13f48 100644 --- a/docs/template_plugin/tests/functional/op_reference/sinh.cpp +++ b/docs/template_plugin/tests/functional/op_reference/sinh.cpp @@ -13,8 +13,8 @@ namespace reference_tests { namespace { struct SinhParams { - Tensor input; - Tensor expected; + reference_tests::Tensor input; + reference_tests::Tensor expected; }; struct Builder : ParamsBuilder { diff --git a/docs/template_plugin/tests/functional/op_reference/slice.cpp b/docs/template_plugin/tests/functional/op_reference/slice.cpp index 1755bd8817c..62ec2fd1354 100644 --- a/docs/template_plugin/tests/functional/op_reference/slice.cpp +++ b/docs/template_plugin/tests/functional/op_reference/slice.cpp @@ -14,12 +14,12 @@ using namespace ov; namespace reference_tests { namespace { struct SliceParams { - SliceParams(const Tensor& data, - const Tensor& start, - const Tensor& stop, - const Tensor& step, - const Tensor& axes, - const Tensor& output, + SliceParams(const reference_tests::Tensor& data, + const reference_tests::Tensor& start, + const reference_tests::Tensor& stop, + const reference_tests::Tensor& step, + const reference_tests::Tensor& axes, + const reference_tests::Tensor& output, const std::string& test_name = "") : m_data(data), m_start(start), @@ -31,11 +31,11 @@ struct SliceParams { m_default_axes(false) {} // Default `axes` input - SliceParams(const Tensor& data, - const Tensor& start, - const Tensor& stop, - const Tensor& step, - const Tensor& output, + SliceParams(const reference_tests::Tensor& data, + const reference_tests::Tensor& start, + const reference_tests::Tensor& stop, + const reference_tests::Tensor& step, + const reference_tests::Tensor& output, const std::string& test_name = "") : m_data(data), m_start(start), @@ -45,12 +45,12 @@ struct SliceParams { m_test_name(test_name), m_default_axes(true) {} - Tensor m_data; - Tensor m_start; - Tensor m_stop; - Tensor m_step; - Tensor m_axes; - Tensor m_output; + reference_tests::Tensor m_data; + reference_tests::Tensor m_start; + reference_tests::Tensor m_stop; + reference_tests::Tensor m_step; + reference_tests::Tensor m_axes; + reference_tests::Tensor m_output; std::string m_test_name; bool m_default_axes = false; }; @@ -97,11 +97,11 @@ public: } private: - static std::shared_ptr CreateFunction(const Tensor& data, - const Tensor& start, - const Tensor& stop, - const Tensor& step, - const Tensor& axes) { + static std::shared_ptr CreateFunction(const reference_tests::Tensor& data, + const reference_tests::Tensor& start, + const reference_tests::Tensor& stop, + const reference_tests::Tensor& step, + const reference_tests::Tensor& axes) { const auto data_param = std::make_shared(data.type, data.shape); const auto start_param = std::make_shared(start.type, start.shape); const auto stop_param = std::make_shared(stop.type, stop.shape); @@ -114,10 +114,10 @@ private: } // Default `axes` input - static std::shared_ptr CreateFunction(const Tensor& data, - const Tensor& start, - const Tensor& stop, - const Tensor& step) { + static std::shared_ptr CreateFunction(const reference_tests::Tensor& data, + const reference_tests::Tensor& start, + const reference_tests::Tensor& stop, + const reference_tests::Tensor& step) { const auto data_param = std::make_shared(data.type, data.shape); const auto start_param = std::make_shared(start.type, start.shape); const auto stop_param = std::make_shared(stop.type, stop.shape); @@ -143,98 +143,98 @@ std::vector generateSliceParamsUnsigned() { std::vector test_params{ SliceParams(Tensor{{4}, DATA_ET, std::vector{1, 2, 3, 4}}, - Tensor{{1}, IND_ET, std::vector{0}}, - Tensor{{1}, IND_ET, std::vector{5}}, - Tensor{{1}, IND_ET, std::vector{1}}, - Tensor{{1}, AXIS_ET, std::vector{0}}, - Tensor{{4}, DATA_ET, std::vector{1, 2, 3, 4}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{0}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{5}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{1}}, + reference_tests::Tensor{{1}, AXIS_ET, std::vector{0}}, + reference_tests::Tensor{{4}, DATA_ET, std::vector{1, 2, 3, 4}}, "1D_full_axes"), SliceParams(Tensor{{4}, DATA_ET, std::vector{1, 2, 3, 4}}, - Tensor{{1}, IND_ET, std::vector{0}}, - Tensor{{1}, IND_ET, std::vector{5}}, - Tensor{{1}, IND_ET, std::vector{1}}, - Tensor{{4}, DATA_ET, std::vector{1, 2, 3, 4}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{0}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{5}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{1}}, + reference_tests::Tensor{{4}, DATA_ET, std::vector{1, 2, 3, 4}}, "1D_default_axes"), SliceParams(Tensor{{4}, DATA_ET, std::vector{1, 2, 3, 4}}, - Tensor{{1}, IND_ET, std::vector{6}}, - Tensor{{1}, IND_ET, std::vector{5}}, - Tensor{{1}, IND_ET, std::vector{1}}, - Tensor{{1}, AXIS_ET, std::vector{0}}, - Tensor{{0}, DATA_ET, std::vector{}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{6}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{5}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{1}}, + reference_tests::Tensor{{1}, AXIS_ET, std::vector{0}}, + reference_tests::Tensor{{0}, DATA_ET, std::vector{}}, "1D_empty_output"), SliceParams(Tensor{{2, 2}, DATA_ET, std::vector{1, 2, 3, 4}}, - Tensor{{2}, IND_ET, std::vector{0, 0}}, - Tensor{{2}, IND_ET, std::vector{2, 2}}, - Tensor{{2}, IND_ET, std::vector{1, 1}}, - Tensor{{2}, AXIS_ET, std::vector{0, 1}}, - Tensor{{2, 2}, DATA_ET, std::vector{1, 2, 3, 4}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{0, 0}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{2, 2}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{1, 1}}, + reference_tests::Tensor{{2}, AXIS_ET, std::vector{0, 1}}, + reference_tests::Tensor{{2, 2}, DATA_ET, std::vector{1, 2, 3, 4}}, "2D_full_axes"), SliceParams(Tensor{{2, 2}, DATA_ET, std::vector{1, 2, 3, 4}}, - Tensor{{2}, IND_ET, std::vector{0, 0}}, - Tensor{{2}, IND_ET, std::vector{2, 2}}, - Tensor{{2}, IND_ET, std::vector{1, 1}}, - Tensor{{2, 2}, DATA_ET, std::vector{1, 2, 3, 4}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{0, 0}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{2, 2}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{1, 1}}, + reference_tests::Tensor{{2, 2}, DATA_ET, std::vector{1, 2, 3, 4}}, "2D_default_axes"), SliceParams(Tensor{{2, 4}, DATA_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8}}, - Tensor{{2}, IND_ET, std::vector{1, 0}}, - Tensor{{2}, IND_ET, std::vector{2, 3}}, - Tensor{{2}, IND_ET, std::vector{1, 2}}, - Tensor{{2}, AXIS_ET, std::vector{0, 1}}, - Tensor{{1, 2}, DATA_ET, std::vector{5, 7}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{1, 0}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{2, 3}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{1, 2}}, + reference_tests::Tensor{{2}, AXIS_ET, std::vector{0, 1}}, + reference_tests::Tensor{{1, 2}, DATA_ET, std::vector{5, 7}}, "2D_step_2"), SliceParams(Tensor{{3, 16}, DATA_ET, 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, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}}, - Tensor{{2}, IND_ET, std::vector{0, 0}}, - Tensor{{2}, IND_ET, std::vector{3, 16}}, - Tensor{{2}, IND_ET, std::vector{1, 15}}, - Tensor{{2}, AXIS_ET, std::vector{0, 1}}, - Tensor{{3, 2}, DATA_ET, std::vector{0, 15, 16, 31, 32, 47}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{0, 0}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{3, 16}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{1, 15}}, + reference_tests::Tensor{{2}, AXIS_ET, std::vector{0, 1}}, + reference_tests::Tensor{{3, 2}, DATA_ET, std::vector{0, 15, 16, 31, 32, 47}}, "2D_big_step"), SliceParams(Tensor{{2, 2}, DATA_ET, std::vector{1, 2, 3, 4}}, - Tensor{{2}, IND_ET, std::vector{10, 0}}, - Tensor{{2}, IND_ET, std::vector{20, 2}}, - Tensor{{2}, IND_ET, std::vector{1, 1}}, - Tensor{{2}, AXIS_ET, std::vector{0, 1}}, - Tensor{{0, 2}, DATA_ET, std::vector{}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{10, 0}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{20, 2}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{1, 1}}, + reference_tests::Tensor{{2}, AXIS_ET, std::vector{0, 1}}, + reference_tests::Tensor{{0, 2}, DATA_ET, std::vector{}}, "2D_empty_output"), SliceParams(Tensor{{2, 2, 2}, DATA_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8}}, - Tensor{{3}, IND_ET, std::vector{0, 0, 0}}, - Tensor{{3}, IND_ET, std::vector{2, 2, 2}}, - Tensor{{3}, IND_ET, std::vector{1, 1, 1}}, - Tensor{{3}, AXIS_ET, std::vector{0, 1, 2}}, - Tensor{{2, 2, 2}, DATA_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8}}, + reference_tests::Tensor{{3}, IND_ET, std::vector{0, 0, 0}}, + reference_tests::Tensor{{3}, IND_ET, std::vector{2, 2, 2}}, + reference_tests::Tensor{{3}, IND_ET, std::vector{1, 1, 1}}, + reference_tests::Tensor{{3}, AXIS_ET, std::vector{0, 1, 2}}, + reference_tests::Tensor{{2, 2, 2}, DATA_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8}}, "3D_full_axes"), SliceParams(Tensor{{2, 2, 2}, DATA_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8}}, - Tensor{{3}, IND_ET, std::vector{0, 0, 0}}, - Tensor{{3}, IND_ET, std::vector{2, 2, 2}}, - Tensor{{3}, IND_ET, std::vector{1, 1, 1}}, - Tensor{{2, 2, 2}, DATA_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8}}, + reference_tests::Tensor{{3}, IND_ET, std::vector{0, 0, 0}}, + reference_tests::Tensor{{3}, IND_ET, std::vector{2, 2, 2}}, + reference_tests::Tensor{{3}, IND_ET, std::vector{1, 1, 1}}, + reference_tests::Tensor{{2, 2, 2}, DATA_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8}}, "3D_default_axes"), SliceParams(Tensor{{2, 2, 2}, DATA_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8}}, - Tensor{{2}, IND_ET, std::vector{0, 0}}, - Tensor{{2}, IND_ET, std::vector{2, 2}}, - Tensor{{2}, IND_ET, std::vector{1, 1}}, - Tensor{{2}, AXIS_ET, std::vector{0, 1}}, - Tensor{{2, 2, 2}, DATA_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{0, 0}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{2, 2}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{1, 1}}, + reference_tests::Tensor{{2}, AXIS_ET, std::vector{0, 1}}, + reference_tests::Tensor{{2, 2, 2}, DATA_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8}}, "3D_less_axes"), SliceParams(Tensor{{2, 2, 2}, DATA_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8}}, - Tensor{{3}, IND_ET, std::vector{0, 2, 0}}, - Tensor{{3}, IND_ET, std::vector{2, 2, 2}}, - Tensor{{3}, IND_ET, std::vector{1, 1, 1}}, - Tensor{{3}, AXIS_ET, std::vector{0, 1, 2}}, - Tensor{{2, 0, 2}, DATA_ET, std::vector{}}, + reference_tests::Tensor{{3}, IND_ET, std::vector{0, 2, 0}}, + reference_tests::Tensor{{3}, IND_ET, std::vector{2, 2, 2}}, + reference_tests::Tensor{{3}, IND_ET, std::vector{1, 1, 1}}, + reference_tests::Tensor{{3}, AXIS_ET, std::vector{0, 1, 2}}, + reference_tests::Tensor{{2, 0, 2}, DATA_ET, std::vector{}}, "3D_empty_output"), SliceParams(Tensor{{4, 2, 3, 2}, DATA_ET, 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, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}}, - Tensor{{4}, IND_ET, std::vector{0, 0, 0, 0}}, - Tensor{{4}, IND_ET, std::vector{4, 2, 3, 2}}, - Tensor{{4}, IND_ET, std::vector{1, 1, 1, 1}}, - Tensor{{4}, AXIS_ET, std::vector{0, 1, 2, 3}}, - Tensor{{4, 2, 3, 2}, DATA_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + reference_tests::Tensor{{4}, IND_ET, std::vector{0, 0, 0, 0}}, + reference_tests::Tensor{{4}, IND_ET, std::vector{4, 2, 3, 2}}, + reference_tests::Tensor{{4}, IND_ET, std::vector{1, 1, 1, 1}}, + reference_tests::Tensor{{4}, AXIS_ET, std::vector{0, 1, 2, 3}}, + reference_tests::Tensor{{4, 2, 3, 2}, DATA_ET, 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, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}}, @@ -243,10 +243,10 @@ std::vector generateSliceParamsUnsigned() { 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}}, - Tensor{{4}, IND_ET, std::vector{0, 0, 0, 0}}, - Tensor{{4}, IND_ET, std::vector{4, 2, 3, 2}}, - Tensor{{4}, IND_ET, std::vector{1, 1, 1, 1}}, - Tensor{{4, 2, 3, 2}, DATA_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + reference_tests::Tensor{{4}, IND_ET, std::vector{0, 0, 0, 0}}, + reference_tests::Tensor{{4}, IND_ET, std::vector{4, 2, 3, 2}}, + reference_tests::Tensor{{4}, IND_ET, std::vector{1, 1, 1, 1}}, + reference_tests::Tensor{{4, 2, 3, 2}, DATA_ET, 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, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}}, @@ -255,37 +255,37 @@ std::vector generateSliceParamsUnsigned() { 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}}, - Tensor{{1}, IND_ET, std::vector{0}}, - Tensor{{1}, IND_ET, std::vector{2}}, - Tensor{{1}, IND_ET, std::vector{1}}, - Tensor{{1}, AXIS_ET, std::vector{0}}, - Tensor{{2, 2, 3, 2}, DATA_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + reference_tests::Tensor{{1}, IND_ET, std::vector{0}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{2}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{1}}, + reference_tests::Tensor{{1}, AXIS_ET, std::vector{0}}, + reference_tests::Tensor{{2, 2, 3, 2}, DATA_ET, 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}}, "4D_half_dim"), SliceParams(Tensor{{4, 2, 3, 2}, DATA_ET, 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, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}}, - Tensor{{1}, IND_ET, std::vector{0}}, - Tensor{{1}, IND_ET, std::vector{4}}, - Tensor{{1}, IND_ET, std::vector{2}}, - Tensor{{1}, AXIS_ET, std::vector{0}}, - Tensor{{2, 2, 3, 2}, DATA_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + reference_tests::Tensor{{1}, IND_ET, std::vector{0}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{4}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{2}}, + reference_tests::Tensor{{1}, AXIS_ET, std::vector{0}}, + reference_tests::Tensor{{2, 2, 3, 2}, DATA_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35}}, "4D_half_dim_step"), SliceParams( - Tensor{{2, 4, 2, 2, 3}, + reference_tests::Tensor{{2, 4, 2, 2, 3}, DATA_ET, 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, 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, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95}}, - Tensor{{5}, IND_ET, std::vector{0, 0, 0, 0, 0}}, - Tensor{{5}, IND_ET, std::vector{2, 4, 2, 2, 3}}, - Tensor{{5}, IND_ET, std::vector{1, 1, 1, 1, 1}}, - Tensor{{5}, AXIS_ET, std::vector{0, 1, 2, 3, 4}}, - Tensor{{2, 2, 2, 1, 2}, + reference_tests::Tensor{{5}, IND_ET, std::vector{0, 0, 0, 0, 0}}, + reference_tests::Tensor{{5}, IND_ET, std::vector{2, 4, 2, 2, 3}}, + reference_tests::Tensor{{5}, IND_ET, std::vector{1, 1, 1, 1, 1}}, + reference_tests::Tensor{{5}, AXIS_ET, std::vector{0, 1, 2, 3, 4}}, + reference_tests::Tensor{{2, 2, 2, 1, 2}, DATA_ET, 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, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, @@ -305,76 +305,76 @@ std::vector generateSliceParams() { std::vector test_params{ SliceParams(Tensor{{4}, DATA_ET, std::vector{1, 2, 3, 4}}, - Tensor{{1}, IND_ET, std::vector{5}}, - Tensor{{1}, IND_ET, std::vector{-6}}, - Tensor{{1}, IND_ET, std::vector{-1}}, - Tensor{{4}, DATA_ET, std::vector{4, 3, 2, 1}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{5}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{-6}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{-1}}, + reference_tests::Tensor{{4}, DATA_ET, std::vector{4, 3, 2, 1}}, "1D_negative_step"), SliceParams(Tensor{{4}, DATA_ET, std::vector{1, 2, 3, 4}}, - Tensor{{1}, IND_ET, std::vector{0}}, - Tensor{{1}, IND_ET, std::vector{5}}, - Tensor{{1}, IND_ET, std::vector{-1}}, - Tensor{{1}, AXIS_ET, std::vector{0}}, - Tensor{{0}, DATA_ET, std::vector{}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{0}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{5}}, + reference_tests::Tensor{{1}, IND_ET, std::vector{-1}}, + reference_tests::Tensor{{1}, AXIS_ET, std::vector{0}}, + reference_tests::Tensor{{0}, DATA_ET, std::vector{}}, "1D_empty_output_negative_step"), SliceParams(Tensor{{2, 2}, DATA_ET, std::vector{1, 2, 3, 4}}, - Tensor{{2}, IND_ET, std::vector{0, 3}}, - Tensor{{2}, IND_ET, std::vector{2, -4}}, - Tensor{{2}, IND_ET, std::vector{1, -1}}, - Tensor{{2}, AXIS_ET, std::vector{0, 1}}, - Tensor{{2, 2}, DATA_ET, std::vector{2, 1, 4, 3}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{0, 3}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{2, -4}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{1, -1}}, + reference_tests::Tensor{{2}, AXIS_ET, std::vector{0, 1}}, + reference_tests::Tensor{{2, 2}, DATA_ET, std::vector{2, 1, 4, 3}}, "2D_negative_step_mix"), SliceParams(Tensor{{2, 2}, DATA_ET, std::vector{1, 2, 3, 4}}, - Tensor{{2}, IND_ET, std::vector{-1, 3}}, - Tensor{{2}, IND_ET, std::vector{-4, -4}}, - Tensor{{2}, IND_ET, std::vector{-1, -1}}, - Tensor{{2}, AXIS_ET, std::vector{0, 1}}, - Tensor{{2, 2}, DATA_ET, std::vector{4, 3, 2, 1}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{-1, 3}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{-4, -4}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{-1, -1}}, + reference_tests::Tensor{{2}, AXIS_ET, std::vector{0, 1}}, + reference_tests::Tensor{{2, 2}, DATA_ET, std::vector{4, 3, 2, 1}}, "2D_negative_step_only"), SliceParams(Tensor{{3, 16}, DATA_ET, 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, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}}, - Tensor{{2}, IND_ET, std::vector{2, 15}}, - Tensor{{2}, IND_ET, std::vector{-4, -17}}, - Tensor{{2}, IND_ET, std::vector{-1, -15}}, - Tensor{{2}, AXIS_ET, std::vector{0, 1}}, - Tensor{{3, 2}, DATA_ET, std::vector{47, 32, 31, 16, 15, 0}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{2, 15}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{-4, -17}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{-1, -15}}, + reference_tests::Tensor{{2}, AXIS_ET, std::vector{0, 1}}, + reference_tests::Tensor{{3, 2}, DATA_ET, std::vector{47, 32, 31, 16, 15, 0}}, "2D_negative_big_step"), SliceParams(Tensor{{2, 2, 2}, DATA_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8}}, - Tensor{{3}, IND_ET, std::vector{0, 0, 0}}, - Tensor{{3}, IND_ET, std::vector{2, 2, 2}}, - Tensor{{3}, IND_ET, std::vector{1, 1, 1}}, - Tensor{{3}, AXIS_ET, std::vector{-3, -2, -1}}, - Tensor{{2, 2, 2}, DATA_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8}}, + reference_tests::Tensor{{3}, IND_ET, std::vector{0, 0, 0}}, + reference_tests::Tensor{{3}, IND_ET, std::vector{2, 2, 2}}, + reference_tests::Tensor{{3}, IND_ET, std::vector{1, 1, 1}}, + reference_tests::Tensor{{3}, AXIS_ET, std::vector{-3, -2, -1}}, + reference_tests::Tensor{{2, 2, 2}, DATA_ET, std::vector{1, 2, 3, 4, 5, 6, 7, 8}}, "3D_negative_axes"), SliceParams(Tensor{{2, 4, 3}, DATA_ET, 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}}, - Tensor{{3}, IND_ET, std::vector{0, 0, 4}}, - Tensor{{3}, IND_ET, std::vector{2, 4, -5}}, - Tensor{{3}, IND_ET, std::vector{3, 2, -2}}, - Tensor{{3}, AXIS_ET, std::vector{0, 1, 2}}, - Tensor{{1, 2, 2}, DATA_ET, std::vector{2, 0, 8, 6}}, + reference_tests::Tensor{{3}, IND_ET, std::vector{0, 0, 4}}, + reference_tests::Tensor{{3}, IND_ET, std::vector{2, 4, -5}}, + reference_tests::Tensor{{3}, IND_ET, std::vector{3, 2, -2}}, + reference_tests::Tensor{{3}, AXIS_ET, std::vector{0, 1, 2}}, + reference_tests::Tensor{{1, 2, 2}, DATA_ET, std::vector{2, 0, 8, 6}}, "3D_mixed_step"), SliceParams(Tensor{{4, 2, 3, 2}, DATA_ET, 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, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}}, - Tensor{{4}, + reference_tests::Tensor{{4}, IND_ET, std::vector{std::numeric_limits::min(), std::numeric_limits::max(), std::numeric_limits::max(), std::numeric_limits::min()}}, - Tensor{{4}, + reference_tests::Tensor{{4}, IND_ET, std::vector{std::numeric_limits::max(), std::numeric_limits::min(), std::numeric_limits::min(), std::numeric_limits::max()}}, - Tensor{{4}, IND_ET, std::vector{1, -1, -1, 1}}, - Tensor{{4}, AXIS_ET, std::vector{0, 1, 2, 3}}, - Tensor{{4, 2, 3, 2}, DATA_ET, std::vector{10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 0, 1, + reference_tests::Tensor{{4}, IND_ET, std::vector{1, -1, -1, 1}}, + reference_tests::Tensor{{4}, AXIS_ET, std::vector{0, 1, 2, 3}}, + reference_tests::Tensor{{4, 2, 3, 2}, DATA_ET, std::vector{10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 0, 1, 22, 23, 20, 21, 18, 19, 16, 17, 14, 15, 12, 13, 34, 35, 32, 33, 30, 31, 28, 29, 26, 27, 24, 25, 46, 47, 44, 45, 42, 43, 40, 41, 38, 39, 36, 37}}, @@ -383,26 +383,26 @@ std::vector generateSliceParams() { 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}}, - Tensor{{2}, IND_ET, std::vector{100, -100}}, - Tensor{{2}, IND_ET, std::vector{-100, 100}}, - Tensor{{2}, IND_ET, std::vector{-1, 2}}, - Tensor{{2}, AXIS_ET, std::vector{2, 0}}, - Tensor{{2, 2, 3, 2}, DATA_ET, std::vector{4, 5, 2, 3, 0, 1, 10, 11, 8, 9, 6, 7, + reference_tests::Tensor{{2}, IND_ET, std::vector{100, -100}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{-100, 100}}, + reference_tests::Tensor{{2}, IND_ET, std::vector{-1, 2}}, + reference_tests::Tensor{{2}, AXIS_ET, std::vector{2, 0}}, + reference_tests::Tensor{{2, 2, 3, 2}, DATA_ET, std::vector{4, 5, 2, 3, 0, 1, 10, 11, 8, 9, 6, 7, 28, 29, 26, 27, 24, 25, 34, 35, 32, 33, 30, 31}}, "4D_mixed"), SliceParams( - Tensor{{2, 4, 2, 2, 3}, + reference_tests::Tensor{{2, 4, 2, 2, 3}, DATA_ET, 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, 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, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95}}, - Tensor{{5}, IND_ET, std::vector{0, 1, -5, 100, 1}}, - Tensor{{5}, IND_ET, std::vector{2, 6, 3, -100, 2}}, - Tensor{{5}, IND_ET, std::vector{1, 2, 2, -1, 1}}, - Tensor{{5}, AXIS_ET, std::vector{-5, 1, 4, 2, 3}}, - Tensor{{2, 2, 2, 1, 2}, + reference_tests::Tensor{{5}, IND_ET, std::vector{0, 1, -5, 100, 1}}, + reference_tests::Tensor{{5}, IND_ET, std::vector{2, 6, 3, -100, 2}}, + reference_tests::Tensor{{5}, IND_ET, std::vector{1, 2, 2, -1, 1}}, + reference_tests::Tensor{{5}, AXIS_ET, std::vector{-5, 1, 4, 2, 3}}, + reference_tests::Tensor{{2, 2, 2, 1, 2}, DATA_ET, std::vector{21, 23, 15, 17, 45, 47, 39, 41, 69, 71, 63, 65, 93, 95, 87, 89}}, "5D_mixed"), diff --git a/docs/template_plugin/tests/functional/op_reference/softmax.cpp b/docs/template_plugin/tests/functional/op_reference/softmax.cpp index 62a8a12a71a..2a0162eb475 100644 --- a/docs/template_plugin/tests/functional/op_reference/softmax.cpp +++ b/docs/template_plugin/tests/functional/op_reference/softmax.cpp @@ -28,8 +28,8 @@ struct SoftmaxParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; std::string test_case_name; }; diff --git a/docs/template_plugin/tests/functional/op_reference/softplus.cpp b/docs/template_plugin/tests/functional/op_reference/softplus.cpp index f1963271985..4b5eefae915 100644 --- a/docs/template_plugin/tests/functional/op_reference/softplus.cpp +++ b/docs/template_plugin/tests/functional/op_reference/softplus.cpp @@ -23,8 +23,8 @@ struct SoftPlusParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceSoftPlusLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/space_to_batch.cpp b/docs/template_plugin/tests/functional/op_reference/space_to_batch.cpp index 3f2159c711b..574415d7453 100644 --- a/docs/template_plugin/tests/functional/op_reference/space_to_batch.cpp +++ b/docs/template_plugin/tests/functional/op_reference/space_to_batch.cpp @@ -14,18 +14,18 @@ using namespace ov; namespace { struct SpaceToBatchParams { - SpaceToBatchParams(const Tensor& dataTensor, const Tensor& blockShapeTensor, - const Tensor& padsBeginTensor, const Tensor& padsEndTensor, - const Tensor& expectedTensor, const std::string& testcaseName = "") : + SpaceToBatchParams(const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& blockShapeTensor, + const reference_tests::Tensor& padsBeginTensor, const reference_tests::Tensor& padsEndTensor, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dataTensor(dataTensor), blockShapeTensor(blockShapeTensor), padsBeginTensor(padsBeginTensor), padsEndTensor(padsEndTensor), expectedTensor(expectedTensor), testcaseName(testcaseName) {} - Tensor dataTensor; - Tensor blockShapeTensor; - Tensor padsBeginTensor; - Tensor padsEndTensor; - Tensor expectedTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor blockShapeTensor; + reference_tests::Tensor padsBeginTensor; + reference_tests::Tensor padsEndTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -80,20 +80,20 @@ std::vector generateParams() { std::vector batchToSpaceParams { // space_to_batch_4D SpaceToBatchParams( - Tensor({1, 1, 2, 2}, IN_ET, std::vector{1, 1, 1, 1}), - Tensor({4}, element::i64, std::vector{1, 1, 1, 1}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - Tensor({1, 1, 2, 2}, IN_ET, std::vector{1, 1, 1, 1}), + reference_tests::Tensor({1, 1, 2, 2}, IN_ET, std::vector{1, 1, 1, 1}), + reference_tests::Tensor({4}, element::i64, std::vector{1, 1, 1, 1}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), + reference_tests::Tensor({1, 1, 2, 2}, IN_ET, std::vector{1, 1, 1, 1}), "space_to_batch_4D"), // space_to_batch_5D SpaceToBatchParams( - Tensor({1, 1, 3, 2, 1}, IN_ET, std::vector{1, 1, 1, 1, 1, 1}), - Tensor({5}, element::i64, std::vector{1, 1, 3, 2, 2}), - Tensor({5}, element::i64, std::vector{0, 0, 1, 0, 3}), - Tensor({5}, element::i64, std::vector{0, 0, 2, 0, 0}), - Tensor({12, 1, 2, 1, 2}, IN_ET, std::vector{ + reference_tests::Tensor({1, 1, 3, 2, 1}, IN_ET, std::vector{1, 1, 1, 1, 1, 1}), + reference_tests::Tensor({5}, element::i64, std::vector{1, 1, 3, 2, 2}), + reference_tests::Tensor({5}, element::i64, std::vector{0, 0, 1, 0, 3}), + reference_tests::Tensor({5}, element::i64, std::vector{0, 0, 2, 0, 0}), + reference_tests::Tensor({12, 1, 2, 1, 2}, IN_ET, std::vector{ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, @@ -102,12 +102,12 @@ std::vector generateParams() { // space_to_batch_4x4 SpaceToBatchParams( - Tensor({1, 1, 4, 4}, IN_ET, std::vector{ + reference_tests::Tensor({1, 1, 4, 4}, IN_ET, std::vector{ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}), - Tensor({4}, element::i64, std::vector{1, 1, 1, 1}), - Tensor({4}, element::i64, std::vector{0, 0, 1, 0}), - Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), - Tensor({1, 1, 5, 4}, IN_ET, std::vector{ + reference_tests::Tensor({4}, element::i64, std::vector{1, 1, 1, 1}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 1, 0}), + reference_tests::Tensor({4}, element::i64, std::vector{0, 0, 0, 0}), + reference_tests::Tensor({1, 1, 5, 4}, IN_ET, std::vector{ 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}), "space_to_batch_4x4"), diff --git a/docs/template_plugin/tests/functional/op_reference/space_to_depth.cpp b/docs/template_plugin/tests/functional/op_reference/space_to_depth.cpp index 7187fbe43b0..ae57c90e5ef 100644 --- a/docs/template_plugin/tests/functional/op_reference/space_to_depth.cpp +++ b/docs/template_plugin/tests/functional/op_reference/space_to_depth.cpp @@ -12,15 +12,15 @@ using namespace ov; namespace { struct SpaceToDepthParams { - SpaceToDepthParams(const Tensor& dataTensor, const std::string mode, const int32_t blockSize, - const Tensor& expectedTensor, const std::string& testcaseName = "") : + SpaceToDepthParams(const reference_tests::Tensor& dataTensor, const std::string mode, const int32_t blockSize, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dataTensor(dataTensor), mode(mode), blockSize(blockSize), expectedTensor(expectedTensor), testcaseName(testcaseName) {} - Tensor dataTensor; + reference_tests::Tensor dataTensor; std::string mode; int32_t blockSize; - Tensor expectedTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -68,73 +68,73 @@ std::vector generateParams() { std::vector params { // space_to_depth_block_first_K2_BS2 SpaceToDepthParams( - Tensor({1, 2, 4, 4}, IN_ET, std::vector{ + reference_tests::Tensor({1, 2, 4, 4}, IN_ET, 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, 24, 25, 26, 27, 28, 29, 30, 31}), "BLOCKS_FIRST", 2, - Tensor({1, 8, 2, 2}, IN_ET, std::vector{ + reference_tests::Tensor({1, 8, 2, 2}, IN_ET, std::vector{ 0, 2, 8, 10, 16, 18, 24, 26, 1, 3, 9, 11, 17, 19, 25, 27, 4, 6, 12, 14, 20, 22, 28, 30, 5, 7, 13, 15, 21, 23, 29, 31}), "space_to_depth_block_first_K2_BS2"), // space_to_depth_block_first_K2_BS3 SpaceToDepthParams( - Tensor({1, 2, 6, 3}, IN_ET, std::vector{ + reference_tests::Tensor({1, 2, 6, 3}, IN_ET, std::vector{ 0, 4, 8, 12, 16, 20, 24, 28, 32, 1, 5, 9, 13, 17, 21, 25, 29, 33, 2, 6, 10, 14, 18, 22, 26, 30, 34, 3, 7, 11, 15, 19, 23, 27, 31, 35}), "BLOCKS_FIRST", 3, - Tensor({1, 18, 2, 1}, IN_ET, std::vector{ + reference_tests::Tensor({1, 18, 2, 1}, IN_ET, 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, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35}), "space_to_depth_block_first_K2_BS3"), // space_to_depth_block_first_K1_BS3 SpaceToDepthParams( - Tensor({1, 2, 6}, IN_ET, std::vector{ + reference_tests::Tensor({1, 2, 6}, IN_ET, std::vector{ 0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11}), "BLOCKS_FIRST", 3, - Tensor({1, 6, 2}, IN_ET, std::vector{ + reference_tests::Tensor({1, 6, 2}, IN_ET, std::vector{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), "space_to_depth_block_first_K1_BS3"), // space_to_depth_depth_first_K2_BS2 SpaceToDepthParams( - Tensor({1, 2, 4, 4}, IN_ET, std::vector{ + reference_tests::Tensor({1, 2, 4, 4}, IN_ET, std::vector{ 0, 16, 2, 18, 1, 17, 3, 19, 8, 24, 10, 26, 9, 25, 11, 27, 4, 20, 6, 22, 5, 21, 7, 23, 12, 28, 14, 30, 13, 29, 15, 31}), "DEPTH_FIRST", 2, - Tensor({1, 8, 2, 2}, IN_ET, std::vector{ + reference_tests::Tensor({1, 8, 2, 2}, IN_ET, std::vector{ 0, 2, 8, 10, 16, 18, 24, 26, 1, 3, 9, 11, 17, 19, 25, 27, 4, 6, 12, 14, 20, 22, 28, 30, 5, 7, 13, 15, 21, 23, 29, 31}), "space_to_depth_depth_first_K2_BS2"), // space_to_depth_depth_first_K2_BS3 SpaceToDepthParams( - Tensor({1, 2, 6, 3}, IN_ET, std::vector{ + reference_tests::Tensor({1, 2, 6, 3}, IN_ET, std::vector{ 0, 2, 4, 6, 8, 10, 12, 14, 16, 1, 3, 5, 7, 9, 11, 13, 15, 17, 18, 20, 22, 24, 26, 28, 30, 32, 34, 19, 21, 23, 25, 27, 29, 31, 33, 35}), "DEPTH_FIRST", 3, - Tensor({1, 18, 2, 1}, IN_ET, std::vector{ + reference_tests::Tensor({1, 18, 2, 1}, IN_ET, 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, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35}), "space_to_depth_depth_first_K2_BS3"), // space_to_depth_depth_first_K1_BS3 SpaceToDepthParams( - Tensor({1, 2, 6}, IN_ET, std::vector{ + reference_tests::Tensor({1, 2, 6}, IN_ET, std::vector{ 0, 2, 4, 1, 3, 5, 6, 8, 10, 7, 9, 11}), "DEPTH_FIRST", 3, - Tensor({1, 6, 2}, IN_ET, std::vector{ + reference_tests::Tensor({1, 6, 2}, IN_ET, std::vector{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), "space_to_depth_depth_first_K1_BS3"), }; diff --git a/docs/template_plugin/tests/functional/op_reference/split.cpp b/docs/template_plugin/tests/functional/op_reference/split.cpp index 7d34b0467ad..a35b07007eb 100644 --- a/docs/template_plugin/tests/functional/op_reference/split.cpp +++ b/docs/template_plugin/tests/functional/op_reference/split.cpp @@ -13,15 +13,15 @@ using namespace ov; namespace { struct SplitParams { - SplitParams(const Tensor& dataTensor, const Tensor& axisTensor, const size_t numSplits, - const std::vector& expectedTensors, const std::string& testcaseName = "") : + SplitParams(const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& axisTensor, const size_t numSplits, + const std::vector& expectedTensors, const std::string& testcaseName = "") : dataTensor(dataTensor), axisTensor(axisTensor), numSplits(numSplits), expectedTensors(expectedTensors), testcaseName(testcaseName) {} - Tensor dataTensor; - Tensor axisTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor axisTensor; size_t numSplits; - std::vector expectedTensors; + std::vector expectedTensors; std::string testcaseName; }; @@ -75,89 +75,89 @@ std::vector generateSplitParams() { using T = typename element_type_traits::value_type; std::vector splitParams { // split_1d - SplitParams(Tensor({6}, IN_ET, std::vector{1, 2, 3, 4, 5, 6}), - Tensor({}, element::i64, std::vector{0}), + SplitParams(reference_tests::Tensor({6}, IN_ET, std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor({}, element::i64, std::vector{0}), 3, - std::vector{Tensor({2}, IN_ET, std::vector{1, 2}), - Tensor({2}, IN_ET, std::vector{3, 4}), - Tensor({2}, IN_ET, std::vector{5, 6})}, + std::vector{reference_tests::Tensor({2}, IN_ET, std::vector{1, 2}), + reference_tests::Tensor({2}, IN_ET, std::vector{3, 4}), + reference_tests::Tensor({2}, IN_ET, std::vector{5, 6})}, "split_1d"), // split_2d_axis_0 - SplitParams(Tensor({6, 2}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), - Tensor({}, element::i64, std::vector{0}), + SplitParams(reference_tests::Tensor({6, 2}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), + reference_tests::Tensor({}, element::i64, std::vector{0}), 2, - std::vector{Tensor({3, 2}, IN_ET, std::vector{0, 1, 2, 3, 4, 5}), - Tensor({3, 2}, IN_ET, std::vector{6, 7, 8, 9, 10, 11})}, + std::vector{reference_tests::Tensor({3, 2}, IN_ET, std::vector{0, 1, 2, 3, 4, 5}), + reference_tests::Tensor({3, 2}, IN_ET, std::vector{6, 7, 8, 9, 10, 11})}, "split_2d_axis_0"), // split_2d_axis_1 - SplitParams(Tensor({6, 2}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), - Tensor({}, element::i64, std::vector{1}), + SplitParams(reference_tests::Tensor({6, 2}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), + reference_tests::Tensor({}, element::i64, std::vector{1}), 2, - std::vector{Tensor({6, 1}, IN_ET, std::vector{0, 2, 4, 6, 8, 10}), - Tensor({6, 1}, IN_ET, std::vector{1, 3, 5, 7, 9, 11})}, + std::vector{reference_tests::Tensor({6, 1}, IN_ET, std::vector{0, 2, 4, 6, 8, 10}), + reference_tests::Tensor({6, 1}, IN_ET, std::vector{1, 3, 5, 7, 9, 11})}, "split_2d_axis_1"), // split_3d_axis_0 - SplitParams(Tensor({2, 2, 3}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), - Tensor({}, element::i64, std::vector{0}), + SplitParams(reference_tests::Tensor({2, 2, 3}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), + reference_tests::Tensor({}, element::i64, std::vector{0}), 2, - std::vector{Tensor({1, 2, 3}, IN_ET, std::vector{0, 1, 2, 3, 4, 5}), - Tensor({1, 2, 3}, IN_ET, std::vector{6, 7, 8, 9, 10, 11})}, + std::vector{reference_tests::Tensor({1, 2, 3}, IN_ET, std::vector{0, 1, 2, 3, 4, 5}), + reference_tests::Tensor({1, 2, 3}, IN_ET, std::vector{6, 7, 8, 9, 10, 11})}, "split_3d_axis_0"), // split_3d_axis_1 - SplitParams(Tensor({2, 8, 2}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + SplitParams(reference_tests::Tensor({2, 8, 2}, IN_ET, 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, 24, 25, 26, 27, 28, 29, 30, 31}), - Tensor({}, element::i64, std::vector{1}), + reference_tests::Tensor({}, element::i64, std::vector{1}), 4, - std::vector{Tensor({2, 2, 2}, IN_ET, std::vector{0, 1, 2, 3, 16, 17, 18, 19}), - Tensor({2, 2, 2}, IN_ET, std::vector{4, 5, 6, 7, 20, 21, 22, 23}), - Tensor({2, 2, 2}, IN_ET, std::vector{8, 9, 10, 11, 24, 25, 26, 27}), - Tensor({2, 2, 2}, IN_ET, std::vector{12, 13, 14, 15, 28, 29, 30, 31})}, + std::vector{reference_tests::Tensor({2, 2, 2}, IN_ET, std::vector{0, 1, 2, 3, 16, 17, 18, 19}), + reference_tests::Tensor({2, 2, 2}, IN_ET, std::vector{4, 5, 6, 7, 20, 21, 22, 23}), + reference_tests::Tensor({2, 2, 2}, IN_ET, std::vector{8, 9, 10, 11, 24, 25, 26, 27}), + reference_tests::Tensor({2, 2, 2}, IN_ET, std::vector{12, 13, 14, 15, 28, 29, 30, 31})}, "split_3d_axis_1"), // split_3d_axis_2 - SplitParams(Tensor({2, 1, 6}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), - Tensor({}, element::i64, std::vector{2}), + SplitParams(reference_tests::Tensor({2, 1, 6}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}), + reference_tests::Tensor({}, element::i64, std::vector{2}), 2, - std::vector{Tensor({2, 1, 3}, IN_ET, std::vector{0, 1, 2, 6, 7, 8}), - Tensor({2, 1, 3}, IN_ET, std::vector{3, 4, 5, 9, 10, 11})}, + std::vector{reference_tests::Tensor({2, 1, 3}, IN_ET, std::vector{0, 1, 2, 6, 7, 8}), + reference_tests::Tensor({2, 1, 3}, IN_ET, std::vector{3, 4, 5, 9, 10, 11})}, "split_3d_axis_2"), // split_4d_axis_0 - SplitParams(Tensor({3, 2, 3, 1}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}), - Tensor({}, element::i64, std::vector{0}), + SplitParams(reference_tests::Tensor({3, 2, 3, 1}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}), + reference_tests::Tensor({}, element::i64, std::vector{0}), 3, - std::vector{Tensor({1, 2, 3, 1}, IN_ET, std::vector{0, 1, 2, 3, 4, 5}), - Tensor({1, 2, 3, 1}, IN_ET, std::vector{6, 7, 8, 9, 10, 11}), - Tensor({1, 2, 3, 1}, IN_ET, std::vector{12, 13, 14, 15, 16, 17})}, + std::vector{reference_tests::Tensor({1, 2, 3, 1}, IN_ET, std::vector{0, 1, 2, 3, 4, 5}), + reference_tests::Tensor({1, 2, 3, 1}, IN_ET, std::vector{6, 7, 8, 9, 10, 11}), + reference_tests::Tensor({1, 2, 3, 1}, IN_ET, std::vector{12, 13, 14, 15, 16, 17})}, "split_4d_axis_0"), // split_4d_axis_1 - SplitParams(Tensor({2, 8, 2, 2}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + SplitParams(reference_tests::Tensor({2, 8, 2, 2}, IN_ET, 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, 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, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}), - Tensor({}, element::i64, std::vector{1}), + reference_tests::Tensor({}, element::i64, std::vector{1}), 4, - std::vector{ - Tensor({2, 2, 2, 2}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 32, 33, 34, 35, 36, 37, 38, 39}), - Tensor({2, 2, 2, 2}, IN_ET, std::vector{8, 9, 10, 11, 12, 13, 14, 15, 40, 41, 42, 43, 44, 45, 46, 47}), - Tensor({2, 2, 2, 2}, IN_ET, std::vector{16, 17, 18, 19, 20, 21, 22, 23, 48, 49, 50, 51, 52, 53, 54, 55}), - Tensor({2, 2, 2, 2}, IN_ET, std::vector{24, 25, 26, 27, 28, 29, 30, 31, 56, 57, 58, 59, 60, 61, 62, 63})}, + std::vector{ + reference_tests::Tensor({2, 2, 2, 2}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 32, 33, 34, 35, 36, 37, 38, 39}), + reference_tests::Tensor({2, 2, 2, 2}, IN_ET, std::vector{8, 9, 10, 11, 12, 13, 14, 15, 40, 41, 42, 43, 44, 45, 46, 47}), + reference_tests::Tensor({2, 2, 2, 2}, IN_ET, std::vector{16, 17, 18, 19, 20, 21, 22, 23, 48, 49, 50, 51, 52, 53, 54, 55}), + reference_tests::Tensor({2, 2, 2, 2}, IN_ET, std::vector{24, 25, 26, 27, 28, 29, 30, 31, 56, 57, 58, 59, 60, 61, 62, 63})}, "split_4d_axis_1"), // split_4d_axis_2 - SplitParams(Tensor({2, 1, 6, 2}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + SplitParams(reference_tests::Tensor({2, 1, 6, 2}, IN_ET, 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}), - Tensor({}, element::i64, std::vector{2}), + reference_tests::Tensor({}, element::i64, std::vector{2}), 3, - std::vector{Tensor({2, 1, 2, 2}, IN_ET, std::vector{0, 1, 2, 3, 12, 13, 14, 15}), - Tensor({2, 1, 2, 2}, IN_ET, std::vector{4, 5, 6, 7, 16, 17, 18, 19}), - Tensor({2, 1, 2, 2}, IN_ET, std::vector{8, 9, 10, 11, 20, 21, 22, 23})}, + std::vector{reference_tests::Tensor({2, 1, 2, 2}, IN_ET, std::vector{0, 1, 2, 3, 12, 13, 14, 15}), + reference_tests::Tensor({2, 1, 2, 2}, IN_ET, std::vector{4, 5, 6, 7, 16, 17, 18, 19}), + reference_tests::Tensor({2, 1, 2, 2}, IN_ET, std::vector{8, 9, 10, 11, 20, 21, 22, 23})}, "split_4d_axis_2"), // split_4d_axis_3 - SplitParams(Tensor({2, 1, 2, 6}, IN_ET, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + SplitParams(reference_tests::Tensor({2, 1, 2, 6}, IN_ET, 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}), - Tensor({}, element::i64, std::vector{3}), + reference_tests::Tensor({}, element::i64, std::vector{3}), 3, - std::vector{Tensor({2, 1, 2, 2}, IN_ET, std::vector{0, 1, 6, 7, 12, 13, 18, 19}), - Tensor({2, 1, 2, 2}, IN_ET, std::vector{2, 3, 8, 9, 14, 15, 20, 21}), - Tensor({2, 1, 2, 2}, IN_ET, std::vector{4, 5, 10, 11, 16, 17, 22, 23})}, + std::vector{reference_tests::Tensor({2, 1, 2, 2}, IN_ET, std::vector{0, 1, 6, 7, 12, 13, 18, 19}), + reference_tests::Tensor({2, 1, 2, 2}, IN_ET, std::vector{2, 3, 8, 9, 14, 15, 20, 21}), + reference_tests::Tensor({2, 1, 2, 2}, IN_ET, std::vector{4, 5, 10, 11, 16, 17, 22, 23})}, "split_4d_axis_3"), }; return splitParams; diff --git a/docs/template_plugin/tests/functional/op_reference/squared_difference.cpp b/docs/template_plugin/tests/functional/op_reference/squared_difference.cpp index 3e860f52152..c3d7ca5e772 100644 --- a/docs/template_plugin/tests/functional/op_reference/squared_difference.cpp +++ b/docs/template_plugin/tests/functional/op_reference/squared_difference.cpp @@ -31,9 +31,9 @@ struct SquaredDifferenceParams { PartialShape pshape2; element::Type inType; element::Type outType; - runtime::Tensor inputData1; - runtime::Tensor inputData2; - runtime::Tensor refData; + ov::Tensor inputData1; + ov::Tensor inputData2; + ov::Tensor refData; }; class ReferenceSquaredDifferenceLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/squeeze.cpp b/docs/template_plugin/tests/functional/op_reference/squeeze.cpp index df65bd050ab..cc26d761d42 100644 --- a/docs/template_plugin/tests/functional/op_reference/squeeze.cpp +++ b/docs/template_plugin/tests/functional/op_reference/squeeze.cpp @@ -54,11 +54,11 @@ struct SqueezeParams { Shape m_output_shape; element::Type m_input_type; element::Type m_output_type; - runtime::Tensor m_input_value; - runtime::Tensor m_expected_value; + ov::Tensor m_input_value; + ov::Tensor m_expected_value; Shape m_axes_shape; element::Type m_axes_type; - runtime::Tensor m_axes_value; + ov::Tensor m_axes_value; bool m_axes_node; }; diff --git a/docs/template_plugin/tests/functional/op_reference/strided_slice.cpp b/docs/template_plugin/tests/functional/op_reference/strided_slice.cpp index 1f98a9ab126..c241b7d3b6e 100644 --- a/docs/template_plugin/tests/functional/op_reference/strided_slice.cpp +++ b/docs/template_plugin/tests/functional/op_reference/strided_slice.cpp @@ -14,16 +14,16 @@ using namespace ov; namespace { struct StridedSliceParams { StridedSliceParams(const PartialShape& dynamicDataShape, - const Tensor& dataTensor, - const Tensor& beginTensor, - const Tensor& endTensor, - const Tensor& stridesTensor, + const reference_tests::Tensor& dataTensor, + const reference_tests::Tensor& beginTensor, + const reference_tests::Tensor& endTensor, + const reference_tests::Tensor& stridesTensor, const std::vector& beginMask, const std::vector& endMask, const std::vector& newAxisMask, const std::vector& shrinkAxisMask, const std::vector& ellipsisMask, - const Tensor& expectedTensor, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dynamicDataShape(dynamicDataShape), dataTensor(dataTensor), beginTensor(beginTensor), endTensor(endTensor), @@ -32,30 +32,30 @@ struct StridedSliceParams { expectedTensor(expectedTensor), testcaseName(testcaseName) {} PartialShape dynamicDataShape; - Tensor dataTensor; - Tensor beginTensor; - Tensor endTensor; - Tensor stridesTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor beginTensor; + reference_tests::Tensor endTensor; + reference_tests::Tensor stridesTensor; std::vector beginMask; std::vector endMask; std::vector newAxisMask; std::vector shrinkAxisMask; std::vector ellipsisMask; - Tensor expectedTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; struct StridedSliceStrideOptionalParams { StridedSliceStrideOptionalParams(const PartialShape& dynamicDataShape, - const Tensor& dataTensor, - const Tensor& beginTensor, - const Tensor& endTensor, + const reference_tests::Tensor& dataTensor, + const reference_tests::Tensor& beginTensor, + const reference_tests::Tensor& endTensor, const std::vector& beginMask, const std::vector& endMask, const std::vector& newAxisMask, const std::vector& shrinkAxisMask, const std::vector& ellipsisMask, - const Tensor& expectedTensor, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dynamicDataShape(dynamicDataShape), dataTensor(dataTensor), beginTensor(beginTensor), endTensor(endTensor), @@ -64,15 +64,15 @@ struct StridedSliceStrideOptionalParams { expectedTensor(expectedTensor), testcaseName(testcaseName) {} PartialShape dynamicDataShape; - Tensor dataTensor; - Tensor beginTensor; - Tensor endTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor beginTensor; + reference_tests::Tensor endTensor; std::vector beginMask; std::vector endMask; std::vector newAxisMask; std::vector shrinkAxisMask; std::vector ellipsisMask; - Tensor expectedTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -221,32 +221,32 @@ std::vector generateSmallParams() { // strided_slice_0 StridedSliceParams( {}, - Tensor(IN_ET, {2, 3, 4}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + reference_tests::Tensor(IN_ET, {2, 3, 4}, 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}), - Tensor(element::i64, {2}, std::vector{1, 0}), - Tensor(element::i64, {2}, std::vector{0, 0}), - Tensor(element::i64, {2}, std::vector{1, 1}), + reference_tests::Tensor(element::i64, {2}, std::vector{1, 0}), + reference_tests::Tensor(element::i64, {2}, std::vector{0, 0}), + reference_tests::Tensor(element::i64, {2}, std::vector{1, 1}), std::vector{0, 0, 0}, std::vector{0, 0, 0}, std::vector{0, 1, 0}, std::vector{1, 0, 0}, std::vector{0, 0, 0}, - Tensor(IN_ET, {1, 3, 4}, std::vector{12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}), + reference_tests::Tensor(IN_ET, {1, 3, 4}, std::vector{12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}), "strided_slice_0"), // strided_slice_0_dynamic StridedSliceParams( PartialShape::dynamic(), - Tensor(IN_ET, {2, 3, 4}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + reference_tests::Tensor(IN_ET, {2, 3, 4}, 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}), - Tensor(element::i64, {2}, std::vector{1, 0}), - Tensor(element::i64, {2}, std::vector{0, 0}), - Tensor(element::i64, {2}, std::vector{1, 1}), + reference_tests::Tensor(element::i64, {2}, std::vector{1, 0}), + reference_tests::Tensor(element::i64, {2}, std::vector{0, 0}), + reference_tests::Tensor(element::i64, {2}, std::vector{1, 1}), std::vector{0, 0, 0}, std::vector{0, 0, 0}, std::vector{0, 1, 0}, std::vector{1, 0, 0}, std::vector{0, 0, 0}, - Tensor(IN_ET, {1, 3, 4}, std::vector{12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}), + reference_tests::Tensor(IN_ET, {1, 3, 4}, std::vector{12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}), "strided_slice_0_dynamic"), }; return params; @@ -259,46 +259,46 @@ std::vector generateParams() { // strided_slice_0 StridedSliceParams( {}, - Tensor(IN_ET, {2, 3, 4}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + reference_tests::Tensor(IN_ET, {2, 3, 4}, 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}), - Tensor(element::i64, {2}, std::vector{1, 0}), - Tensor(element::i64, {2}, std::vector{0, 0}), - Tensor(element::i64, {2}, std::vector{1, 1}), + reference_tests::Tensor(element::i64, {2}, std::vector{1, 0}), + reference_tests::Tensor(element::i64, {2}, std::vector{0, 0}), + reference_tests::Tensor(element::i64, {2}, std::vector{1, 1}), std::vector{0, 0, 0}, std::vector{0, 0, 0}, std::vector{0, 1, 0}, std::vector{1, 0, 0}, std::vector{0, 0, 0}, - Tensor(IN_ET, {1, 3, 4}, std::vector{12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}), + reference_tests::Tensor(IN_ET, {1, 3, 4}, std::vector{12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}), "strided_slice_0"), // strided_slice_0_dynamic StridedSliceParams( PartialShape::dynamic(), - Tensor(IN_ET, {2, 3, 4}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + reference_tests::Tensor(IN_ET, {2, 3, 4}, 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}), - Tensor(element::i64, {2}, std::vector{1, 0}), - Tensor(element::i64, {2}, std::vector{0, 0}), - Tensor(element::i64, {2}, std::vector{1, 1}), + reference_tests::Tensor(element::i64, {2}, std::vector{1, 0}), + reference_tests::Tensor(element::i64, {2}, std::vector{0, 0}), + reference_tests::Tensor(element::i64, {2}, std::vector{1, 1}), std::vector{0, 0, 0}, std::vector{0, 0, 0}, std::vector{0, 1, 0}, std::vector{1, 0, 0}, std::vector{0, 0, 0}, - Tensor(IN_ET, {1, 3, 4}, std::vector{12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}), + reference_tests::Tensor(IN_ET, {1, 3, 4}, std::vector{12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}), "strided_slice_0_dynamic"), // strided_slice_1 StridedSliceParams( {}, - Tensor(IN_ET, {2, 4, 6, 8, 2, 2, 2}, generateInputValues({2, 4, 6, 8, 2, 2, 2}, 0)), - Tensor(element::i64, {7}, std::vector{0, 0, 2, 7, 0, 0, 1}), - Tensor(element::i64, {7}, std::vector{0, 4, 6, 3, 0, 0, 0}), - Tensor(element::i64, {7}, std::vector{1, 1, 2, -2, 1, 1, 1}), + reference_tests::Tensor(IN_ET, {2, 4, 6, 8, 2, 2, 2}, generateInputValues({2, 4, 6, 8, 2, 2, 2}, 0)), + reference_tests::Tensor(element::i64, {7}, std::vector{0, 0, 2, 7, 0, 0, 1}), + reference_tests::Tensor(element::i64, {7}, std::vector{0, 4, 6, 3, 0, 0, 0}), + reference_tests::Tensor(element::i64, {7}, std::vector{1, 1, 2, -2, 1, 1, 1}), std::vector{0, 1, 0, 0, 0, 0, 0}, std::vector{1, 0, 0, 0, 0, 0, 0}, std::vector{0, 0, 0, 0, 1, 0, 0}, std::vector{0, 0, 0, 0, 0, 0, 1}, std::vector{0, 0, 0, 0, 0, 1, 0}, - Tensor(IN_ET, {2, 4, 2, 2, 1, 2, 2}, std::vector{ + reference_tests::Tensor(IN_ET, {2, 4, 2, 2, 1, 2, 2}, std::vector{ 185, 187, 189, 191, 169, 171, 173, 175, 313, 315, 317, 319, 297, 299, 301, 303, 569, 571, 573, 575, 553, 555, 557, 559, 697, 699, 701, 703, 681, 683, 685, 687, 953, 955, 957, 959, 937, 939, 941, 943, 1081, 1083, 1085, 1087, 1065, @@ -312,16 +312,16 @@ std::vector generateParams() { // strided_slice_1_dynamic StridedSliceParams( PartialShape::dynamic(), - Tensor(IN_ET, {2, 4, 6, 8, 2, 2, 2}, generateInputValues({2, 4, 6, 8, 2, 2, 2}, 0)), - Tensor(element::i64, {7}, std::vector{0, 0, 2, 7, 0, 0, 1}), - Tensor(element::i64, {7}, std::vector{0, 4, 6, 3, 0, 0, 0}), - Tensor(element::i64, {7}, std::vector{1, 1, 2, -2, 1, 1, 1}), + reference_tests::Tensor(IN_ET, {2, 4, 6, 8, 2, 2, 2}, generateInputValues({2, 4, 6, 8, 2, 2, 2}, 0)), + reference_tests::Tensor(element::i64, {7}, std::vector{0, 0, 2, 7, 0, 0, 1}), + reference_tests::Tensor(element::i64, {7}, std::vector{0, 4, 6, 3, 0, 0, 0}), + reference_tests::Tensor(element::i64, {7}, std::vector{1, 1, 2, -2, 1, 1, 1}), std::vector{0, 1, 0, 0, 0, 0, 0}, std::vector{1, 0, 0, 0, 0, 0, 0}, std::vector{0, 0, 0, 0, 1, 0, 0}, std::vector{0, 0, 0, 0, 0, 0, 1}, std::vector{0, 0, 0, 0, 0, 1, 0}, - Tensor(IN_ET, {2, 4, 2, 2, 1, 2, 2}, std::vector{ + reference_tests::Tensor(IN_ET, {2, 4, 2, 2, 1, 2, 2}, std::vector{ 185, 187, 189, 191, 169, 171, 173, 175, 313, 315, 317, 319, 297, 299, 301, 303, 569, 571, 573, 575, 553, 555, 557, 559, 697, 699, 701, 703, 681, 683, 685, 687, 953, 955, 957, 959, 937, 939, 941, 943, 1081, 1083, 1085, 1087, 1065, @@ -343,30 +343,30 @@ std::vector generateStrideOptionalParams() { // strided_slice_stride_optional StridedSliceStrideOptionalParams( {}, - Tensor(IN_ET, {2, 3, 4}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + reference_tests::Tensor(IN_ET, {2, 3, 4}, 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}), - Tensor(element::i64, {3}, std::vector{-1, -1, 0}), - Tensor(element::i64, {3}, std::vector{0, 0, 0}), + reference_tests::Tensor(element::i64, {3}, std::vector{-1, -1, 0}), + reference_tests::Tensor(element::i64, {3}, std::vector{0, 0, 0}), std::vector{0, 0, 0}, std::vector{0, 0, 0}, std::vector{0, 0, 1}, std::vector{1, 1, 0}, std::vector{0, 0, 0}, - Tensor(IN_ET, {1, 4}, std::vector{20, 21, 22, 23}), + reference_tests::Tensor(IN_ET, {1, 4}, std::vector{20, 21, 22, 23}), "strided_slice_stride_optional"), // strided_slice_stride_optional_dynamic StridedSliceStrideOptionalParams( PartialShape::dynamic(), - Tensor(IN_ET, {2, 3, 4}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + reference_tests::Tensor(IN_ET, {2, 3, 4}, 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}), - Tensor(element::i64, {3}, std::vector{-1, -1, 0}), - Tensor(element::i64, {3}, std::vector{0, 0, 0}), + reference_tests::Tensor(element::i64, {3}, std::vector{-1, -1, 0}), + reference_tests::Tensor(element::i64, {3}, std::vector{0, 0, 0}), std::vector{0, 0, 0}, std::vector{0, 0, 0}, std::vector{0, 0, 1}, std::vector{1, 1, 0}, std::vector{0, 0, 0}, - Tensor(IN_ET, {1, 4}, std::vector{20, 21, 22, 23}), + reference_tests::Tensor(IN_ET, {1, 4}, std::vector{20, 21, 22, 23}), "strided_slice_stride_optional_dynamic"), }; return params; diff --git a/docs/template_plugin/tests/functional/op_reference/subtract.cpp b/docs/template_plugin/tests/functional/op_reference/subtract.cpp index 5b2e0a7ca38..97749588684 100644 --- a/docs/template_plugin/tests/functional/op_reference/subtract.cpp +++ b/docs/template_plugin/tests/functional/op_reference/subtract.cpp @@ -31,9 +31,9 @@ struct SubtractParams { PartialShape pshape2; element::Type inType; element::Type outType; - runtime::Tensor inputData1; - runtime::Tensor inputData2; - runtime::Tensor refData; + ov::Tensor inputData1; + ov::Tensor inputData2; + ov::Tensor refData; }; class ReferenceSubtractLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/swish.cpp b/docs/template_plugin/tests/functional/op_reference/swish.cpp index a627f5c5369..73d48e66cff 100644 --- a/docs/template_plugin/tests/functional/op_reference/swish.cpp +++ b/docs/template_plugin/tests/functional/op_reference/swish.cpp @@ -42,9 +42,9 @@ struct SwishParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; - ov::runtime::Tensor betaBlob; + ov::Tensor inputData; + ov::Tensor refData; + ov::Tensor betaBlob; float beta; }; diff --git a/docs/template_plugin/tests/functional/op_reference/tan.cpp b/docs/template_plugin/tests/functional/op_reference/tan.cpp index 493bda31435..8e213b27d52 100644 --- a/docs/template_plugin/tests/functional/op_reference/tan.cpp +++ b/docs/template_plugin/tests/functional/op_reference/tan.cpp @@ -19,8 +19,8 @@ struct TanParams { ov::PartialShape pshape; ov::element::Type inType; ov::element::Type outType; - ov::runtime::Tensor inputData; - ov::runtime::Tensor refData; + ov::Tensor inputData; + ov::Tensor refData; }; class ReferenceTanLayerTest : public testing::TestWithParam, public CommonReferenceTest { diff --git a/docs/template_plugin/tests/functional/op_reference/tanh.cpp b/docs/template_plugin/tests/functional/op_reference/tanh.cpp index b889713bf5b..3fd15e2c1cb 100644 --- a/docs/template_plugin/tests/functional/op_reference/tanh.cpp +++ b/docs/template_plugin/tests/functional/op_reference/tanh.cpp @@ -13,8 +13,8 @@ namespace reference_tests { namespace { struct TanhParams { - Tensor input; - Tensor expected; + reference_tests::Tensor input; + reference_tests::Tensor expected; }; struct Builder : ParamsBuilder { diff --git a/docs/template_plugin/tests/functional/op_reference/tile.cpp b/docs/template_plugin/tests/functional/op_reference/tile.cpp index 713b61f6a61..e2ae8a8c4c7 100644 --- a/docs/template_plugin/tests/functional/op_reference/tile.cpp +++ b/docs/template_plugin/tests/functional/op_reference/tile.cpp @@ -13,13 +13,13 @@ using namespace ov; namespace { struct TileParams { TileParams( - const Tensor& A, const Tensor& repeats, - const Tensor& expected, const std::string& testcaseName = "") : + const reference_tests::Tensor& A, const reference_tests::Tensor& repeats, + const reference_tests::Tensor& expected, const std::string& testcaseName = "") : A(A), repeats(repeats), expected(expected), testcaseName(testcaseName) {} - Tensor A; - Tensor repeats; - Tensor expected; + reference_tests::Tensor A; + reference_tests::Tensor repeats; + reference_tests::Tensor expected; std::string testcaseName; }; @@ -70,20 +70,20 @@ std::vector generateParams() { using T_INT = typename element_type_traits::value_type; std::vector params { TileParams( - Tensor(ET, {}, std::vector{ + reference_tests::Tensor(ET, {}, std::vector{ 1 }), - Tensor(ET_INT, {1}, std::vector{2}), - Tensor(ET, {2}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{2}), + reference_tests::Tensor(ET, {2}, std::vector{ 1, 1 }), "tile_0d_to_1d_data_broadcast"), TileParams( - Tensor(ET, {6}, std::vector{ + reference_tests::Tensor(ET, {6}, std::vector{ 1, 2, 3, 4, 5, 6, }), - Tensor(ET_INT, {1}, std::vector{4}), - Tensor(ET, {24}, std::vector{ + reference_tests::Tensor(ET_INT, {1}, std::vector{4}), + reference_tests::Tensor(ET, {24}, std::vector{ 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, @@ -91,20 +91,20 @@ std::vector generateParams() { }), "tile_1d_to_1d_no_broadcast"), TileParams( - Tensor(ET, {3}, std::vector{ + reference_tests::Tensor(ET, {3}, std::vector{ 1, 2, 3 }), - Tensor(ET_INT, {3}, std::vector{2, 2, 1}), - Tensor(ET, {2, 2, 3}, std::vector{ + reference_tests::Tensor(ET_INT, {3}, std::vector{2, 2, 1}), + reference_tests::Tensor(ET, {2, 2, 3}, std::vector{ 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3 }), "tile_1d_to_3d_data_broadcast"), TileParams( - Tensor(ET, {2, 1, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 1, 3}, std::vector{ 1, 2, 3, 4, 5, 6 }), - Tensor(ET_INT, {2}, std::vector{2, 1}), - Tensor(ET, {2, 2, 3}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{2, 1}), + reference_tests::Tensor(ET, {2, 2, 3}, std::vector{ 1, 2, 3, 1, 2, 3, 4, 5, 6, 4, 5, 6 }), "tile_3d_to_3d_repeats_broadcast"), @@ -118,11 +118,11 @@ std::vector generateParamsFloatValue() { using T_INT = typename element_type_traits::value_type; std::vector params { TileParams( - Tensor(ET, {2, 1, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 1, 3}, std::vector{ 1.1f, 2.2f, 3.3f, 4.4f, 5.5f, 6.6f }), - Tensor(ET_INT, {2}, std::vector{2, 1}), - Tensor(ET, {2, 2, 3}, std::vector{ + reference_tests::Tensor(ET_INT, {2}, std::vector{2, 1}), + reference_tests::Tensor(ET, {2, 2, 3}, std::vector{ 1.1f, 2.2f, 3.3f, 1.1f, 2.2f, 3.3f, 4.4f, 5.5f, 6.6f, 4.4f, 5.5f, 6.6f }), "tile_3d_to_3d_repeats_broadcast_float_val"), diff --git a/docs/template_plugin/tests/functional/op_reference/topk.cpp b/docs/template_plugin/tests/functional/op_reference/topk.cpp index 21db746ce58..6f91380538d 100644 --- a/docs/template_plugin/tests/functional/op_reference/topk.cpp +++ b/docs/template_plugin/tests/functional/op_reference/topk.cpp @@ -14,21 +14,21 @@ using namespace ov; namespace { struct TopKParams { TopKParams( - const Tensor& A, const Tensor& k, const int64_t axis, + const reference_tests::Tensor& A, const reference_tests::Tensor& k, const int64_t axis, const opset1::TopK::Mode mode, const opset1::TopK::SortType sort, - const Tensor& result0, const Tensor& result1, const size_t outIdx, + const reference_tests::Tensor& result0, const reference_tests::Tensor& result1, const size_t outIdx, const std::string& testcaseName = "") : A(A), k(k), axis(axis), mode(mode), sort(sort), result0(result0), result1(result1), outIdx(outIdx), testcaseName(testcaseName) {} - Tensor A; - Tensor k; + reference_tests::Tensor A; + reference_tests::Tensor k; int64_t axis; opset1::TopK::Mode mode; opset1::TopK::SortType sort; - Tensor result0; - Tensor result1; + reference_tests::Tensor result0; + reference_tests::Tensor result1; size_t outIdx; std::string testcaseName; }; @@ -54,20 +54,20 @@ public: struct TopKParamsResnet50 { TopKParamsResnet50( - const Tensor& A, - const Tensor& result5Value, const Tensor& result5Index, - const Tensor& result1Value, const Tensor& result1Index, + const reference_tests::Tensor& A, + const reference_tests::Tensor& result5Value, const reference_tests::Tensor& result5Index, + const reference_tests::Tensor& result1Value, const reference_tests::Tensor& result1Index, const std::string& testcaseName = "") : A(A), result5Value(result5Value), result5Index(result5Index), result1Value(result1Value), result1Index(result1Index), testcaseName(testcaseName) {} - Tensor A; - Tensor result5Value; - Tensor result5Index; - Tensor result1Value; - Tensor result1Index; + reference_tests::Tensor A; + reference_tests::Tensor result5Value; + reference_tests::Tensor result5Index; + reference_tests::Tensor result1Value; + reference_tests::Tensor result1Index; std::string testcaseName; }; @@ -132,7 +132,7 @@ std::vector generateParamsResnet50() { using T_OUT = typename element_type_traits::value_type; std::vector params { TopKParamsResnet50( - Tensor(ET, {128, 1000}, [](std::vector shape) -> std::vector { + reference_tests::Tensor(ET, {128, 1000}, [](std::vector shape) -> std::vector { std::vector data; for (size_t i = 0; i < shape[0]; i++) { for (size_t j = 0; j < shape[1]; j++) { @@ -141,7 +141,7 @@ std::vector generateParamsResnet50() { } return data; }({128, 1000})), - Tensor(ET, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector{ + reference_tests::Tensor(ET, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector{ std::vector expected_value; for (size_t i = 0; i < rshape[0]; i++) { for (size_t j = 0; j < rshape[1]; j++) { @@ -150,7 +150,7 @@ std::vector generateParamsResnet50() { } return expected_value; }({128, 5}, {128, 1000})), - Tensor(ET_OUT, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector{ + reference_tests::Tensor(ET_OUT, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector{ std::vector expected_index; for (size_t i = 0; i < rshape[0]; i++) { for (size_t j = 0; j < rshape[1]; j++) { @@ -159,7 +159,7 @@ std::vector generateParamsResnet50() { } return expected_index; }({128, 5}, {128, 1000})), - Tensor(ET, {128, 1}, [](std::vector rshape, std::vector shape) -> std::vector{ + reference_tests::Tensor(ET, {128, 1}, [](std::vector rshape, std::vector shape) -> std::vector{ std::vector expected_value; for (size_t i = 0; i < rshape[0]; i++) { for (size_t j = 0; j < rshape[1]; j++) { @@ -168,7 +168,7 @@ std::vector generateParamsResnet50() { } return expected_value; }({128, 1}, {128, 1000})), - Tensor(ET_OUT, {128, 1}, [](std::vector rshape, std::vector shape) -> std::vector{ + reference_tests::Tensor(ET_OUT, {128, 1}, [](std::vector rshape, std::vector shape) -> std::vector{ std::vector expected_index; for (size_t i = 0; i < rshape[0]; i++) { for (size_t j = 0; j < rshape[1]; j++) { @@ -241,7 +241,7 @@ std::vector generateParamsMaxMinSort() { using T_OUT = typename element_type_traits::value_type; std::vector params { TopKParams( - Tensor(ET, {128, 1000}, [](std::vector shape) -> std::vector { + reference_tests::Tensor(ET, {128, 1000}, [](std::vector shape) -> std::vector { std::vector data; for (size_t i = 0; i < shape[0]; i++) { for (size_t j = 0; j < shape[1]; j++) { @@ -250,11 +250,11 @@ std::vector generateParamsMaxMinSort() { } return data; }({128, 1000})), - Tensor(ET2, {}, std::vector{5}), + reference_tests::Tensor(ET2, {}, std::vector{5}), 1, opset1::TopK::Mode::MAX, opset1::TopK::SortType::NONE, - Tensor(ET, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector{ + reference_tests::Tensor(ET, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector{ std::vector expected_value; for (size_t i = 0; i < rshape[0]; i++) { expected_value.push_back(shape[1] - 3); @@ -265,7 +265,7 @@ std::vector generateParamsMaxMinSort() { } return expected_value; }({128, 5}, {128, 1000})), - Tensor(ET_OUT, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector{ + reference_tests::Tensor(ET_OUT, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector{ std::vector expected_index; for (size_t i = 0; i < rshape[0]; i++) { expected_index.push_back(shape[1] - 3); @@ -280,7 +280,7 @@ std::vector generateParamsMaxMinSort() { "topk_max_sort_none"), TopKParams( - Tensor(ET, {128, 1000}, [](std::vector shape) -> std::vector { + reference_tests::Tensor(ET, {128, 1000}, [](std::vector shape) -> std::vector { std::vector data; for (size_t i = 0; i < shape[0]; i++) { for (size_t j = 0; j < shape[1]; j++) { @@ -289,11 +289,11 @@ std::vector generateParamsMaxMinSort() { } return data; }({128, 1000})), - Tensor(ET2, {}, std::vector{5}), + reference_tests::Tensor(ET2, {}, std::vector{5}), 1, opset1::TopK::Mode::MIN, opset1::TopK::SortType::NONE, - Tensor(ET, {128, 5}, [](std::vector rshape) -> std::vector{ + reference_tests::Tensor(ET, {128, 5}, [](std::vector rshape) -> std::vector{ std::vector expected_value; for (size_t i = 0; i < rshape[0]; i++) { expected_value.push_back(1); @@ -304,7 +304,7 @@ std::vector generateParamsMaxMinSort() { } return expected_value; }({128, 5})), - Tensor(ET_OUT, {128, 5}, [](std::vector rshape) -> std::vector{ + reference_tests::Tensor(ET_OUT, {128, 5}, [](std::vector rshape) -> std::vector{ std::vector expected_index; for (size_t i = 0; i < rshape[0]; i++) { expected_index.push_back(1); @@ -319,7 +319,7 @@ std::vector generateParamsMaxMinSort() { "topk_min_sort_none"), TopKParams( - Tensor(ET, {128, 1000}, [](std::vector shape) -> std::vector { + reference_tests::Tensor(ET, {128, 1000}, [](std::vector shape) -> std::vector { std::vector data; for (size_t i = 0; i < shape[0]; i++) { for (size_t j = 0; j < shape[1]; j++) { @@ -328,11 +328,11 @@ std::vector generateParamsMaxMinSort() { } return data; }({128, 1000})), - Tensor(ET2, {}, std::vector{5}), + reference_tests::Tensor(ET2, {}, std::vector{5}), 1, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector{ + reference_tests::Tensor(ET, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector{ std::vector expected_value; for (size_t i = 0; i < rshape[0]; i++) { for (size_t j = 0; j < rshape[1]; j++) { @@ -341,7 +341,7 @@ std::vector generateParamsMaxMinSort() { } return expected_value; }({128, 5}, {128, 1000})), - Tensor(ET_OUT, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector{ + reference_tests::Tensor(ET_OUT, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector{ std::vector expected_index; for (size_t i = 0; i < rshape[0]; i++) { for (size_t j = 0; j < rshape[1]; j++) { @@ -354,7 +354,7 @@ std::vector generateParamsMaxMinSort() { "topk_max_sort_value"), TopKParams( - Tensor(ET, {128, 1000}, [](std::vector shape) -> std::vector { + reference_tests::Tensor(ET, {128, 1000}, [](std::vector shape) -> std::vector { std::vector data; for (size_t i = 0; i < shape[0]; i++) { for (size_t j = 0; j < shape[1]; j++) { @@ -363,11 +363,11 @@ std::vector generateParamsMaxMinSort() { } return data; }({128, 1000})), - Tensor(ET2, {}, std::vector{5}), + reference_tests::Tensor(ET2, {}, std::vector{5}), 1, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {128, 5}, [](std::vector rshape) -> std::vector{ + reference_tests::Tensor(ET, {128, 5}, [](std::vector rshape) -> std::vector{ std::vector expected_value; for (size_t i = 0; i < rshape[0]; i++) { for (size_t j = 0; j < rshape[1]; j++) { @@ -376,7 +376,7 @@ std::vector generateParamsMaxMinSort() { } return expected_value; }({128, 5})), - Tensor(ET_OUT, {128, 5}, [](std::vector rshape) -> std::vector{ + reference_tests::Tensor(ET_OUT, {128, 5}, [](std::vector rshape) -> std::vector{ std::vector expected_index; for (size_t i = 0; i < rshape[0]; i++) { for (size_t j = 0; j < rshape[1]; j++) { @@ -389,7 +389,7 @@ std::vector generateParamsMaxMinSort() { "topk_min_sort_value"), TopKParams( - Tensor(ET, {128, 1000}, [](std::vector shape) -> std::vector { + reference_tests::Tensor(ET, {128, 1000}, [](std::vector shape) -> std::vector { std::vector data; for (size_t i = 0; i < shape[0]; i++) { for (size_t j = 0; j < shape[1]; j++) { @@ -398,11 +398,11 @@ std::vector generateParamsMaxMinSort() { } return data; }({128, 1000})), - Tensor(ET2, {}, std::vector{5}), + reference_tests::Tensor(ET2, {}, std::vector{5}), 1, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_INDICES, - Tensor(ET, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector{ + reference_tests::Tensor(ET, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector{ std::vector expected_value; for (size_t i = 0; i < rshape[0]; i++) { expected_value.push_back(shape[1] - 5); @@ -413,7 +413,7 @@ std::vector generateParamsMaxMinSort() { } return expected_value; }({128, 5}, {128, 1000})), - Tensor(ET_OUT, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector{ + reference_tests::Tensor(ET_OUT, {128, 5}, [](std::vector rshape, std::vector shape) -> std::vector{ std::vector expected_index; for (size_t i = 0; i < rshape[0]; i++) { expected_index.push_back(shape[1] - 5); @@ -428,7 +428,7 @@ std::vector generateParamsMaxMinSort() { "topk_max_sort_index"), TopKParams( - Tensor(ET, {128, 1000}, [](std::vector shape) -> std::vector { + reference_tests::Tensor(ET, {128, 1000}, [](std::vector shape) -> std::vector { std::vector data; for (size_t i = 0; i < shape[0]; i++) { for (size_t j = 0; j < shape[1]; j++) { @@ -437,11 +437,11 @@ std::vector generateParamsMaxMinSort() { } return data; }({128, 1000})), - Tensor(ET2, {}, std::vector{5}), + reference_tests::Tensor(ET2, {}, std::vector{5}), 1, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_INDICES, - Tensor(ET, {128, 5}, [](std::vector rshape) -> std::vector{ + reference_tests::Tensor(ET, {128, 5}, [](std::vector rshape) -> std::vector{ std::vector expected_value; for (size_t i = 0; i < rshape[0]; i++) { for (size_t j = 0; j < rshape[1]; j++) { @@ -450,7 +450,7 @@ std::vector generateParamsMaxMinSort() { } return expected_value; }({128, 5})), - Tensor(ET_OUT, {128, 5}, [](std::vector rshape) -> std::vector{ + reference_tests::Tensor(ET_OUT, {128, 5}, [](std::vector rshape) -> std::vector{ std::vector expected_index; for (size_t i = 0; i < rshape[0]; i++) { for (size_t j = 0; j < rshape[1]; j++) { @@ -463,46 +463,46 @@ std::vector generateParamsMaxMinSort() { "topk_min_sort_index"), TopKParams( - Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 0, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {3}, std::vector{5, 4, 3}), - Tensor(ET_OUT, {3}, std::vector{3, 4, 0}), + reference_tests::Tensor(ET, {3}, std::vector{5, 4, 3}), + reference_tests::Tensor(ET_OUT, {3}, std::vector{3, 4, 0}), 0, "topk_mode_sort_order"), TopKParams( - Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 0, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_INDICES, - Tensor(ET, {3}, std::vector{3, 5, 4}), - Tensor(ET_OUT, {3}, std::vector{0, 3, 4}), + reference_tests::Tensor(ET, {3}, std::vector{3, 5, 4}), + reference_tests::Tensor(ET_OUT, {3}, std::vector{0, 3, 4}), 0, "topk_mode_sort_order_1"), TopKParams( - Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 0, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {3}, std::vector{1, 2, 3}), - Tensor(ET_OUT, {3}, std::vector{1, 2, 0}), + reference_tests::Tensor(ET, {3}, std::vector{1, 2, 3}), + reference_tests::Tensor(ET_OUT, {3}, std::vector{1, 2, 0}), 0, "topk_mode_sort_order_2"), TopKParams( - Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 0, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_INDICES, - Tensor(ET, {3}, std::vector{3, 1, 2}), - Tensor(ET_OUT, {3}, std::vector{0, 1, 2}), + reference_tests::Tensor(ET, {3}, std::vector{3, 1, 2}), + reference_tests::Tensor(ET_OUT, {3}, std::vector{0, 1, 2}), 0, "topk_mode_sort_order_3"), }; @@ -568,46 +568,46 @@ std::vector generateParamsV3() { using T_OUT = typename element_type_traits::value_type; std::vector params { TopKParams( - Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 0, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {3}, std::vector{5, 4, 3}), - Tensor(ET_OUT, {3}, std::vector{3, 4, 0}), + reference_tests::Tensor(ET, {3}, std::vector{5, 4, 3}), + reference_tests::Tensor(ET_OUT, {3}, std::vector{3, 4, 0}), 0, "topk_mode_sort_order"), TopKParams( - Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 0, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_INDICES, - Tensor(ET, {3}, std::vector{3, 5, 4}), - Tensor(ET_OUT, {3}, std::vector{0, 3, 4}), + reference_tests::Tensor(ET, {3}, std::vector{3, 5, 4}), + reference_tests::Tensor(ET_OUT, {3}, std::vector{0, 3, 4}), 0, "topk_mode_sort_order_1"), TopKParams( - Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 0, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {3}, std::vector{1, 2, 3}), - Tensor(ET_OUT, {3}, std::vector{1, 2, 0}), + reference_tests::Tensor(ET, {3}, std::vector{1, 2, 3}), + reference_tests::Tensor(ET_OUT, {3}, std::vector{1, 2, 0}), 0, "topk_mode_sort_order_2"), TopKParams( - Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET, {5}, std::vector{3, 1, 2, 5, 4}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 0, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_INDICES, - Tensor(ET, {3}, std::vector{3, 1, 2}), - Tensor(ET_OUT, {3}, std::vector{0, 1, 2}), + reference_tests::Tensor(ET, {3}, std::vector{3, 1, 2}), + reference_tests::Tensor(ET_OUT, {3}, std::vector{0, 1, 2}), 0, "topk_mode_sort_order_3"), }; @@ -694,173 +694,173 @@ std::vector generateParams1dMaxMin() { using T_OUT = typename element_type_traits::value_type; std::vector params { TopKParams( - Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ET2, {}, std::vector{6}), + reference_tests::Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ET2, {}, std::vector{6}), 0, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), - Tensor(ET_OUT, {6}, std::vector{5, 4, 3, 2, 1, 0}), + reference_tests::Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), + reference_tests::Tensor(ET_OUT, {6}, std::vector{5, 4, 3, 2, 1, 0}), 0, "topk_1d_max_all"), TopKParams( - Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ET2, {}, std::vector{6}), + reference_tests::Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ET2, {}, std::vector{6}), 0, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), - Tensor(ET_OUT, {6}, std::vector{5, 4, 3, 2, 1, 0}), + reference_tests::Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), + reference_tests::Tensor(ET_OUT, {6}, std::vector{5, 4, 3, 2, 1, 0}), 1, "topk_1d_max_all"), TopKParams( - Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 0, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {3}, std::vector{6, 5, 4}), - Tensor(ET_OUT, {3}, std::vector{5, 4, 3}), + reference_tests::Tensor(ET, {3}, std::vector{6, 5, 4}), + reference_tests::Tensor(ET_OUT, {3}, std::vector{5, 4, 3}), 0, "topk_1d_max_partial"), TopKParams( - Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 0, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {3}, std::vector{6, 5, 4}), - Tensor(ET_OUT, {3}, std::vector{5, 4, 3}), + reference_tests::Tensor(ET, {3}, std::vector{6, 5, 4}), + reference_tests::Tensor(ET_OUT, {3}, std::vector{5, 4, 3}), 1, "topk_1d_max_partial"), TopKParams( - Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ET2, {}, std::vector{1}), 0, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {1}, std::vector{6}), - Tensor(ET_OUT, {1}, std::vector{5}), + reference_tests::Tensor(ET, {1}, std::vector{6}), + reference_tests::Tensor(ET_OUT, {1}, std::vector{5}), 0, "topk_1d_max_one"), TopKParams( - Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ET2, {}, std::vector{1}), 0, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {1}, std::vector{6}), - Tensor(ET_OUT, {1}, std::vector{5}), + reference_tests::Tensor(ET, {1}, std::vector{6}), + reference_tests::Tensor(ET_OUT, {1}, std::vector{5}), 1, "topk_1d_max_one"), TopKParams( - Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), - Tensor(ET2, {}, std::vector{6}), + reference_tests::Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), + reference_tests::Tensor(ET2, {}, std::vector{6}), 0, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ET_OUT, {6}, std::vector{5, 4, 3, 2, 1, 0}), + reference_tests::Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ET_OUT, {6}, std::vector{5, 4, 3, 2, 1, 0}), 0, "topk_1d_min_all"), TopKParams( - Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), - Tensor(ET2, {}, std::vector{6}), + reference_tests::Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), + reference_tests::Tensor(ET2, {}, std::vector{6}), 0, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), - Tensor(ET_OUT, {6}, std::vector{5, 4, 3, 2, 1, 0}), + reference_tests::Tensor(ET, {6}, std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(ET_OUT, {6}, std::vector{5, 4, 3, 2, 1, 0}), 1, "topk_1d_min_all"), TopKParams( - Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 0, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {3}, std::vector{1, 2, 3}), - Tensor(ET_OUT, {3}, std::vector{5, 4, 3}), + reference_tests::Tensor(ET, {3}, std::vector{1, 2, 3}), + reference_tests::Tensor(ET_OUT, {3}, std::vector{5, 4, 3}), 0, "topk_1d_min_partial"), TopKParams( - Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 0, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {3}, std::vector{1, 2, 3}), - Tensor(ET_OUT, {3}, std::vector{5, 4, 3}), + reference_tests::Tensor(ET, {3}, std::vector{1, 2, 3}), + reference_tests::Tensor(ET_OUT, {3}, std::vector{5, 4, 3}), 1, "topk_1d_min_partial"), TopKParams( - Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), - Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), + reference_tests::Tensor(ET2, {}, std::vector{1}), 0, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {1}, std::vector{1}), - Tensor(ET_OUT, {1}, std::vector{5}), + reference_tests::Tensor(ET, {1}, std::vector{1}), + reference_tests::Tensor(ET_OUT, {1}, std::vector{5}), 0, "topk_1d_min_one"), TopKParams( - Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), - Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET, {6}, std::vector{6, 5, 4, 3, 2, 1}), + reference_tests::Tensor(ET2, {}, std::vector{1}), 0, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {1}, std::vector{1}), - Tensor(ET_OUT, {1}, std::vector{5}), + reference_tests::Tensor(ET, {1}, std::vector{1}), + reference_tests::Tensor(ET_OUT, {1}, std::vector{5}), 1, "topk_1d_min_one"), TopKParams( - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 1, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 10, 12, 9, 4, 8, 2, 11, 7, 6, 3, 5, 1 }), - Tensor(ET_OUT, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 3, 2}, std::vector{ 1, 1, 0, 2, 2, 0, 2, 2, 0, 1, 1, 0 }), 0, "topk_3d_max_all"), TopKParams( - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 1, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 10, 12, 9, 4, 8, 2, 11, 7, 6, 3, 5, 1 }), - Tensor(ET_OUT, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 3, 2}, std::vector{ 1, 1, 0, 2, 2, 0, 2, 2, 0, 1, 1, 0 }), 1, "topk_3d_max_all"), TopKParams( - Tensor(ET, {2, 6, 3, 2, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 6, 3, 2, 4}, std::vector{ 1, 73, 9, 81, 17, 89, 2, 74, 10, 82, 18, 90, 3, 75, 11, 83, 19, 91, 4, 76, 12, 84, 20, 92, 145, 217, 153, 225, 161, 233, 146, 218, 154, 226, 162, 234, 147, 219, 155, 227, 163, 235, 148, 220, 156, 228, 164, 236, 5, 77, 13, @@ -879,11 +879,11 @@ std::vector generateParams1dMaxMin() { 135, 71, 143, 56, 128, 64, 136, 72, 144, 197, 269, 205, 277, 213, 285, 198, 270, 206, 278, 214, 286, 199, 271, 207, 279, 215, 287, 200, 272, 208, 280, 216, 288 }), - Tensor(ET2, {}, std::vector{2}), + reference_tests::Tensor(ET2, {}, std::vector{2}), 1, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 2, 3, 2, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 2, 3, 2, 4}, std::vector{ 169, 241, 177, 249, 185, 233, 170, 242, 178, 250, 186, 258, 171, 243, 179, 251, 187, 259, 172, 224, 180, 252, 188, 260, 149, 221, 157, 229, 165, 113, 150, 222, 158, 230, 166, 234, 151, 223, 159, 231, 163, 235, 148, 220, 160, 232, 168, 240, @@ -891,7 +891,7 @@ std::vector generateParams1dMaxMin() { 215, 287, 200, 272, 241, 280, 216, 288, 193, 265, 201, 273, 209, 281, 194, 266, 202, 274, 210, 262, 175, 127, 183, 255, 191, 263, 176, 248, 208, 256, 212, 284 }), - Tensor(ET_OUT, {2, 2, 3, 2, 4}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 2, 3, 2, 4}, std::vector{ 5, 5, 5, 5, 5, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 5, 5, 5, 5, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 5, 5, 5, @@ -901,7 +901,7 @@ std::vector generateParams1dMaxMin() { "topk_5d_max_partial"), TopKParams( - Tensor(ET, {2, 6, 3, 2, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 6, 3, 2, 4}, std::vector{ 1, 73, 9, 81, 17, 89, 2, 74, 10, 82, 18, 90, 3, 75, 11, 83, 19, 91, 4, 76, 12, 84, 20, 92, 145, 217, 153, 225, 161, 233, 146, 218, 154, 226, 162, 234, 147, 219, 155, 227, 163, 235, 148, 220, 156, 228, 164, 236, 5, 77, 13, @@ -920,11 +920,11 @@ std::vector generateParams1dMaxMin() { 135, 71, 143, 56, 128, 64, 136, 72, 144, 197, 269, 205, 277, 213, 285, 198, 270, 206, 278, 214, 286, 199, 271, 207, 279, 215, 287, 200, 272, 208, 280, 216, 288 }), - Tensor(ET2, {}, std::vector{2}), + reference_tests::Tensor(ET2, {}, std::vector{2}), 1, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 2, 3, 2, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 2, 3, 2, 4}, std::vector{ 169, 241, 177, 249, 185, 233, 170, 242, 178, 250, 186, 258, 171, 243, 179, 251, 187, 259, 172, 224, 180, 252, 188, 260, 149, 221, 157, 229, 165, 113, 150, 222, 158, 230, 166, 234, 151, 223, 159, 231, 163, 235, 148, 220, 160, 232, 168, 240, @@ -932,7 +932,7 @@ std::vector generateParams1dMaxMin() { 215, 287, 200, 272, 241, 280, 216, 288, 193, 265, 201, 273, 209, 281, 194, 266, 202, 274, 210, 262, 175, 127, 183, 255, 191, 263, 176, 248, 208, 256, 212, 284 }), - Tensor(ET_OUT, {2, 2, 3, 2, 4}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 2, 3, 2, 4}, std::vector{ 5, 5, 5, 5, 5, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 5, 5, 5, 5, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 5, 5, 5, @@ -942,408 +942,408 @@ std::vector generateParams1dMaxMin() { "topk_5d_max_partial"), TopKParams( - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{2}), + reference_tests::Tensor(ET2, {}, std::vector{2}), 1, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{ 10, 12, 9, 4, 11, 7, 6, 3 }), - Tensor(ET_OUT, {2, 2, 2}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 2, 2}, std::vector{ 1, 1, 0, 2, 2, 2, 0, 1 }), 0, "topk_3d_max_partial"), TopKParams( - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{2}), + reference_tests::Tensor(ET2, {}, std::vector{2}), 1, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{ 10, 12, 9, 4, 11, 7, 6, 3 }), - Tensor(ET_OUT, {2, 2, 2}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 2, 2}, std::vector{ 1, 1, 0, 2, 2, 2, 0, 1 }), 1, "topk_3d_max_partial"), TopKParams( - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{1}), 1, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 1, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 1, 2}, std::vector{ 10, 12, 11, 7 }), - Tensor(ET_OUT, {2, 1, 2}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 1, 2}, std::vector{ 1, 1, 2, 2 }), 0, "topk_3d_max_one"), TopKParams( - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{1}), 1, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 1, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 1, 2}, std::vector{ 10, 12, 11, 7 }), - Tensor(ET_OUT, {2, 1, 2}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 1, 2}, std::vector{ 1, 1, 2, 2 }), 1, "topk_3d_max_one"), TopKParams( - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 1, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 8, 2, 10, 4, 12, 9, 5, 1, 6, 3, 11, 7 }), - Tensor(ET_OUT, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 3, 2}, std::vector{ 2, 0, 1, 2, 0, 1, 1, 0, 0, 1, 2, 2 }), 0, "topk_3d_min_all"), TopKParams( - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 1, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 8, 2, 10, 4, 12, 9, 5, 1, 6, 3, 11, 7 }), - Tensor(ET_OUT, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 3, 2}, std::vector{ 2, 0, 1, 2, 0, 1, 1, 0, 0, 1, 2, 2 }), 1, "topk_3d_min_all"), TopKParams( - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{2}), + reference_tests::Tensor(ET2, {}, std::vector{2}), 1, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{ 8, 2, 10, 4, 5, 1, 6, 3 }), - Tensor(ET_OUT, {2, 2, 2}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 2, 2}, std::vector{ 2, 0, 1, 2, 1, 0, 0, 1 }), 0, "topk_3d_min_partial"), TopKParams( - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{2}), + reference_tests::Tensor(ET2, {}, std::vector{2}), 1, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 2, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{ 8, 2, 10, 4, 5, 1, 6, 3 }), - Tensor(ET_OUT, {2, 2, 2}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 2, 2}, std::vector{ 2, 0, 1, 2, 1, 0, 0, 1 }), 1, "topk_3d_min_partial"), TopKParams( - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{1}), 1, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 1, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 1, 2}, std::vector{ 8, 2, 5, 1 }), - Tensor(ET_OUT, {2, 1, 2}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 1, 2}, std::vector{ 2, 0, 1, 0 }), 0, "topk_3d_min_one"), TopKParams( - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{1}), 1, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 1, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 1, 2}, std::vector{ 8, 2, 5, 1 }), - Tensor(ET_OUT, {2, 1, 2}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 1, 2}, std::vector{ 2, 0, 1, 0 }), 1, "topk_3d_min_one"), TopKParams( - Tensor(ET, {4, 3}, std::vector{ + reference_tests::Tensor(ET, {4, 3}, std::vector{ 9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{4}), + reference_tests::Tensor(ET2, {}, std::vector{4}), 0, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {4, 3}, std::vector{ + reference_tests::Tensor(ET, {4, 3}, std::vector{ 12, 11, 10, 9, 8, 7, 6, 2, 5, 3, 1, 4 }), - Tensor(ET_OUT, {4, 3}, std::vector{ + reference_tests::Tensor(ET_OUT, {4, 3}, std::vector{ 1, 3, 0, 0, 1, 3, 2, 0, 2, 3, 2, 1 }), 0, "topk_2d_max_all"), TopKParams( - Tensor(ET, {4, 3}, std::vector{ + reference_tests::Tensor(ET, {4, 3}, std::vector{ 9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{4}), + reference_tests::Tensor(ET2, {}, std::vector{4}), 0, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {4, 3}, std::vector{ + reference_tests::Tensor(ET, {4, 3}, std::vector{ 12, 11, 10, 9, 8, 7, 6, 2, 5, 3, 1, 4 }), - Tensor(ET_OUT, {4, 3}, std::vector{ + reference_tests::Tensor(ET_OUT, {4, 3}, std::vector{ 1, 3, 0, 0, 1, 3, 2, 0, 2, 3, 2, 1 }), 1, "topk_2d_max_all"), TopKParams( - Tensor(ET, {4, 3}, std::vector{ + reference_tests::Tensor(ET, {4, 3}, std::vector{ 9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{2}), + reference_tests::Tensor(ET2, {}, std::vector{2}), 0, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 12, 11, 10, 9, 8, 7 }), - Tensor(ET_OUT, {2, 3}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 3}, std::vector{ 1, 3, 0, 0, 1, 3 }), 0, "topk_2d_max_partial"), TopKParams( - Tensor(ET, {4, 3}, std::vector{ + reference_tests::Tensor(ET, {4, 3}, std::vector{ 9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{2}), + reference_tests::Tensor(ET2, {}, std::vector{2}), 0, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 12, 11, 10, 9, 8, 7 }), - Tensor(ET_OUT, {2, 3}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 3}, std::vector{ 1, 3, 0, 0, 1, 3 }), 1, "topk_2d_max_partial"), TopKParams( - Tensor(ET, {4, 3}, std::vector{ + reference_tests::Tensor(ET, {4, 3}, std::vector{ 9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{1}), 0, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {1, 3}, std::vector{ + reference_tests::Tensor(ET, {1, 3}, std::vector{ 12, 11, 10 }), - Tensor(ET_OUT, {1, 3}, std::vector{ + reference_tests::Tensor(ET_OUT, {1, 3}, std::vector{ 1, 3, 0 }), 0, "topk_2d_max_one"), TopKParams( - Tensor(ET, {4, 3}, std::vector{ + reference_tests::Tensor(ET, {4, 3}, std::vector{ 9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{1}), 0, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {1, 3}, std::vector{ + reference_tests::Tensor(ET, {1, 3}, std::vector{ 12, 11, 10 }), - Tensor(ET_OUT, {1, 3}, std::vector{ + reference_tests::Tensor(ET_OUT, {1, 3}, std::vector{ 1, 3, 0 }), 1, "topk_2d_max_one"), TopKParams( - Tensor(ET, {2, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 4}, std::vector{ 1, 3, 2, 4, 1, 3, 3, 2 }), - Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{1}), 1, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 1}, std::vector{ + reference_tests::Tensor(ET, {2, 1}, std::vector{ 4, 3 }), - Tensor(ET_OUT, {2, 1}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 1}, std::vector{ 3, 1 }), 0, "topk_2d_max_one_with_equal_values"), TopKParams( - Tensor(ET, {2, 4}, std::vector{ + reference_tests::Tensor(ET, {2, 4}, std::vector{ 1, 3, 2, 4, 1, 3, 3, 2 }), - Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{1}), 1, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 1}, std::vector{ + reference_tests::Tensor(ET, {2, 1}, std::vector{ 4, 3 }), - Tensor(ET_OUT, {2, 1}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 1}, std::vector{ 3, 1 }), 1, "topk_2d_max_one_with_equal_values"), TopKParams( - Tensor(ET, {4, 3}, std::vector{ + reference_tests::Tensor(ET, {4, 3}, std::vector{ 12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{4}), + reference_tests::Tensor(ET2, {}, std::vector{4}), 0, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {4, 3}, std::vector{ + reference_tests::Tensor(ET, {4, 3}, std::vector{ 3, 1, 4, 6, 2, 5, 9, 8, 7, 12, 11, 10 }), - Tensor(ET_OUT, {4, 3}, std::vector{ + reference_tests::Tensor(ET_OUT, {4, 3}, std::vector{ 3, 2, 1, 2, 0, 2, 1, 1, 3, 0, 3, 0 }), 0, "topk_2d_min_all"), TopKParams( - Tensor(ET, {4, 3}, std::vector{ + reference_tests::Tensor(ET, {4, 3}, std::vector{ 12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{4}), + reference_tests::Tensor(ET2, {}, std::vector{4}), 0, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {4, 3}, std::vector{ + reference_tests::Tensor(ET, {4, 3}, std::vector{ 3, 1, 4, 6, 2, 5, 9, 8, 7, 12, 11, 10 }), - Tensor(ET_OUT, {4, 3}, std::vector{ + reference_tests::Tensor(ET_OUT, {4, 3}, std::vector{ 3, 2, 1, 2, 0, 2, 1, 1, 3, 0, 3, 0 }), 1, "topk_2d_min_all"), TopKParams( - Tensor(ET, {4, 3}, std::vector{ + reference_tests::Tensor(ET, {4, 3}, std::vector{ 12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{2}), + reference_tests::Tensor(ET2, {}, std::vector{2}), 0, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 3, 1, 4, 6, 2, 5 }), - Tensor(ET_OUT, {2, 3}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 3}, std::vector{ 3, 2, 1, 2, 0, 2 }), 0, "topk_2d_min_partial"), TopKParams( - Tensor(ET, {4, 3}, std::vector{ + reference_tests::Tensor(ET, {4, 3}, std::vector{ 12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{2}), + reference_tests::Tensor(ET2, {}, std::vector{2}), 0, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 3}, std::vector{ + reference_tests::Tensor(ET, {2, 3}, std::vector{ 3, 1, 4, 6, 2, 5 }), - Tensor(ET_OUT, {2, 3}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 3}, std::vector{ 3, 2, 1, 2, 0, 2 }), 1, "topk_2d_min_partial"), TopKParams( - Tensor(ET, {4, 3}, std::vector{ + reference_tests::Tensor(ET, {4, 3}, std::vector{ 12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{1}), 0, opset1::TopK::Mode::MIN, opset1::TopK::SortType::NONE, - Tensor(ET, {1, 3}, std::vector{ + reference_tests::Tensor(ET, {1, 3}, std::vector{ 3, 1, 4 }), - Tensor(ET_OUT, {1, 3}, std::vector{ + reference_tests::Tensor(ET_OUT, {1, 3}, std::vector{ 3, 2, 1 }), 0, "topk_2d_min_one"), TopKParams( - Tensor(ET, {4, 3}, std::vector{ + reference_tests::Tensor(ET, {4, 3}, std::vector{ 12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{1}), + reference_tests::Tensor(ET2, {}, std::vector{1}), 0, opset1::TopK::Mode::MIN, opset1::TopK::SortType::NONE, - Tensor(ET, {1, 3}, std::vector{ + reference_tests::Tensor(ET, {1, 3}, std::vector{ 3, 1, 4 }), - Tensor(ET_OUT, {1, 3}, std::vector{ + reference_tests::Tensor(ET_OUT, {1, 3}, std::vector{ 3, 2, 1 }), 1, @@ -1406,33 +1406,33 @@ std::vector generateParamsInt64() { using T_OUT = typename element_type_traits::value_type; std::vector params { TopKParams( - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 1, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 10, 12, 9, 4, 8, 2, 11, 7, 6, 3, 5, 1 }), - Tensor(ET_OUT, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 3, 2}, std::vector{ 1, 1, 0, 2, 2, 0, 2, 2, 0, 1, 1, 0 }), 0, "topk_int64"), TopKParams( - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7 }), - Tensor(ET2, {}, std::vector{3}), + reference_tests::Tensor(ET2, {}, std::vector{3}), 1, opset1::TopK::Mode::MAX, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{ 10, 12, 9, 4, 8, 2, 11, 7, 6, 3, 5, 1 }), - Tensor(ET_OUT, {2, 3, 2}, std::vector{ + reference_tests::Tensor(ET_OUT, {2, 3, 2}, std::vector{ 1, 1, 0, 2, 2, 0, 2, 2, 0, 1, 1, 0 }), 1, @@ -1489,13 +1489,13 @@ std::vector generateParamsSingleOutput() { using T_OUT = typename element_type_traits::value_type; std::vector params { TopKParams( - Tensor(ET, {2, 3, 2}, std::vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), - Tensor(ET2, {}, std::vector{2}), + reference_tests::Tensor(ET, {2, 3, 2}, std::vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), + reference_tests::Tensor(ET2, {}, std::vector{2}), 1, opset1::TopK::Mode::MIN, opset1::TopK::SortType::SORT_VALUES, - Tensor(ET, {2, 2, 2}, std::vector{}), - Tensor(ET_OUT, {2, 2, 2}, std::vector{2, 0, 1, 2, 1, 0, 0, 1}), + reference_tests::Tensor(ET, {2, 2, 2}, std::vector{}), + reference_tests::Tensor(ET_OUT, {2, 2, 2}, std::vector{2, 0, 1, 2, 1, 0, 0, 1}), 0, "topk_3d_single_output"), }; diff --git a/docs/template_plugin/tests/functional/op_reference/transpose.cpp b/docs/template_plugin/tests/functional/op_reference/transpose.cpp index 77d9faa58ca..221a7575ca3 100644 --- a/docs/template_plugin/tests/functional/op_reference/transpose.cpp +++ b/docs/template_plugin/tests/functional/op_reference/transpose.cpp @@ -14,15 +14,15 @@ using namespace ov; namespace { struct TransposeParams { - TransposeParams(const PartialShape& dynamicDataShape, const Tensor& dataTensor, const Tensor& axisTensor, - const Tensor& expectedTensor, const std::string& testcaseName = "") : + TransposeParams(const PartialShape& dynamicDataShape, const reference_tests::Tensor& dataTensor, const reference_tests::Tensor& axisTensor, + const reference_tests::Tensor& expectedTensor, const std::string& testcaseName = "") : dynamicDataShape(dynamicDataShape), dataTensor(dataTensor), axisTensor(axisTensor), expectedTensor(expectedTensor), testcaseName(testcaseName) {} PartialShape dynamicDataShape; - Tensor dataTensor; - Tensor axisTensor; - Tensor expectedTensor; + reference_tests::Tensor dataTensor; + reference_tests::Tensor axisTensor; + reference_tests::Tensor expectedTensor; std::string testcaseName; }; @@ -88,58 +88,58 @@ std::vector generateTransposeParams() { std::vector transposeParams { // transpose_basic TransposeParams(PartialShape::dynamic(), - Tensor(IN_ET, {2, 3}, std::vector{1, 2, 3, 4, 5, 6}), - Tensor(element::i64, {2}, std::vector{0, 1}), - Tensor(IN_ET, {2, 3}, std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(IN_ET, {2, 3}, std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(element::i64, {2}, std::vector{0, 1}), + reference_tests::Tensor(IN_ET, {2, 3}, std::vector{1, 2, 3, 4, 5, 6}), "transpose_basic_1"), TransposeParams(PartialShape::dynamic(), - Tensor(IN_ET, {2, 3}, std::vector{1, 2, 3, 4, 5, 6}), - Tensor(element::i64, {2}, std::vector{1, 0}), - Tensor(IN_ET, {3, 2}, std::vector{1, 4, 2, 5, 3, 6}), + reference_tests::Tensor(IN_ET, {2, 3}, std::vector{1, 2, 3, 4, 5, 6}), + reference_tests::Tensor(element::i64, {2}, std::vector{1, 0}), + reference_tests::Tensor(IN_ET, {3, 2}, std::vector{1, 4, 2, 5, 3, 6}), "transpose_basic_2"), TransposeParams(PartialShape::dynamic(), - Tensor(IN_ET, {2, 2, 3}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), - Tensor(element::i64, {3}, std::vector{2, 1, 0}), - Tensor(IN_ET, {3, 2, 2}, std::vector{1, 7, 4, 10, 2, 8, 5, 11, 3, 9, 6, 12}), + reference_tests::Tensor(IN_ET, {2, 2, 3}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), + reference_tests::Tensor(element::i64, {3}, std::vector{2, 1, 0}), + reference_tests::Tensor(IN_ET, {3, 2, 2}, std::vector{1, 7, 4, 10, 2, 8, 5, 11, 3, 9, 6, 12}), "transpose_basic_3"), // transpose_axes_constant TransposeParams({}, - Tensor(IN_ET, {2, 1, 3, 4}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + reference_tests::Tensor(IN_ET, {2, 1, 3, 4}, std::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}), - Tensor(element::i64, {4}, std::vector{2, 3, 0, 1}), - Tensor(IN_ET, {3, 4, 2, 1}, std::vector{1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, + reference_tests::Tensor(element::i64, {4}, std::vector{2, 3, 0, 1}), + reference_tests::Tensor(IN_ET, {3, 4, 2, 1}, std::vector{1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, 7, 19, 8, 20, 9, 21, 10, 22, 11, 23, 12, 24}), "transpose_axes_constant"), // transpose_axes_empty_constant TransposeParams({}, - Tensor(IN_ET, {2, 1, 3, 4}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + reference_tests::Tensor(IN_ET, {2, 1, 3, 4}, std::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}), - Tensor(element::i64, {0}, std::vector{}), - Tensor(IN_ET, {4, 3, 1, 2}, std::vector{1, 13, 5, 17, 9, 21, 2, 14, 6, 18, 10, 22, + reference_tests::Tensor(element::i64, {0}, std::vector{}), + reference_tests::Tensor(IN_ET, {4, 3, 1, 2}, std::vector{1, 13, 5, 17, 9, 21, 2, 14, 6, 18, 10, 22, 3, 15, 7, 19, 11, 23, 4, 16, 8, 20, 12, 24}), "transpose_axes_empty_constant"), // transpose_axes_parameter_static_shapes TransposeParams({}, - Tensor(IN_ET, {2, 1, 3, 4}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + reference_tests::Tensor(IN_ET, {2, 1, 3, 4}, std::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}), - Tensor(element::i64, {4}, std::vector{2, 3, 0, 1}), - Tensor(IN_ET, {4, 3, 1, 2}, std::vector{1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, + reference_tests::Tensor(element::i64, {4}, std::vector{2, 3, 0, 1}), + reference_tests::Tensor(IN_ET, {4, 3, 1, 2}, std::vector{1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, 7, 19, 8, 20, 9, 21, 10, 22, 11, 23, 12, 24}), "transpose_axes_parameter_static_shapes"), // transpose_axes_parameter_dynamic_shapes TransposeParams(PartialShape::dynamic(), - Tensor(IN_ET, {2, 1, 3, 4}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + reference_tests::Tensor(IN_ET, {2, 1, 3, 4}, std::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}), - Tensor(element::i64, {4}, std::vector{2, 3, 0, 1}), - Tensor(IN_ET, {4, 3, 1, 2}, std::vector{1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, + reference_tests::Tensor(element::i64, {4}, std::vector{2, 3, 0, 1}), + reference_tests::Tensor(IN_ET, {4, 3, 1, 2}, std::vector{1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, 7, 19, 8, 20, 9, 21, 10, 22, 11, 23, 12, 24}), "transpose_axes_parameter_dynamic_shapes"), // transpose_int_data_axes_constant TransposeParams({}, - Tensor(IN_ET, {2, 1, 3, 4}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + reference_tests::Tensor(IN_ET, {2, 1, 3, 4}, std::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}), - Tensor(element::i64, {4}, std::vector{2, 3, 0, 1}), - Tensor(IN_ET, {3, 4, 2, 1}, std::vector{1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, + reference_tests::Tensor(element::i64, {4}, std::vector{2, 3, 0, 1}), + reference_tests::Tensor(IN_ET, {3, 4, 2, 1}, std::vector{1, 13, 2, 14, 3, 15, 4, 16, 5, 17, 6, 18, 7, 19, 8, 20, 9, 21, 10, 22, 11, 23, 12, 24}), "transpose_int_data_axes_constant"), }; diff --git a/docs/template_plugin/tests/functional/op_reference/unsqueeze.cpp b/docs/template_plugin/tests/functional/op_reference/unsqueeze.cpp index f64ea004743..533edd4e348 100644 --- a/docs/template_plugin/tests/functional/op_reference/unsqueeze.cpp +++ b/docs/template_plugin/tests/functional/op_reference/unsqueeze.cpp @@ -38,11 +38,11 @@ struct UnsqueezeParams { Shape m_expected_shape; element::Type m_input_type; element::Type m_expected_type; - runtime::Tensor m_input_value; - runtime::Tensor m_expected_value; + ov::Tensor m_input_value; + ov::Tensor m_expected_value; Shape m_axes_shape; element::Type m_axes_type; - runtime::Tensor m_axes_value; + ov::Tensor m_axes_value; }; class ReferenceUnsqueezeLayerTest : public testing::TestWithParam, public CommonReferenceTest { @@ -77,7 +77,7 @@ private: const Shape& input_shape, const element::Type& axes_type, const Shape& axes_shape, - const runtime::Tensor& axes_value) { + const ov::Tensor& axes_value) { const auto in = std::make_shared(input_type, input_shape); const auto axes = std::make_shared(axes_type, axes_shape, axes_value.data()); const auto unsqueeze = std::make_shared(in, axes); diff --git a/docs/template_plugin/tests/functional/op_reference/variadic_split.cpp b/docs/template_plugin/tests/functional/op_reference/variadic_split.cpp index 77baacbaa92..2f3973e469a 100644 --- a/docs/template_plugin/tests/functional/op_reference/variadic_split.cpp +++ b/docs/template_plugin/tests/functional/op_reference/variadic_split.cpp @@ -13,18 +13,18 @@ using namespace ov; namespace { struct VariadicSplitParams { - VariadicSplitParams(const ov::PartialShape& dynamicDataShape, const Tensor& dataTensor, - const Tensor& axisTensor, const Tensor& splitLengthTensor, - const std::vector& expectedTensors, const std::string& testcaseName = "") : + VariadicSplitParams(const ov::PartialShape& dynamicDataShape, const reference_tests::Tensor& dataTensor, + const reference_tests::Tensor& axisTensor, const reference_tests::Tensor& splitLengthTensor, + const std::vector& expectedTensors, const std::string& testcaseName = "") : dynamicDataShape(dynamicDataShape), dataTensor(dataTensor), axisTensor(axisTensor), splitLengthTensor(splitLengthTensor), expectedTensors(expectedTensors), testcaseName(testcaseName) {} ov::PartialShape dynamicDataShape; - Tensor dataTensor; - Tensor axisTensor; - Tensor splitLengthTensor; - std::vector expectedTensors; + reference_tests::Tensor dataTensor; + reference_tests::Tensor axisTensor; + reference_tests::Tensor splitLengthTensor; + std::vector expectedTensors; std::string testcaseName; }; @@ -97,89 +97,89 @@ std::vector generateVariadicSplitParams() { std::vector variadicSplitParams { // variadic_split_1d_static VariadicSplitParams({10}, - Tensor(IN_ET, {10}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}), - Tensor(element::i32, {1}, std::vector{0}), - Tensor(element::i32, {3}, std::vector{5, 3, 2}), - std::vector{Tensor(IN_ET, {5}, std::vector{1, 2, 3, 4, 5}), - Tensor(IN_ET, {3}, std::vector{6, 7, 8}), - Tensor(IN_ET, {2}, std::vector{9, 10})}, + reference_tests::Tensor(IN_ET, {10}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}), + reference_tests::Tensor(element::i32, {1}, std::vector{0}), + reference_tests::Tensor(element::i32, {3}, std::vector{5, 3, 2}), + std::vector{reference_tests::Tensor(IN_ET, {5}, std::vector{1, 2, 3, 4, 5}), + reference_tests::Tensor(IN_ET, {3}, std::vector{6, 7, 8}), + reference_tests::Tensor(IN_ET, {2}, std::vector{9, 10})}, "variadic_split_1d_static"), // variadic_split_1d_dynamic VariadicSplitParams(PartialShape::dynamic(), - Tensor(IN_ET, {10}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}), - Tensor(element::i32, {1}, std::vector{0}), - Tensor(element::i32, {3}, std::vector{5, 3, 2}), - std::vector{Tensor(IN_ET, {5}, std::vector{1, 2, 3, 4, 5}), - Tensor(IN_ET, {3}, std::vector{6, 7, 8}), - Tensor(IN_ET, {2}, std::vector{9, 10})}, + reference_tests::Tensor(IN_ET, {10}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}), + reference_tests::Tensor(element::i32, {1}, std::vector{0}), + reference_tests::Tensor(element::i32, {3}, std::vector{5, 3, 2}), + std::vector{reference_tests::Tensor(IN_ET, {5}, std::vector{1, 2, 3, 4, 5}), + reference_tests::Tensor(IN_ET, {3}, std::vector{6, 7, 8}), + reference_tests::Tensor(IN_ET, {2}, std::vector{9, 10})}, "variadic_split_1d_dynamic"), // variadic_split_2d_axis_0_static VariadicSplitParams({6, 2}, - Tensor(IN_ET, {6, 2}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), - Tensor(element::i32, {}, std::vector{0}), - Tensor(element::i32, {2}, std::vector{4, 2}), - std::vector{Tensor(IN_ET, {4, 2}, std::vector{1, 2, 3, 4, 5, 6, 7, 8}), - Tensor(IN_ET, {2, 2}, std::vector{9, 10, 11, 12})}, + reference_tests::Tensor(IN_ET, {6, 2}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), + reference_tests::Tensor(element::i32, {}, std::vector{0}), + reference_tests::Tensor(element::i32, {2}, std::vector{4, 2}), + std::vector{reference_tests::Tensor(IN_ET, {4, 2}, std::vector{1, 2, 3, 4, 5, 6, 7, 8}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{9, 10, 11, 12})}, "variadic_split_2d_axis_0_static"), // variadic_split_2d_axis_0_dynamic VariadicSplitParams(PartialShape::dynamic(), - Tensor(IN_ET, {6, 2}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), - Tensor(element::i32, {}, std::vector{0}), - Tensor(element::i32, {2}, std::vector{4, 2}), - std::vector{Tensor(IN_ET, {4, 2}, std::vector{1, 2, 3, 4, 5, 6, 7, 8}), - Tensor(IN_ET, {2, 2}, std::vector{9, 10, 11, 12})}, + reference_tests::Tensor(IN_ET, {6, 2}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), + reference_tests::Tensor(element::i32, {}, std::vector{0}), + reference_tests::Tensor(element::i32, {2}, std::vector{4, 2}), + std::vector{reference_tests::Tensor(IN_ET, {4, 2}, std::vector{1, 2, 3, 4, 5, 6, 7, 8}), + reference_tests::Tensor(IN_ET, {2, 2}, std::vector{9, 10, 11, 12})}, "variadic_split_2d_axis_0_dynamic"), // variadic_split_2d_axis_1_static VariadicSplitParams({4, 3}, - Tensor(IN_ET, {4, 3}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), - Tensor(element::i32, {}, std::vector{1}), - Tensor(element::i32, {2}, std::vector{1, 2}), - std::vector{Tensor(IN_ET, {4, 1}, std::vector{1, 4, 7, 10}), - Tensor(IN_ET, {4, 2}, std::vector{2, 3, 5, 6, 8, 9, 11, 12})}, + reference_tests::Tensor(IN_ET, {4, 3}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), + reference_tests::Tensor(element::i32, {}, std::vector{1}), + reference_tests::Tensor(element::i32, {2}, std::vector{1, 2}), + std::vector{reference_tests::Tensor(IN_ET, {4, 1}, std::vector{1, 4, 7, 10}), + reference_tests::Tensor(IN_ET, {4, 2}, std::vector{2, 3, 5, 6, 8, 9, 11, 12})}, "variadic_split_2d_axis_1_static"), // variadic_split_2d_axis_1_dynamic VariadicSplitParams(PartialShape::dynamic(), - Tensor(IN_ET, {4, 3}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), - Tensor(element::i32, {}, std::vector{1}), - Tensor(element::i32, {2}, std::vector{1, 2}), - std::vector{Tensor(IN_ET, {4, 1}, std::vector{1, 4, 7, 10}), - Tensor(IN_ET, {4, 2}, std::vector{2, 3, 5, 6, 8, 9, 11, 12})}, + reference_tests::Tensor(IN_ET, {4, 3}, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), + reference_tests::Tensor(element::i32, {}, std::vector{1}), + reference_tests::Tensor(element::i32, {2}, std::vector{1, 2}), + std::vector{reference_tests::Tensor(IN_ET, {4, 1}, std::vector{1, 4, 7, 10}), + reference_tests::Tensor(IN_ET, {4, 2}, std::vector{2, 3, 5, 6, 8, 9, 11, 12})}, "variadic_split_2d_axis_1_dynamic"), // variadic_split_4d_axis_0_static VariadicSplitParams({6, 2, 3, 1}, - Tensor(IN_ET, {6, 2, 3, 1}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, + reference_tests::Tensor(IN_ET, {6, 2, 3, 1}, 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, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35}), - Tensor(element::i32, {1}, std::vector{0}), - Tensor(element::i32, {3}, std::vector{3, 1, 2}), - std::vector{Tensor(IN_ET, {3, 2, 3, 1}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, + reference_tests::Tensor(element::i32, {1}, std::vector{0}), + reference_tests::Tensor(element::i32, {3}, std::vector{3, 1, 2}), + std::vector{reference_tests::Tensor(IN_ET, {3, 2, 3, 1}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}), - Tensor(IN_ET, {1, 2, 3, 1}, std::vector{18, 19, 20, 21, 22, 23}), - Tensor(IN_ET, {2, 2, 3, 1}, std::vector{24, 25, 26, 27, 28, 29, 30, 31, + reference_tests::Tensor(IN_ET, {1, 2, 3, 1}, std::vector{18, 19, 20, 21, 22, 23}), + reference_tests::Tensor(IN_ET, {2, 2, 3, 1}, std::vector{24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35})}, "variadic_split_4d_axis_0_static"), // variadic_split_4d_axis_0_dynamic VariadicSplitParams(PartialShape::dynamic(), - Tensor(IN_ET, {6, 2, 3, 1}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, + reference_tests::Tensor(IN_ET, {6, 2, 3, 1}, 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, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35}), - Tensor(element::i32, {1}, std::vector{0}), - Tensor(element::i32, {3}, std::vector{3, 1, 2}), - std::vector{Tensor(IN_ET, {3, 2, 3, 1}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, + reference_tests::Tensor(element::i32, {1}, std::vector{0}), + reference_tests::Tensor(element::i32, {3}, std::vector{3, 1, 2}), + std::vector{reference_tests::Tensor(IN_ET, {3, 2, 3, 1}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17}), - Tensor(IN_ET, {1, 2, 3, 1}, std::vector{18, 19, 20, 21, 22, 23}), - Tensor(IN_ET, {2, 2, 3, 1}, std::vector{24, 25, 26, 27, 28, 29, 30, 31, + reference_tests::Tensor(IN_ET, {1, 2, 3, 1}, std::vector{18, 19, 20, 21, 22, 23}), + reference_tests::Tensor(IN_ET, {2, 2, 3, 1}, std::vector{24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35})}, "variadic_split_4d_axis_0_dynamic"), // variadic_split_4d_axis_1_static VariadicSplitParams({2, 8, 2, 2}, - Tensor(IN_ET, {2, 8, 2, 2}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, + reference_tests::Tensor(IN_ET, {2, 8, 2, 2}, 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, 24, 25, 26, 27, 28, 29, 30, 31, @@ -187,20 +187,20 @@ std::vector generateVariadicSplitParams() { 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}), - Tensor(element::i32, {1}, std::vector{1}), - Tensor(element::i32, {4}, std::vector{1, 3, 2, 2}), - std::vector{Tensor(IN_ET, {2, 1, 2, 2}, std::vector{0, 1, 2, 3, 32, 33, 34, 35}), - Tensor(IN_ET, {2, 3, 2, 2}, std::vector{4, 5, 6, 7, 8, 9, 10, 11, + reference_tests::Tensor(element::i32, {1}, std::vector{1}), + reference_tests::Tensor(element::i32, {4}, std::vector{1, 3, 2, 2}), + std::vector{reference_tests::Tensor(IN_ET, {2, 1, 2, 2}, std::vector{0, 1, 2, 3, 32, 33, 34, 35}), + reference_tests::Tensor(IN_ET, {2, 3, 2, 2}, std::vector{4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}), - Tensor(IN_ET, {2, 2, 2, 2}, std::vector{16, 17, 18, 19, 20, 21, 22, 23, + reference_tests::Tensor(IN_ET, {2, 2, 2, 2}, std::vector{16, 17, 18, 19, 20, 21, 22, 23, 48, 49, 50, 51, 52, 53, 54, 55}), - Tensor(IN_ET, {2, 2, 2, 2}, std::vector{24, 25, 26, 27, 28, 29, 30, 31, + reference_tests::Tensor(IN_ET, {2, 2, 2, 2}, std::vector{24, 25, 26, 27, 28, 29, 30, 31, 56, 57, 58, 59, 60, 61, 62, 63})}, "variadic_split_4d_axis_1_static"), // variadic_split_4d_axis_1_dynamic VariadicSplitParams(PartialShape::dynamic(), - Tensor(IN_ET, {2, 8, 2, 2}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, + reference_tests::Tensor(IN_ET, {2, 8, 2, 2}, 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, 24, 25, 26, 27, 28, 29, 30, 31, @@ -208,63 +208,63 @@ std::vector generateVariadicSplitParams() { 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}), - Tensor(element::i32, {1}, std::vector{1}), - Tensor(element::i32, {4}, std::vector{1, 3, 2, 2}), - std::vector{Tensor(IN_ET, {2, 1, 2, 2}, std::vector{0, 1, 2, 3, 32, 33, 34, 35}), - Tensor(IN_ET, {2, 3, 2, 2}, std::vector{4, 5, 6, 7, 8, 9, 10, 11, + reference_tests::Tensor(element::i32, {1}, std::vector{1}), + reference_tests::Tensor(element::i32, {4}, std::vector{1, 3, 2, 2}), + std::vector{reference_tests::Tensor(IN_ET, {2, 1, 2, 2}, std::vector{0, 1, 2, 3, 32, 33, 34, 35}), + reference_tests::Tensor(IN_ET, {2, 3, 2, 2}, std::vector{4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}), - Tensor(IN_ET, {2, 2, 2, 2}, std::vector{16, 17, 18, 19, 20, 21, 22, 23, + reference_tests::Tensor(IN_ET, {2, 2, 2, 2}, std::vector{16, 17, 18, 19, 20, 21, 22, 23, 48, 49, 50, 51, 52, 53, 54, 55}), - Tensor(IN_ET, {2, 2, 2, 2}, std::vector{24, 25, 26, 27, 28, 29, 30, 31, + reference_tests::Tensor(IN_ET, {2, 2, 2, 2}, std::vector{24, 25, 26, 27, 28, 29, 30, 31, 56, 57, 58, 59, 60, 61, 62, 63})}, "variadic_split_4d_axis_1_dynamic"), // variadic_split_4d_axis_2_static VariadicSplitParams({2, 1, 6, 2}, - Tensor(IN_ET, {2, 1, 6, 2}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, + reference_tests::Tensor(IN_ET, {2, 1, 6, 2}, 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}), - Tensor(element::i32, {1}, std::vector{2}), - Tensor(element::i32, {3}, std::vector{3, 1, 2}), - std::vector{Tensor(IN_ET, {2, 1, 3, 2}, std::vector{0, 1, 2, 3, 4, 5, 12, 13, + reference_tests::Tensor(element::i32, {1}, std::vector{2}), + reference_tests::Tensor(element::i32, {3}, std::vector{3, 1, 2}), + std::vector{reference_tests::Tensor(IN_ET, {2, 1, 3, 2}, std::vector{0, 1, 2, 3, 4, 5, 12, 13, 14, 15, 16, 17}), - Tensor(IN_ET, {2, 1, 1, 2}, std::vector{6, 7, 18, 19}), - Tensor(IN_ET, {2, 1, 2, 2}, std::vector{8, 9, 10, 11, 20, 21, 22, 23})}, + reference_tests::Tensor(IN_ET, {2, 1, 1, 2}, std::vector{6, 7, 18, 19}), + reference_tests::Tensor(IN_ET, {2, 1, 2, 2}, std::vector{8, 9, 10, 11, 20, 21, 22, 23})}, "variadic_split_4d_axis_2_static"), // variadic_split_4d_axis_2_dynamic VariadicSplitParams(PartialShape::dynamic(), - Tensor(IN_ET, {2, 1, 6, 2}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, + reference_tests::Tensor(IN_ET, {2, 1, 6, 2}, 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}), - Tensor(element::i32, {1}, std::vector{2}), - Tensor(element::i32, {3}, std::vector{-1, 1, 2}), - std::vector{Tensor(IN_ET, {2, 1, 3, 2}, std::vector{0, 1, 2, 3, 4, 5, 12, 13, + reference_tests::Tensor(element::i32, {1}, std::vector{2}), + reference_tests::Tensor(element::i32, {3}, std::vector{-1, 1, 2}), + std::vector{reference_tests::Tensor(IN_ET, {2, 1, 3, 2}, std::vector{0, 1, 2, 3, 4, 5, 12, 13, 14, 15, 16, 17}), - Tensor(IN_ET, {2, 1, 1, 2}, std::vector{6, 7, 18, 19}), - Tensor(IN_ET, {2, 1, 2, 2}, std::vector{8, 9, 10, 11, 20, 21, 22, 23})}, + reference_tests::Tensor(IN_ET, {2, 1, 1, 2}, std::vector{6, 7, 18, 19}), + reference_tests::Tensor(IN_ET, {2, 1, 2, 2}, std::vector{8, 9, 10, 11, 20, 21, 22, 23})}, "variadic_split_4d_axis_2_dynamic"), // variadic_split_4d_axis_3_static VariadicSplitParams({2, 1, 2, 6}, - Tensor(IN_ET, {2, 1, 2, 6}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, + reference_tests::Tensor(IN_ET, {2, 1, 2, 6}, 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}), - Tensor(element::i32, {1}, std::vector{3}), - Tensor(element::i32, {3}, std::vector{1, -1, 3}), - std::vector{Tensor(IN_ET, {2, 1, 2, 1}, std::vector{0, 6, 12, 18}), - Tensor(IN_ET, {2, 1, 2, 2}, std::vector{1, 2, 7, 8, 13, 14, 19, 20}), - Tensor(IN_ET, {2, 1, 2, 3}, std::vector{3, 4, 5, 9, 10, 11, 15, 16, + reference_tests::Tensor(element::i32, {1}, std::vector{3}), + reference_tests::Tensor(element::i32, {3}, std::vector{1, -1, 3}), + std::vector{reference_tests::Tensor(IN_ET, {2, 1, 2, 1}, std::vector{0, 6, 12, 18}), + reference_tests::Tensor(IN_ET, {2, 1, 2, 2}, std::vector{1, 2, 7, 8, 13, 14, 19, 20}), + reference_tests::Tensor(IN_ET, {2, 1, 2, 3}, std::vector{3, 4, 5, 9, 10, 11, 15, 16, 17, 21, 22, 23})}, "variadic_split_4d_axis_3_static"), // variadic_split_4d_axis_3_dynamic VariadicSplitParams(PartialShape::dynamic(), - Tensor(IN_ET, {2, 1, 2, 6}, std::vector{0, 1, 2, 3, 4, 5, 6, 7, + reference_tests::Tensor(IN_ET, {2, 1, 2, 6}, 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}), - Tensor(element::i32, {1}, std::vector{3}), - Tensor(element::i32, {3}, std::vector{1, 2, -1}), - std::vector{Tensor(IN_ET, {2, 1, 2, 1}, std::vector{0, 6, 12, 18}), - Tensor(IN_ET, {2, 1, 2, 2}, std::vector{1, 2, 7, 8, 13, 14, 19, 20}), - Tensor(IN_ET, {2, 1, 2, 3}, std::vector{3, 4, 5, 9, 10, 11, 15, 16, + reference_tests::Tensor(element::i32, {1}, std::vector{3}), + reference_tests::Tensor(element::i32, {3}, std::vector{1, 2, -1}), + std::vector{reference_tests::Tensor(IN_ET, {2, 1, 2, 1}, std::vector{0, 6, 12, 18}), + reference_tests::Tensor(IN_ET, {2, 1, 2, 2}, std::vector{1, 2, 7, 8, 13, 14, 19, 20}), + reference_tests::Tensor(IN_ET, {2, 1, 2, 3}, std::vector{3, 4, 5, 9, 10, 11, 15, 16, 17, 21, 22, 23})}, "variadic_split_4d_axis_3_dynamic"), }; diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/ov_infer_request/batched_tensors.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/ov_infer_request/batched_tensors.cpp index 36a16ec2b10..3ac4c5340eb 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/ov_infer_request/batched_tensors.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/ov_infer_request/batched_tensors.cpp @@ -18,9 +18,9 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_Batch_Non_0) { auto model = OVInferRequestBatchedTests::create_n_inputs(1, element::f32, batch_shape, "CNHW"); const std::string tensor_name = "tensor_input0"; auto execNet = ie->compile_model(model, targetDevice); - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors(batch, runtime::Tensor(element::f32, one_shape)); + std::vector tensors(batch, ov::Tensor(element::f32, one_shape)); ASSERT_THROW(req.set_tensors(tensor_name, tensors), ov::Exception); } @@ -32,10 +32,10 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_remote_tensor_default) { auto model = OVInferRequestBatchedTests::create_n_inputs(1, element::f32, batch_shape, "NCHW"); const std::string tensor_name = "tensor_input0"; auto execNet = ie->compile_model(model, targetDevice); - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors(batch - 1, runtime::Tensor(element::f32, one_shape)); - tensors.emplace_back(runtime::RemoteTensor()); + std::vector tensors(batch - 1, ov::Tensor(element::f32, one_shape)); + tensors.emplace_back(ov::RemoteTensor()); ASSERT_THROW(req.set_tensors(tensor_name, tensors), ov::Exception); } @@ -51,16 +51,16 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_Strides) { std::vector buffer2(one_shape_size_stride, 20); auto execNet = ie->compile_model(model, targetDevice); // Create InferRequest - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - auto tensor1 = runtime::Tensor(element::f32, one_shape_stride, &buffer1[0]); - auto tensor2 = runtime::Tensor(element::f32, one_shape_stride, &buffer2[0]); - auto tensor1_cut = runtime::Tensor(tensor1, {0, 1, 1, 1}, {1, 3, 3, 3}); - auto tensor2_cut = runtime::Tensor(tensor1, {0, 1, 1, 1}, {1, 3, 3, 3}); - std::vector tensors; + auto tensor1 = ov::Tensor(element::f32, one_shape_stride, &buffer1[0]); + auto tensor2 = ov::Tensor(element::f32, one_shape_stride, &buffer2[0]); + auto tensor1_cut = ov::Tensor(tensor1, {0, 1, 1, 1}, {1, 3, 3, 3}); + auto tensor2_cut = ov::Tensor(tensor1, {0, 1, 1, 1}, {1, 3, 3, 3}); + std::vector tensors; tensors.push_back(tensor1_cut); tensors.push_back(tensor2_cut); - auto exp_tensor = ov::runtime::Tensor(element::f32, batch_shape); + auto exp_tensor = ov::Tensor(element::f32, batch_shape); ASSERT_THROW({ req.set_tensors("tensor_input0", tensors); req.infer(); diff --git a/docs/template_plugin/tests/functional/subgraph_reference/base_reference_cnn_test.cpp b/docs/template_plugin/tests/functional/subgraph_reference/base_reference_cnn_test.cpp index f881c672904..b88c11f3709 100644 --- a/docs/template_plugin/tests/functional/subgraph_reference/base_reference_cnn_test.cpp +++ b/docs/template_plugin/tests/functional/subgraph_reference/base_reference_cnn_test.cpp @@ -67,8 +67,8 @@ void ReferenceCNNTest::FillInputs() { auto buf = mBlobHolder.as(); ASSERT_EQ(mBlob->size(), elem_count); - ov::runtime::Tensor ov_blob; - ov_blob = ov::runtime::Tensor(param->get_element_type(), param->get_shape()); + ov::Tensor ov_blob; + ov_blob = ov::Tensor(param->get_element_type(), param->get_shape()); auto ov_buf = static_cast(ov_blob.data()); for (size_t j = 0; j < elem_count; j++) { diff --git a/docs/template_plugin/tests/functional/subgraph_reference/base_reference_cnn_test.hpp b/docs/template_plugin/tests/functional/subgraph_reference/base_reference_cnn_test.hpp index 9a78b221ed9..f38a219dc48 100644 --- a/docs/template_plugin/tests/functional/subgraph_reference/base_reference_cnn_test.hpp +++ b/docs/template_plugin/tests/functional/subgraph_reference/base_reference_cnn_test.hpp @@ -32,18 +32,18 @@ protected: float threshold = 1e-5f; // Relative diff float abs_threshold = -1.f; // Absolute diff (not used when negative) - std::vector outputs_ov20; - std::vector outputs_legacy; + std::vector outputs_ov20; + std::vector outputs_legacy; protected: // These will be generated by default, if user has not specified inputs manually - std::vector inputData; + std::vector inputData; InferenceEngine::BlobMap legacy_input_blobs; private: - std::shared_ptr core; - ov::runtime::CompiledModel executableNetwork; - ov::runtime::InferRequest inferRequest; + std::shared_ptr core; + ov::CompiledModel executableNetwork; + ov::InferRequest inferRequest; std::shared_ptr legacy_core; InferenceEngine::ExecutableNetwork legacy_exec_network; diff --git a/docs/template_plugin/tests/functional/subgraph_reference/preprocess.cpp b/docs/template_plugin/tests/functional/subgraph_reference/preprocess.cpp index 3088aa28ced..4b136d4dfa9 100644 --- a/docs/template_plugin/tests/functional/subgraph_reference/preprocess.cpp +++ b/docs/template_plugin/tests/functional/subgraph_reference/preprocess.cpp @@ -22,8 +22,8 @@ namespace { struct RefPreprocessParams { RefPreprocessParams(const std::string& val): name(val) {} std::function()> function; - std::vector inputs; - std::vector expected; + std::vector inputs; + std::vector expected; float abs_threshold = 0.01f; float rel_threshold = 0.01f; std::string name; @@ -1018,15 +1018,15 @@ static RefPreprocessParams reverse_channels_nchw() { static RefPreprocessParams color_cut_last_channel() { RefPreprocessParams res("color_cut_last_channel"); - auto input_tensor = Tensor(Shape{1, 2, 2, 4}, element::f32, std::vector{1, 2, 3, 4, + auto input_tensor = reference_tests::Tensor(Shape{1, 2, 2, 4}, element::f32, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 3, 4, 5, 6, 6, 7, 8, 9}); - auto exp_3_channels = Tensor(Shape{1, 2, 2, 3}, element::f32, std::vector{1, 2, 3, + auto exp_3_channels = reference_tests::Tensor(Shape{1, 2, 2, 3}, element::f32, std::vector{1, 2, 3, 5, 6, 7, 3, 4, 5, 6, 7, 8}); - auto inv_3_channels = Tensor(Shape{1, 2, 2, 3}, element::f32, std::vector{3, 2, 1, + auto inv_3_channels = reference_tests::Tensor(Shape{1, 2, 2, 3}, element::f32, std::vector{3, 2, 1, 7, 6, 5, 5, 4, 3, 8, 7, 6}); @@ -1047,8 +1047,8 @@ static RefPreprocessParams color_cut_last_channel() { return prep.build(); }; - res.inputs = std::vector{input_tensor, input_tensor, input_tensor, input_tensor}; - res.expected = std::vector{exp_3_channels, inv_3_channels, exp_3_channels, inv_3_channels}; + res.inputs = std::vector{input_tensor, input_tensor, input_tensor, input_tensor}; + res.expected = std::vector{exp_3_channels, inv_3_channels, exp_3_channels, inv_3_channels}; return res; } diff --git a/samples/cpp/benchmark_app/infer_request_wrap.hpp b/samples/cpp/benchmark_app/infer_request_wrap.hpp index 3742d86112d..3cd942bc81e 100644 --- a/samples/cpp/benchmark_app/infer_request_wrap.hpp +++ b/samples/cpp/benchmark_app/infer_request_wrap.hpp @@ -33,7 +33,7 @@ public: ~InferReqWrap() = default; - explicit InferReqWrap(ov::runtime::CompiledModel& model, size_t id, QueueCallbackFunction callbackQueue) + explicit InferReqWrap(ov::CompiledModel& model, size_t id, QueueCallbackFunction callbackQueue) : _request(model.create_infer_request()), _id(id), _lat_group_id(0), @@ -62,7 +62,7 @@ public: _callbackQueue(_id, _lat_group_id, get_execution_time_in_milliseconds()); } - std::vector get_performance_counts() { + std::vector get_performance_counts() { return _request.get_profiling_info(); } @@ -71,11 +71,11 @@ public: _request.get_tensor(name).set_shape(dims); } - ov::runtime::Tensor get_tensor(const std::string& name) { + ov::Tensor get_tensor(const std::string& name) { return _request.get_tensor(name); } - void set_tensor(const std::string& name, const ov::runtime::Tensor& data) { + void set_tensor(const std::string& name, const ov::Tensor& data) { _request.set_tensor(name, data); } @@ -96,7 +96,7 @@ public: } private: - ov::runtime::InferRequest _request; + ov::InferRequest _request; Time::time_point _startTime; Time::time_point _endTime; size_t _id; @@ -107,7 +107,7 @@ private: class InferRequestsQueue final { public: - InferRequestsQueue(ov::runtime::CompiledModel& model, size_t nireq, size_t lat_group_n, bool enable_lat_groups) + InferRequestsQueue(ov::CompiledModel& model, size_t nireq, size_t lat_group_n, bool enable_lat_groups) : enable_lat_groups(enable_lat_groups) { for (size_t id = 0; id < nireq; id++) { requests.push_back(std::make_shared(model, diff --git a/samples/cpp/benchmark_app/inputs_filling.cpp b/samples/cpp/benchmark_app/inputs_filling.cpp index 22a861d8881..c057daaa4b5 100644 --- a/samples/cpp/benchmark_app/inputs_filling.cpp +++ b/samples/cpp/benchmark_app/inputs_filling.cpp @@ -24,12 +24,12 @@ using uniformDistribution = typename std::conditional< typename std::conditional::value, std::uniform_int_distribution, void>::type>::type; template -ov::runtime::Tensor create_tensor_from_image(const std::vector& files, - size_t inputId, - size_t batchSize, - const benchmark_app::InputInfo& inputInfo, - const std::string& inputName, - std::string* filenames_used = nullptr) { +ov::Tensor create_tensor_from_image(const std::vector& files, + size_t inputId, + size_t batchSize, + const benchmark_app::InputInfo& inputInfo, + const std::string& inputName, + std::string* filenames_used = nullptr) { size_t tensor_size = std::accumulate(inputInfo.dataShape.begin(), inputInfo.dataShape.end(), 1, std::multiplies()); auto allocator = std::make_shared(tensor_size * sizeof(T)); @@ -92,15 +92,15 @@ ov::runtime::Tensor create_tensor_from_image(const std::vector& fil } } - auto tensor = ov::runtime::Tensor(inputInfo.type, inputInfo.dataShape, ov::runtime::Allocator(allocator)); + auto tensor = ov::Tensor(inputInfo.type, inputInfo.dataShape, ov::Allocator(allocator)); return tensor; } template -ov::runtime::Tensor create_tensor_im_info(const std::pair& image_size, - size_t batchSize, - const benchmark_app::InputInfo& inputInfo, - const std::string& inputName) { +ov::Tensor create_tensor_im_info(const std::pair& image_size, + size_t batchSize, + const benchmark_app::InputInfo& inputInfo, + const std::string& inputName) { size_t tensor_size = std::accumulate(inputInfo.dataShape.begin(), inputInfo.dataShape.end(), 1, std::multiplies()); auto allocator = std::make_shared(tensor_size * sizeof(T)); @@ -127,17 +127,17 @@ ov::runtime::Tensor create_tensor_im_info(const std::pair& image } } - auto tensor = ov::runtime::Tensor(inputInfo.type, inputInfo.dataShape, ov::runtime::Allocator(allocator)); + auto tensor = ov::Tensor(inputInfo.type, inputInfo.dataShape, ov::Allocator(allocator)); return tensor; } template -ov::runtime::Tensor create_tensor_from_binary(const std::vector& files, - size_t inputId, - size_t batchSize, - const benchmark_app::InputInfo& inputInfo, - const std::string& inputName, - std::string* filenames_used = nullptr) { +ov::Tensor create_tensor_from_binary(const std::vector& files, + size_t inputId, + size_t batchSize, + const benchmark_app::InputInfo& inputInfo, + const std::string& inputName, + std::string* filenames_used = nullptr) { size_t tensor_size = std::accumulate(inputInfo.dataShape.begin(), inputInfo.dataShape.end(), 1, std::multiplies()); auto allocator = std::make_shared(tensor_size * sizeof(T)); @@ -185,14 +185,14 @@ ov::runtime::Tensor create_tensor_from_binary(const std::vector& fi } } - auto tensor = ov::runtime::Tensor(inputInfo.type, inputInfo.dataShape, ov::runtime::Allocator(allocator)); + auto tensor = ov::Tensor(inputInfo.type, inputInfo.dataShape, ov::Allocator(allocator)); return tensor; } template -ov::runtime::Tensor create_tensor_random(const benchmark_app::InputInfo& inputInfo, - T rand_min = std::numeric_limits::min(), - T rand_max = std::numeric_limits::max()) { +ov::Tensor create_tensor_random(const benchmark_app::InputInfo& inputInfo, + T rand_min = std::numeric_limits::min(), + T rand_max = std::numeric_limits::max()) { size_t tensor_size = std::accumulate(inputInfo.dataShape.begin(), inputInfo.dataShape.end(), 1, std::multiplies()); auto allocator = std::make_shared(tensor_size * sizeof(T)); @@ -204,15 +204,15 @@ ov::runtime::Tensor create_tensor_random(const benchmark_app::InputInfo& inputIn data[i] = static_cast(distribution(gen)); } - auto tensor = ov::runtime::Tensor(inputInfo.type, inputInfo.dataShape, ov::runtime::Allocator(allocator)); + auto tensor = ov::Tensor(inputInfo.type, inputInfo.dataShape, ov::Allocator(allocator)); return tensor; } -ov::runtime::Tensor get_image_tensor(const std::vector& files, - size_t inputId, - size_t batchSize, - const std::pair& inputInfo, - std::string* filenames_used = nullptr) { +ov::Tensor get_image_tensor(const std::vector& files, + size_t inputId, + size_t batchSize, + const std::pair& inputInfo, + std::string* filenames_used = nullptr) { auto type = inputInfo.second.type; if (type == ov::element::f32) { return create_tensor_from_image(files, @@ -254,9 +254,9 @@ ov::runtime::Tensor get_image_tensor(const std::vector& files, } } -ov::runtime::Tensor get_im_info_tensor(const std::pair& image_size, - size_t batchSize, - const std::pair& inputInfo) { +ov::Tensor get_im_info_tensor(const std::pair& image_size, + size_t batchSize, + const std::pair& inputInfo) { auto type = inputInfo.second.type; if (type == ov::element::f32) { return create_tensor_im_info(image_size, batchSize, inputInfo.second, inputInfo.first); @@ -271,11 +271,11 @@ ov::runtime::Tensor get_im_info_tensor(const std::pair& image_si } } -ov::runtime::Tensor get_binary_tensor(const std::vector& files, - size_t inputId, - size_t batchSize, - const std::pair& inputInfo, - std::string* filenames_used = nullptr) { +ov::Tensor get_binary_tensor(const std::vector& files, + size_t inputId, + size_t batchSize, + const std::pair& inputInfo, + std::string* filenames_used = nullptr) { const auto& type = inputInfo.second.type; if (type == ov::element::f32) { return create_tensor_from_binary(files, @@ -317,7 +317,7 @@ ov::runtime::Tensor get_binary_tensor(const std::vector& files, } } -ov::runtime::Tensor get_random_tensor(const std::pair& inputInfo) { +ov::Tensor get_random_tensor(const std::pair& inputInfo) { auto type = inputInfo.second.type; if (type == ov::element::f32) { return create_tensor_random(inputInfo.second); @@ -358,9 +358,9 @@ std::string get_test_info_stream_header(benchmark_app::InputInfo& inputInfo) { return strOut.str(); } -std::map get_tensors(std::map> inputFiles, - std::vector& app_inputs_info) { - std::map tensors; +std::map get_tensors(std::map> inputFiles, + std::vector& app_inputs_info) { + std::map tensors; if (app_inputs_info.empty()) { throw std::logic_error("Inputs Info for network is empty!"); } @@ -519,11 +519,11 @@ std::map get_tensors(std::map get_tensors_static_case(const std::vector& inputFiles, - const size_t& batchSize, - benchmark_app::InputsInfo& app_inputs_info, - size_t requestsNum) { - std::map blobs; +std::map get_tensors_static_case(const std::vector& inputFiles, + const size_t& batchSize, + benchmark_app::InputsInfo& app_inputs_info, + size_t requestsNum) { + std::map blobs; std::vector> net_input_im_sizes; for (auto& item : app_inputs_info) { @@ -691,7 +691,7 @@ std::map get_tensors_static_case(const s return blobs; } -void copy_tensor_data(ov::runtime::Tensor& dst, const ov::runtime::Tensor& src) { +void copy_tensor_data(ov::Tensor& dst, const ov::Tensor& src) { if (src.get_shape() != dst.get_shape() || src.get_byte_size() != dst.get_byte_size()) { throw std::runtime_error( "Source and destination tensors shapes and byte sizes are expected to be equal for data copying."); diff --git a/samples/cpp/benchmark_app/inputs_filling.hpp b/samples/cpp/benchmark_app/inputs_filling.hpp index 921d5d06f50..b802055ea4f 100644 --- a/samples/cpp/benchmark_app/inputs_filling.hpp +++ b/samples/cpp/benchmark_app/inputs_filling.hpp @@ -13,12 +13,12 @@ #include "utils.hpp" // clang-format on -std::map get_tensors(std::map> inputFiles, - std::vector& app_inputs_info); +std::map get_tensors(std::map> inputFiles, + std::vector& app_inputs_info); -std::map get_tensors_static_case(const std::vector& inputFiles, - const size_t& batchSize, - benchmark_app::InputsInfo& app_inputs_info, - size_t requestsNum); +std::map get_tensors_static_case(const std::vector& inputFiles, + const size_t& batchSize, + benchmark_app::InputsInfo& app_inputs_info, + size_t requestsNum); -void copy_tensor_data(ov::runtime::Tensor& dst, const ov::runtime::Tensor& src); +void copy_tensor_data(ov::Tensor& dst, const ov::Tensor& src); diff --git a/samples/cpp/benchmark_app/main.cpp b/samples/cpp/benchmark_app/main.cpp index 8e13fe0f9fe..b953ce90150 100644 --- a/samples/cpp/benchmark_app/main.cpp +++ b/samples/cpp/benchmark_app/main.cpp @@ -113,7 +113,7 @@ static void next_step(const std::string additional_info = "") { int main(int argc, char* argv[]) { std::shared_ptr statistics; try { - ov::runtime::CompiledModel compiledModel; + ov::CompiledModel compiledModel; // ----------------- 1. Parsing and validating input arguments // ------------------------------------------------- @@ -171,7 +171,7 @@ int main(int argc, char* argv[]) { // ----------------------------------------------------------- next_step(); - ov::runtime::Core core; + ov::Core core; if (FLAGS_d.find("CPU") != std::string::npos && !FLAGS_l.empty()) { // CPU (MKLDNN) extensions is loaded as a shared library @@ -464,7 +464,7 @@ int main(int argc, char* argv[]) { next_step(); auto preproc = ov::preprocess::PrePostProcessor(model); - ov::runtime::ConfigMap user_precisions_map; + ov::ConfigMap user_precisions_map; if (!FLAGS_iop.empty()) { user_precisions_map = parseArgMap(FLAGS_iop); } @@ -722,7 +722,7 @@ int main(int argc, char* argv[]) { std::vector<::gpu::BufferType> clInputsBuffer; bool useGpuMem = false; - std::map inputsData; + std::map inputsData; if (isFlagSetInCommandLine("use_device_mem")) { if (device_name.find("GPU") == 0) { inputsData = @@ -1066,7 +1066,7 @@ int main(int argc, char* argv[]) { } if (perf_counts) { - std::vector> perfCounts; + std::vector> perfCounts; for (size_t ireq = 0; ireq < nireq; ireq++) { auto reqPerfCounts = inferRequestsQueue.requests[ireq]->get_performance_counts(); if (FLAGS_pc) { diff --git a/samples/cpp/benchmark_app/remote_tensors_filling.cpp b/samples/cpp/benchmark_app/remote_tensors_filling.cpp index 320fdce1fb8..b8671ef3c22 100644 --- a/samples/cpp/benchmark_app/remote_tensors_filling.cpp +++ b/samples/cpp/benchmark_app/remote_tensors_filling.cpp @@ -65,10 +65,10 @@ void fill_buffer(void* inputBuffer, size_t elementsNum, const ov::element::Type& } } -std::map get_remote_input_tensors( +std::map get_remote_input_tensors( const std::map>& inputFiles, const std::vector& app_inputs_info, - const ov::runtime::CompiledModel& compiledModel, + const ov::CompiledModel& compiledModel, std::vector& clBuffer) { #ifdef HAVE_DEVICE_MEM_SUPPORT slog::info << "Device memory will be used for input and output blobs" << slog::endl; @@ -77,9 +77,9 @@ std::map get_remote_input_tensors( << slog::endl; } - std::map remoteTensors; + std::map remoteTensors; auto context = compiledModel.get_context(); - auto& oclContext = static_cast(context); + auto& oclContext = static_cast(context); auto oclInstance = std::make_shared(oclContext.get()); for (auto& inputs_info : app_inputs_info) { @@ -124,14 +124,13 @@ std::map get_remote_input_tensors( #endif } -std::map get_remote_output_tensors( - const ov::runtime::CompiledModel& compiledModel, - std::map& clBuffer) { +std::map get_remote_output_tensors(const ov::CompiledModel& compiledModel, + std::map& clBuffer) { #ifdef HAVE_DEVICE_MEM_SUPPORT - std::map outputTensors; + std::map outputTensors; for (auto& output : compiledModel.outputs()) { auto context = compiledModel.get_context(); - auto& oclContext = static_cast(context); + auto& oclContext = static_cast(context); auto oclInstance = std::make_shared(oclContext.get()); cl_int err; diff --git a/samples/cpp/benchmark_app/remote_tensors_filling.hpp b/samples/cpp/benchmark_app/remote_tensors_filling.hpp index 06a4ef8ca63..7cb919f565f 100644 --- a/samples/cpp/benchmark_app/remote_tensors_filling.hpp +++ b/samples/cpp/benchmark_app/remote_tensors_filling.hpp @@ -57,13 +57,12 @@ struct OpenCL { using BufferType = void*; #endif -std::map get_remote_input_tensors( +std::map get_remote_input_tensors( const std::map>& inputFiles, const std::vector& app_inputs_info, - const ov::runtime::CompiledModel& compiledModel, + const ov::CompiledModel& compiledModel, std::vector& clBuffer); -std::map get_remote_output_tensors( - const ov::runtime::CompiledModel& compiledModel, - std::map& clBuffer); +std::map get_remote_output_tensors(const ov::CompiledModel& compiledModel, + std::map& clBuffer); } // namespace gpu diff --git a/samples/cpp/benchmark_app/shared_tensor_allocator.hpp b/samples/cpp/benchmark_app/shared_tensor_allocator.hpp index ac4e77d02aa..d24179c75cd 100644 --- a/samples/cpp/benchmark_app/shared_tensor_allocator.hpp +++ b/samples/cpp/benchmark_app/shared_tensor_allocator.hpp @@ -6,7 +6,7 @@ #include "openvino/runtime/allocator.hpp" -class SharedTensorAllocator : public ov::runtime::AllocatorImpl { +class SharedTensorAllocator : public ov::AllocatorImpl { public: SharedTensorAllocator(size_t sizeBytes) : size(sizeBytes) { data = new char[size]; diff --git a/samples/cpp/benchmark_app/statistics_report.cpp b/samples/cpp/benchmark_app/statistics_report.cpp index b1886321d6c..81acb78dea9 100644 --- a/samples/cpp/benchmark_app/statistics_report.cpp +++ b/samples/cpp/benchmark_app/statistics_report.cpp @@ -71,13 +71,13 @@ void StatisticsReport::dump_performance_counters_request(CsvDumper& dumper, cons dumper << layer.node_name; // layer name switch (layer.status) { - case ov::runtime::ProfilingInfo::Status::EXECUTED: + case ov::ProfilingInfo::Status::EXECUTED: dumper << "EXECUTED"; break; - case ov::runtime::ProfilingInfo::Status::NOT_RUN: + case ov::ProfilingInfo::Status::NOT_RUN: dumper << "NOT_RUN"; break; - case ov::runtime::ProfilingInfo::Status::OPTIMIZED_OUT: + case ov::ProfilingInfo::Status::OPTIMIZED_OUT: dumper << "OPTIMIZED_OUT"; break; } @@ -114,7 +114,7 @@ void StatisticsReport::dump_performance_counters(const std::vector performanceCountersAvg; + std::vector performanceCountersAvg; // iterate over each processed infer request and handle its PM data for (size_t i = 0; i < perfCounts.size(); i++) { // iterate over each layer from sorted vector and add required PM data diff --git a/samples/cpp/benchmark_app/statistics_report.hpp b/samples/cpp/benchmark_app/statistics_report.hpp index 6f3c9800cd3..cddf133f18c 100644 --- a/samples/cpp/benchmark_app/statistics_report.hpp +++ b/samples/cpp/benchmark_app/statistics_report.hpp @@ -72,7 +72,7 @@ private: /// @brief Responsible for collecting of statistics and dumping to .csv file class StatisticsReport { public: - typedef std::vector PerformaceCounters; + typedef std::vector PerformaceCounters; typedef std::vector> Parameters; struct Config { diff --git a/samples/cpp/classification_sample_async/README.md b/samples/cpp/classification_sample_async/README.md index cc3625773ea..92ae1875b0b 100644 --- a/samples/cpp/classification_sample_async/README.md +++ b/samples/cpp/classification_sample_async/README.md @@ -9,9 +9,9 @@ Image Classification Async C++ sample application demonstrates how to use the fo | Feature | API | Description | |:--- |:--- |:--- |OpenVINO Runtime Version| `ov::get_openvino_version` | Get Openvino API version -|Available Devices| `ov::runtime::Core::get_available_devices`| Get version information of the devices for inference -| Asynchronous Infer | `ov::runtime::InferRequest::start_async`, `ov::runtime::InferRequest::set_callback` | Do asynchronous inference with callback -|Custom Extension Kernels| `ov::runtime::Core::add_extension`, `ov::runtime::Core::set_config`| Load extension library and config to the device +|Available Devices| `ov::Core::get_available_devices`| Get version information of the devices for inference +| Asynchronous Infer | `ov::InferRequest::start_async`, `ov::InferRequest::set_callback` | Do asynchronous inference with callback +|Custom Extension Kernels| `ov::Core::add_extension`, `ov::Core::set_config`| Load extension library and config to the device | Model Operations | `ov::set_batch`, `ov::get_batch` | Managing of model, operate with its batch size. Setting batch size using input image count. Basic Inference Engine API is covered by [Hello Classification C++ sample](../hello_classification/README.md). diff --git a/samples/cpp/classification_sample_async/main.cpp b/samples/cpp/classification_sample_async/main.cpp index d91fb8462e1..6c052d5fe01 100644 --- a/samples/cpp/classification_sample_async/main.cpp +++ b/samples/cpp/classification_sample_async/main.cpp @@ -80,7 +80,7 @@ int main(int argc, char* argv[]) { throw std::logic_error("No suitable images were found"); // -------- Step 1. Initialize OpenVINO Runtime Core -------- - ov::runtime::Core core; + ov::Core core; // -------- Step 2. Read a model -------- slog::info << "Loading model files:" << slog::endl << FLAGS_m << slog::endl; @@ -145,14 +145,14 @@ int main(int argc, char* argv[]) { // -------- Step 6. Loading model to the device -------- slog::info << "Loading model to the device " << FLAGS_d << slog::endl; - ov::runtime::CompiledModel compiled_model = core.compile_model(model, FLAGS_d); + ov::CompiledModel compiled_model = core.compile_model(model, FLAGS_d); // -------- Step 7. Create infer request -------- slog::info << "Create infer request" << slog::endl; - ov::runtime::InferRequest infer_request = compiled_model.create_infer_request(); + ov::InferRequest infer_request = compiled_model.create_infer_request(); // -------- Step 8. Combine multiple input images as batch -------- - ov::runtime::Tensor input_tensor = infer_request.get_input_tensor(); + ov::Tensor input_tensor = infer_request.get_input_tensor(); for (size_t image_id = 0; image_id < images_data.size(); ++image_id) { const size_t image_size = shape_size(model->input().get_shape()) / batchSize; @@ -199,7 +199,7 @@ int main(int argc, char* argv[]) { slog::info << "Completed async requests execution" << slog::endl; // -------- Step 11. Process output -------- - ov::runtime::Tensor output = infer_request.get_output_tensor(); + ov::Tensor output = infer_request.get_output_tensor(); // Read labels from file (e.x. AlexNet.labels) std::string labelFileName = fileNameNoExt(FLAGS_m) + ".labels"; diff --git a/samples/cpp/common/utils/include/samples/classification_results.h b/samples/cpp/common/utils/include/samples/classification_results.h index a4b1924e57c..e1bc20f733c 100644 --- a/samples/cpp/common/utils/include/samples/classification_results.h +++ b/samples/cpp/common/utils/include/samples/classification_results.h @@ -27,7 +27,7 @@ private: const std::string _probabilityStr = "probability"; const std::string _labelStr = "label"; size_t _nTop; - ov::runtime::Tensor _outTensor; + ov::Tensor _outTensor; const std::vector _labels; const std::vector _imageNames; const size_t _batchSize; @@ -54,7 +54,7 @@ private: * @param output Vector of indexes for the top n places */ template - void topResults(unsigned int n, const ov::runtime::Tensor& input, std::vector& output) { + void topResults(unsigned int n, const ov::Tensor& input, std::vector& output) { ov::Shape shape = input.get_shape(); size_t input_rank = shape.size(); OPENVINO_ASSERT(input_rank != 0 && shape[0] != 0, "Input tensor has incorrect dimensions!"); @@ -89,7 +89,7 @@ private: * @param input 1D blob that contains probabilities * @param output Vector of indexes for the top n places */ - void topResults(unsigned int n, const ov::runtime::Tensor& input, std::vector& output) { + void topResults(unsigned int n, const ov::Tensor& input, std::vector& output) { #define TENSOR_TOP_RESULT(elem_type) \ case ov::element::Type_t::elem_type: { \ using tensor_type = ov::fundamental_type_for; \ @@ -117,7 +117,7 @@ private: } public: - explicit ClassificationResult(const ov::runtime::Tensor& output_tensor, + explicit ClassificationResult(const ov::Tensor& output_tensor, const std::vector& image_names = {}, size_t batch_size = 1, size_t num_of_top = 10, diff --git a/samples/cpp/common/utils/include/samples/common.hpp b/samples/cpp/common/utils/include/samples/common.hpp index ec0c407fe46..64d3bd23b39 100644 --- a/samples/cpp/common/utils/include/samples/common.hpp +++ b/samples/cpp/common/utils/include/samples/common.hpp @@ -551,7 +551,7 @@ static UNUSED bool writeOutputBmp(unsigned char* data, size_t height, size_t wid return true; } -static UNUSED void printPerformanceCounts(const std::map& performanceMap, +static UNUSED void printPerformanceCounts(const std::map& performanceMap, std::ostream& stream, std::string deviceName, bool bshowHeader = true) { @@ -573,13 +573,13 @@ static UNUSED void printPerformanceCounts(const std::map devices = core.get_available_devices(); std::cout << std::endl; @@ -976,7 +976,7 @@ inline void showAvailableDevices() { */ std::map parseConfig(const std::string& configName, char comment = '#'); -inline std::string getFullDeviceName(ov::runtime::Core& core, std::string device) { +inline std::string getFullDeviceName(ov::Core& core, std::string device) { ov::Any p; try { p = core.get_metric(device, METRIC_KEY(FULL_DEVICE_NAME)); @@ -986,7 +986,7 @@ inline std::string getFullDeviceName(ov::runtime::Core& core, std::string device } } -static UNUSED void printPerformanceCounts(std::vector performanceData, +static UNUSED void printPerformanceCounts(std::vector performanceData, std::ostream& stream, std::string deviceName, bool bshowHeader = true) { @@ -1007,13 +1007,13 @@ static UNUSED void printPerformanceCounts(std::vector(tDesc, mat.data); } -static UNUSED ov::runtime::Tensor wrapMat2Tensor(const cv::Mat& mat) { +static UNUSED ov::Tensor wrapMat2Tensor(const cv::Mat& mat) { const size_t channels = mat.channels(); const size_t height = mat.size().height; const size_t width = mat.size().width; @@ -90,5 +90,5 @@ static UNUSED ov::runtime::Tensor wrapMat2Tensor(const cv::Mat& mat) { const bool is_dense = strideW == channels && strideH == channels * width; OPENVINO_ASSERT(is_dense, "Doesn't support conversion from not dense cv::Mat"); - return ov::runtime::Tensor(ov::element::u8, ov::Shape{1, height, width, channels}, mat.data); + return ov::Tensor(ov::element::u8, ov::Shape{1, height, width, channels}, mat.data); } diff --git a/samples/cpp/hello_classification/README.md b/samples/cpp/hello_classification/README.md index 7024b8f28e9..26996b2f75d 100644 --- a/samples/cpp/hello_classification/README.md +++ b/samples/cpp/hello_classification/README.md @@ -6,10 +6,10 @@ Hello Classification C++ sample application demonstrates how to use the followin | Feature | API | Description | |:--- |:--- |:--- -| Basic Infer Flow | `ov::runtime::Core::read_model`, `ov::runtime::Core::compile_model`, `ov::runtime::CompiledModel::create_infer_request`, `ov::runtime::InferRequest::get_input_tensor`, `ov::runtime::InferRequest::set_input_tensor`, `ov::runtime::InferRequest::get_output_tensor` | Common API to do inference: configure input and output tensors, reading model, create infer request -| Synchronous Infer | `ov::runtime::InferRequest::infer` | Do synchronous inference +| Basic Infer Flow | `ov::Core::read_model`, `ov::Core::compile_model`, `ov::CompiledModel::create_infer_request`, `ov::InferRequest::get_input_tensor`, `ov::InferRequest::set_input_tensor`, `ov::InferRequest::get_output_tensor` | Common API to do inference: configure input and output tensors, reading model, create infer request +| Synchronous Infer | `ov::InferRequest::infer` | Do synchronous inference | Model Operations | `ov::Model::inputs`, `ov::Model::outputs` | Managing of model -| Tensor Operations| `ov::runtime::Tensor::get_element_type`, `ov::runtime::Tensor::get_shape`, `ov::runtime::Tensor::data` | Work with storing inputs, outputs of the model, weights and biases of the layers +| Tensor Operations| `ov::Tensor::get_element_type`, `ov::Tensor::get_shape`, `ov::Tensor::data` | Work with storing inputs, outputs of the model, weights and biases of the layers | Input auto-resize | `ov::preprocess::PreProcessSteps::resize`, `ov::preprocess::InputInfo::model::set_layout` | Set image of the original size as input for a model with other input size. Resize and layout conversions will be performed automatically by the corresponding plugin just before inference | Options | Values | diff --git a/samples/cpp/hello_classification/main.cpp b/samples/cpp/hello_classification/main.cpp index f5b458a3a81..b5cbe3ec1c5 100644 --- a/samples/cpp/hello_classification/main.cpp +++ b/samples/cpp/hello_classification/main.cpp @@ -38,7 +38,7 @@ int tmain(int argc, tchar* argv[]) { const std::string device_name = TSTRING2STRING(argv[3]); // -------- Step 1. Initialize OpenVINO Runtime Core -------- - ov::runtime::Core core; + ov::Core core; // -------- Step 2. Read a model -------- slog::info << "Loading model files: " << model_path << slog::endl; @@ -63,8 +63,8 @@ int tmain(int argc, tchar* argv[]) { ov::Shape input_shape = {1, reader->height(), reader->width(), 3}; std::shared_ptr input_data = reader->getData(); - // just wrap image data by ov::runtime::Tensor without allocating of new memory - ov::runtime::Tensor input_tensor = ov::runtime::Tensor(input_type, input_shape, input_data.get()); + // just wrap image data by ov::Tensor without allocating of new memory + ov::Tensor input_tensor = ov::Tensor(input_type, input_shape, input_data.get()); const ov::Shape tensor_shape = input_tensor.get_shape(); const ov::Layout tensor_layout{"NHWC"}; @@ -98,10 +98,10 @@ int tmain(int argc, tchar* argv[]) { model = ppp.build(); // -------- Step 5. Loading a model to the device -------- - ov::runtime::CompiledModel compiled_model = core.compile_model(model, device_name); + ov::CompiledModel compiled_model = core.compile_model(model, device_name); // -------- Step 6. Create an infer request -------- - ov::runtime::InferRequest infer_request = compiled_model.create_infer_request(); + ov::InferRequest infer_request = compiled_model.create_infer_request(); // ----------------------------------------------------------------------------------------------------- // -------- Step 7. Prepare input -------- @@ -111,7 +111,7 @@ int tmain(int argc, tchar* argv[]) { infer_request.infer(); // -------- Step 9. Process output - const ov::runtime::Tensor& output_tensor = infer_request.get_output_tensor(); + const ov::Tensor& output_tensor = infer_request.get_output_tensor(); // Print classification results ClassificationResult classification_result(output_tensor, {image_path}); diff --git a/samples/cpp/hello_nv12_input_classification/README.md b/samples/cpp/hello_nv12_input_classification/README.md index d4b9a07442d..bfd0124faa7 100644 --- a/samples/cpp/hello_nv12_input_classification/README.md +++ b/samples/cpp/hello_nv12_input_classification/README.md @@ -6,8 +6,8 @@ Hello NV12 Input Classification C++ Sample demonstrates how to use the NV12 auto | Feature | API | Description | |:--- |:--- |:--- -|OpenVINO Runtime Core Operations| `ov::runtime::Core::get_metric` | Gets general runtime metric for dedicated hardware -| Tensor Operations | `ov::runtime::Tensor::get_element_type`, `ov::runtime::Tensor::get_shape`, `ov::runtime::Tensor::data` | Work with storing inputs, outputs of the model, weights and biases of the layers +|OpenVINO Runtime Core Operations| `ov::Core::get_metric` | Gets general runtime metric for dedicated hardware +| Tensor Operations | `ov::Tensor::get_element_type`, `ov::Tensor::get_shape`, `ov::Tensor::data` | Work with storing inputs, outputs of the model, weights and biases of the layers | Input in N12 color format | `ov::preprocess::InputTensorInfo::set_color_format` | Change the color format of the input data | Model Input Reshape | `ov::Model::get_output_shape`, `ov::Model::reshape`, `ov::get_batch` | Set the batch size equal to the number of input images diff --git a/samples/cpp/hello_nv12_input_classification/main.cpp b/samples/cpp/hello_nv12_input_classification/main.cpp index 80d50ba2a0e..4798b8451c0 100644 --- a/samples/cpp/hello_nv12_input_classification/main.cpp +++ b/samples/cpp/hello_nv12_input_classification/main.cpp @@ -97,7 +97,7 @@ int main(int argc, char* argv[]) { // ----------------------------------------------------------------------------------------------------- // -------- Step 1. Initialize OpenVINO Runtime Core --------- - ov::runtime::Core core; + ov::Core core; // -------- Step 2. Read a model -------- slog::info << "Loading model files: " << model_path << slog::endl; @@ -138,17 +138,15 @@ int main(int argc, char* argv[]) { model = ppp.build(); // -------- Step 4. Loading a model to the device -------- - ov::runtime::CompiledModel compiled_model = core.compile_model(model, device_name); + ov::CompiledModel compiled_model = core.compile_model(model, device_name); // -------- Step 5. Create an infer request -------- - ov::runtime::InferRequest infer_request = compiled_model.create_infer_request(); + ov::InferRequest infer_request = compiled_model.create_infer_request(); // -------- Step 6. Prepare input data -------- std::shared_ptr image_data = reader->getData(input_width, input_height); - ov::runtime::Tensor input_tensor{ov::element::u8, - {batch, input_height * 3 / 2, input_width, 1}, - image_data.get()}; + ov::Tensor input_tensor{ov::element::u8, {batch, input_height * 3 / 2, input_width, 1}, image_data.get()}; // Read labels from file (e.x. AlexNet.labels) std::string labelFileName = fileNameNoExt(model_path) + ".labels"; @@ -173,7 +171,7 @@ int main(int argc, char* argv[]) { infer_request.infer(); // -------- Step 8. Process output -------- - ov::runtime::Tensor output = infer_request.get_tensor(output_tensor_name); + ov::Tensor output = infer_request.get_tensor(output_tensor_name); // Print classification results ClassificationResult classification_result(output, {image_path}, batch, N_TOP_RESULTS, labels); diff --git a/samples/cpp/hello_query_device/README.md b/samples/cpp/hello_query_device/README.md index 4f41f5ae2af..af7aac6fb66 100644 --- a/samples/cpp/hello_query_device/README.md +++ b/samples/cpp/hello_query_device/README.md @@ -6,7 +6,7 @@ Hello Query Device C++ sample application demonstrates how to use the following | Feature | API | Description | |:--- |:--- |:--- -|Available Devices|`ov::runtime::Core::get_available_devices`, `ov::runtime::Core::get_metric`, `ov::runtime::Core::get_config`| Get available devices information and configuration for inference +|Available Devices|`ov::Core::get_available_devices`, `ov::Core::get_metric`, `ov::Core::get_config`| Get available devices information and configuration for inference Basic Inference Engine API is covered by [Hello Classification C++ sample](../hello_classification/README.md). diff --git a/samples/cpp/hello_query_device/main.cpp b/samples/cpp/hello_query_device/main.cpp index 42d2cbd7709..31673560a25 100644 --- a/samples/cpp/hello_query_device/main.cpp +++ b/samples/cpp/hello_query_device/main.cpp @@ -95,7 +95,7 @@ int main(int argc, char* argv[]) { } // -------- Step 1. Initialize OpenVINO Runtime Core -------- - ov::runtime::Core core; + ov::Core core; // -------- Step 2. Get list of available devices -------- std::vector availableDevices = core.get_available_devices(); diff --git a/samples/cpp/hello_reshape_ssd/README.md b/samples/cpp/hello_reshape_ssd/README.md index 7a4634c6f29..151d7a85c3b 100644 --- a/samples/cpp/hello_reshape_ssd/README.md +++ b/samples/cpp/hello_reshape_ssd/README.md @@ -6,9 +6,9 @@ Hello Reshape SSD C++ sample application demonstrates how to use the following I | Feature | API | Description | |:--- |:--- |:--- -| Model Operations | `ov::runtime::Core::read_model`, `ov::runtime::Core::compile_model` | Managing of model +| Model Operations | `ov::Core::read_model`, `ov::Core::compile_model` | Managing of model | Model Input Reshape | `ov::Model::reshape`| Resize model to match image sizes and given batch -| Tensor Operations | `ov::runtime::Tensor::get_element_type`, `ov::runtime::Tensor::get_shape`, `ov::runtime::Tensor::data` | Work with storing inputs, outputs of the model, weights and biases of the layers +| Tensor Operations | `ov::Tensor::get_element_type`, `ov::Tensor::get_shape`, `ov::Tensor::data` | Work with storing inputs, outputs of the model, weights and biases of the layers Basic Inference Engine API is covered by [Hello Classification C++ sample](../hello_classification/README.md). diff --git a/samples/cpp/hello_reshape_ssd/main.cpp b/samples/cpp/hello_reshape_ssd/main.cpp index 1c49bbaeafc..495f4bee41d 100644 --- a/samples/cpp/hello_reshape_ssd/main.cpp +++ b/samples/cpp/hello_reshape_ssd/main.cpp @@ -37,7 +37,7 @@ int main(int argc, char* argv[]) { // ------------------------------------------------------------------- // Step 1. Initialize inference engine core - ov::runtime::Core core; + ov::Core core; // ------------------------------------------------------------------- // Step 2. Read a model @@ -126,14 +126,14 @@ int main(int argc, char* argv[]) { // ------------------------------------------------------------------- // Step 7. Loading a model to the device - ov::runtime::CompiledModel compiled_model = core.compile_model(model, device_name); + ov::CompiledModel compiled_model = core.compile_model(model, device_name); // ------------------------------------------------------------------- // Step 8. Create an infer request - ov::runtime::InferRequest infer_request = compiled_model.create_infer_request(); + ov::InferRequest infer_request = compiled_model.create_infer_request(); // Step 9. Fill model with input data - ov::runtime::Tensor input_tensor = infer_request.get_input_tensor(); + ov::Tensor input_tensor = infer_request.get_input_tensor(); // copy NHWC data from image to tensor with batch unsigned char* image_data_ptr = image_data.get(); @@ -148,7 +148,7 @@ int main(int argc, char* argv[]) { infer_request.infer(); // Step 11. Get output data from the model - ov::runtime::Tensor output_tensor = infer_request.get_output_tensor(); + ov::Tensor output_tensor = infer_request.get_output_tensor(); ov::Shape output_shape = model->output().get_shape(); const size_t ssd_object_count = output_shape[2]; diff --git a/samples/cpp/ngraph_function_creation_sample/README.md b/samples/cpp/ngraph_function_creation_sample/README.md index 8d94bf29060..bfa86a00af5 100644 --- a/samples/cpp/ngraph_function_creation_sample/README.md +++ b/samples/cpp/ngraph_function_creation_sample/README.md @@ -11,7 +11,7 @@ nGraph Function Creation C++ Sample demonstrates the following Inference Engine | Feature | API | Description | |:--- |:--- |:--- |OpenVINO Runtime Version| `ov::get_openvino_versio` | Get Openvino API version -|Available Devices|`ov::runtime::Core::get_available_devices`| Get version information of the devices for inference +|Available Devices|`ov::Core::get_available_devices`| Get version information of the devices for inference | Model Operations | `ov::set_batch`, `ov::get_batch` | Managing of model, operate with its batch size. Setting batch size using input image count. |nGraph Functions| `ov::op`, `ov::Node`, `ov::Shape::Shape`, `ov::Strides::Strides`, `ov::CoordinateDiff::CoordinateDiff`, `ov::Node::set_friendly_name`, `ov::shape_size`, `ov::ParameterVector::vector` | Illustrates how to construct an nGraph function diff --git a/samples/cpp/ngraph_function_creation_sample/main.cpp b/samples/cpp/ngraph_function_creation_sample/main.cpp index 5b057d7a2e1..cb552cdf76c 100644 --- a/samples/cpp/ngraph_function_creation_sample/main.cpp +++ b/samples/cpp/ngraph_function_creation_sample/main.cpp @@ -38,7 +38,7 @@ using namespace ov::preprocess; * @param maxSize length of file * @return none */ -void readFile(const std::string& file_name, void* buffer, size_t maxSize) { +void read_file(const std::string& file_name, void* buffer, size_t maxSize) { std::ifstream input_file; input_file.open(file_name, std::ios::binary | std::ios::in); @@ -59,7 +59,7 @@ void readFile(const std::string& file_name, void* buffer, size_t maxSize) { * @param filepath string * @return weightsPtr tensor blob */ -ov::runtime::Tensor ReadWeights(const std::string& filepath) { +ov::Tensor read_weights(const std::string& filepath) { std::ifstream weightFile(filepath, std::ifstream::ate | std::ifstream::binary); int64_t fileSize = weightFile.tellg(); @@ -67,8 +67,8 @@ ov::runtime::Tensor ReadWeights(const std::string& filepath) { "Incorrect weights file. This sample works only with LeNet " "classification model."); - ov::runtime::Tensor weights(ov::element::u8, {static_cast(fileSize)}); - readFile(filepath, weights.data(), weights.get_byte_size()); + ov::Tensor weights(ov::element::u8, {static_cast(fileSize)}); + read_file(filepath, weights.data(), weights.get_byte_size()); return std::move(weights); } @@ -77,8 +77,8 @@ ov::runtime::Tensor ReadWeights(const std::string& filepath) { * @brief Create ngraph function * @return Ptr to ngraph function */ -std::shared_ptr createNgraphFunction(const std::string& path_to_weights) { - const ov::runtime::Tensor weights = ReadWeights(path_to_weights); +std::shared_ptr create_model(const std::string& path_to_weights) { + const ov::Tensor weights = read_weights(path_to_weights); const std::uint8_t* data = weights.data(); // -------input------ @@ -233,14 +233,14 @@ int main(int argc, char* argv[]) { const std::string device_name{argv[2]}; // -------- Step 1. Initialize OpenVINO Runtime Core object -------- - runtime::Core core; + ov::Core core; slog::info << "Device info: " << slog::endl; slog::info << core.get_versions(device_name) << slog::endl; // -------- Step 2. Create network using ov::Function -------- slog::info << "Create model from weights: " << weights_path << slog::endl; - std::shared_ptr model = createNgraphFunction(weights_path); + std::shared_ptr model = create_model(weights_path); printInputAndOutputsInfo(*model); OPENVINO_ASSERT(model->inputs().size() == 1, "Incorrect number of inputs for LeNet"); @@ -285,15 +285,15 @@ int main(int argc, char* argv[]) { // -------- Step 5. Compiling model for the device -------- slog::info << "Compiling a model for the " << device_name << " device" << slog::endl; - runtime::CompiledModel compiled_model = core.compile_model(model, device_name); + ov::CompiledModel compiled_model = core.compile_model(model, device_name); // -------- Step 6. Create infer request -------- slog::info << "Create infer request" << slog::endl; - runtime::InferRequest infer_request = compiled_model.create_infer_request(); + ov::InferRequest infer_request = compiled_model.create_infer_request(); // -------- Step 7. Combine multiple input images as batch -------- slog::info << "Combine images in batch and set to input tensor" << slog::endl; - runtime::Tensor input_tensor = infer_request.get_input_tensor(); + ov::Tensor input_tensor = infer_request.get_input_tensor(); // Iterate over all input images and copy data to input tensor for (size_t image_id = 0; image_id < digits.size(); ++image_id) { @@ -307,7 +307,7 @@ int main(int argc, char* argv[]) { // -------- Step 9. Process output -------- slog::info << "Processing output tensor" << slog::endl; - const runtime::Tensor output_tensor = infer_request.get_output_tensor(); + const ov::Tensor output_tensor = infer_request.get_output_tensor(); const std::vector lenet_labels{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}; diff --git a/samples/cpp/speech_sample/README.md b/samples/cpp/speech_sample/README.md index 4ab9b638335..1ef53db097d 100644 --- a/samples/cpp/speech_sample/README.md +++ b/samples/cpp/speech_sample/README.md @@ -9,13 +9,13 @@ Automatic Speech Recognition C++ sample application demonstrates how to use the | Feature | API | Description | |:--- |:--- |:--- |OpenVINO Runtime Version| `ov::get_openvino_versio` | Get Openvino API version -|Available Devices|`ov::runtime::Core::get_available_devices`| Get version information of the devices for inference +|Available Devices|`ov::Core::get_available_devices`| Get version information of the devices for inference | Model Operations | `ov::set_batch`, `ov::get_batch` | Managing of model, operate with its batch size. Setting batch size using input image count. |Model Operations|`ov::Model::add_output`| Change names of output layers in the model -|Import Model|`ov::runtime::CompiledModel::export_model`,`ov::runtime::Core::import_model`| Creates a CompiledModel from a previously exported model -|Asynchronous Infer| `ov::runtime::InferRequest::start_async`, `ov::runtime::InferRequest::wait`| Do asynchronous inference and waits until inference result becomes available -|InferRequest Operations|`ov::runtime::InferRequest::query_state`, `ov::runtime::VariableState::reset`| Gets and resets state control interface for given CompiledModel -|InferRequest Operations|`ov::runtime::InferRequest::get_profiling_info`| Get profiling info for infer request +|Import Model|`ov::CompiledModel::export_model`,`ov::Core::import_model`| Creates a CompiledModel from a previously exported model +|Asynchronous Infer| `ov::InferRequest::start_async`, `ov::InferRequest::wait`| Do asynchronous inference and waits until inference result becomes available +|InferRequest Operations|`ov::InferRequest::query_state`, `ov::VariableState::reset`| Gets and resets state control interface for given CompiledModel +|InferRequest Operations|`ov::InferRequest::get_profiling_info`| Get profiling info for infer request Basic Inference Engine API is covered by [Hello Classification C++ sample](../hello_classification/README.md). diff --git a/samples/cpp/speech_sample/main.cpp b/samples/cpp/speech_sample/main.cpp index fefc5ae4cce..504e284947e 100644 --- a/samples/cpp/speech_sample/main.cpp +++ b/samples/cpp/speech_sample/main.cpp @@ -81,7 +81,7 @@ int main(int argc, char* argv[]) { // --------------------------- Step 1. Initialize inference engine core and read model // ------------------------------------- - ov::runtime::Core core; + ov::Core core; slog::info << "Loading model files:" << slog::endl << FLAGS_m << slog::endl; std::shared_ptr model = core.read_model(FLAGS_m); check_number_of_inputs(model->inputs().size(), numInputFiles); @@ -215,7 +215,7 @@ int main(int argc, char* argv[]) { ms loadTime = std::chrono::duration_cast(Time::now() - t0); slog::info << "Model loading time " << loadTime.count() << " ms" << slog::endl; slog::info << "Loading model to the device " << FLAGS_d << slog::endl; - ov::runtime::CompiledModel executableNet; + ov::CompiledModel executableNet; if (!FLAGS_m.empty()) { slog::info << "Loading model to the device" << slog::endl; executableNet = core.compile_model(model, deviceStr, genericPluginConfig); @@ -247,7 +247,7 @@ int main(int argc, char* argv[]) { } // --------------------------- Step 4. Configure input & output // -------------------------------------------------- - std::vector ptrInputBlobs; + std::vector ptrInputBlobs; auto cInputInfo = executableNet.inputs(); check_number_of_inputs(cInputInfo.size(), numInputFiles); if (!FLAGS_iname.empty()) { @@ -259,7 +259,7 @@ int main(int argc, char* argv[]) { throw std::logic_error(errMessage); } for (const auto& input : inputNameBlobs) { - ov::runtime::Tensor blob = inferRequests.begin()->inferRequest.get_tensor(input); + ov::Tensor blob = inferRequests.begin()->inferRequest.get_tensor(input); if (!blob) { std::string errMessage("No blob with name : " + input); throw std::logic_error(errMessage); @@ -302,7 +302,7 @@ int main(int argc, char* argv[]) { } /** Work with each utterance **/ for (uint32_t utteranceIndex = 0; utteranceIndex < numUtterances; ++utteranceIndex) { - std::map utterancePerfMap; + std::map utterancePerfMap; uint64_t totalNumberOfRunsOnHw = 0; std::string uttName; uint32_t numFrames(0), n(0); @@ -381,7 +381,7 @@ int main(int argc, char* argv[]) { for (auto& ut : ptrUtterances) { inputFrame.push_back(&ut.front()); } - std::map callPerfMap; + std::map callPerfMap; size_t frameIndex = 0; uint32_t numFramesFile = numFrames; numFrames += FLAGS_cw_l + FLAGS_cw_r; @@ -415,7 +415,7 @@ int main(int argc, char* argv[]) { outputFrame = &ptrScores.front() + numScoresPerFrame * sizeof(float) * (inferRequest.frameIndex); - ov::runtime::Tensor outputBlob = + ov::Tensor outputBlob = inferRequest.inferRequest.get_tensor(executableNet.outputs()[0]); if (!FLAGS_oname.empty()) outputBlob = @@ -426,7 +426,7 @@ int main(int argc, char* argv[]) { } if (!FLAGS_r.empty()) { /** Compare output data with reference scores **/ - ov::runtime::Tensor outputBlob = + ov::Tensor outputBlob = inferRequest.inferRequest.get_tensor(executableNet.outputs()[0]); if (!FLAGS_oname.empty()) outputBlob = @@ -458,7 +458,7 @@ int main(int argc, char* argv[]) { for (int i = 0; i < model->inputs().size(); i++) { inferRequest.inferRequest.set_input_tensor( i, - ov::runtime::Tensor(ov::element::f32, model->inputs()[i].get_shape(), inputFrame[0])); + ov::Tensor(ov::element::f32, model->inputs()[i].get_shape(), inputFrame[0])); } /* Starting inference in asynchronous mode*/ inferRequest.inferRequest.start_async(); diff --git a/samples/cpp/speech_sample/utils.hpp b/samples/cpp/speech_sample/utils.hpp index 5f26e887d04..00271ecd34c 100644 --- a/samples/cpp/speech_sample/utils.hpp +++ b/samples/cpp/speech_sample/utils.hpp @@ -35,7 +35,7 @@ struct ScoreErrorT { * @brief struct to store infer request data per frame */ struct InferRequestStruct { - ov::runtime::InferRequest inferRequest; + ov::InferRequest inferRequest; int frameIndex; uint32_t numFramesThisBatch; }; @@ -282,7 +282,7 @@ void print_reference_compare_results(ScoreErrorT const& totalError, size_t frame * @param FLAGS_d flag of device * @return none. */ -void print_performance_counters(std::map const& utterancePerfMap, +void print_performance_counters(std::map const& utterancePerfMap, size_t numberOfFrames, std::ostream& stream, std::string fullDeviceName, @@ -331,8 +331,7 @@ void print_performance_counters(std::map& perfCounters) { +void get_performance_counters(ov::InferRequest& request, std::map& perfCounters) { auto retPerfCounters = request.get_profiling_info(); for (const auto& element : retPerfCounters) { @@ -347,8 +346,8 @@ void get_performance_counters(ov::runtime::InferRequest& request, * @param totalRunsOnHw reference to a total number of frames computed on GNA HW * @return none. */ -void sum_performance_counters(std::map const& perfCounters, - std::map& totalPerfCounters, +void sum_performance_counters(std::map const& perfCounters, + std::map& totalPerfCounters, uint64_t& totalRunsOnHw) { auto runOnHw = false; for (const auto& pair : perfCounters) { diff --git a/src/bindings/python/src/pyopenvino/core/async_infer_queue.cpp b/src/bindings/python/src/pyopenvino/core/async_infer_queue.cpp index 39bcc88f73d..f06855a8a07 100644 --- a/src/bindings/python/src/pyopenvino/core/async_infer_queue.cpp +++ b/src/bindings/python/src/pyopenvino/core/async_infer_queue.cpp @@ -119,7 +119,7 @@ public: void regclass_AsyncInferQueue(py::module m) { py::class_> cls(m, "AsyncInferQueue"); - cls.def(py::init([](ov::runtime::CompiledModel& net, size_t jobs) { + cls.def(py::init([](ov::CompiledModel& net, size_t jobs) { if (jobs == 0) { jobs = (size_t)Common::get_optimal_number_of_requests(net); } diff --git a/src/bindings/python/src/pyopenvino/core/common.cpp b/src/bindings/python/src/pyopenvino/core/common.cpp index d29ac5f048f..2562389ec38 100644 --- a/src/bindings/python/src/pyopenvino/core/common.cpp +++ b/src/bindings/python/src/pyopenvino/core/common.cpp @@ -47,7 +47,7 @@ const std::map& dtype_to_ov_type() { return dtype_to_ov_type_mapping; } -ov::runtime::Tensor tensor_from_numpy(py::array& array, bool shared_memory) { +ov::Tensor tensor_from_numpy(py::array& array, bool shared_memory) { // Check if passed array has C-style contiguous memory layout. bool is_contiguous = C_CONTIGUOUS == (array.flags() & C_CONTIGUOUS); auto type = Common::dtype_to_ov_type().at(py::str(array.dtype())); @@ -59,7 +59,7 @@ ov::runtime::Tensor tensor_from_numpy(py::array& array, bool shared_memory) { if (shared_memory) { if (is_contiguous) { std::vector strides(array.strides(), array.strides() + array.ndim()); - return ov::runtime::Tensor(type, shape, const_cast(array.data(0)), strides); + return ov::Tensor(type, shape, const_cast(array.data(0)), strides); } else { throw ov::Exception("Tensor with shared memory must be C contiguous!"); } @@ -69,7 +69,7 @@ ov::runtime::Tensor tensor_from_numpy(py::array& array, bool shared_memory) { array = Common::as_contiguous(array, type); } // Create actual Tensor and copy data. - auto tensor = ov::runtime::Tensor(type, shape); + auto tensor = ov::Tensor(type, shape); // If ndim of py::array is 0, array is a numpy scalar. That results in size to be equal to 0. // To gain access to actual raw/low-level data, it is needed to use buffer protocol. py::buffer_info buf = array.request(); @@ -117,8 +117,8 @@ py::array as_contiguous(py::array& array, ov::element::Type type) { } } -const ov::runtime::Tensor& cast_to_tensor(const py::handle& tensor) { - return tensor.cast(); +const ov::Tensor& cast_to_tensor(const py::handle& tensor) { + return tensor.cast(); } const Containers::TensorNameMap cast_to_tensor_name_map(const py::dict& inputs) { @@ -130,7 +130,7 @@ const Containers::TensorNameMap cast_to_tensor_name_map(const py::dict& inputs) } else { throw py::type_error("incompatible function arguments!"); } - if (py::isinstance(input.second)) { + if (py::isinstance(input.second)) { auto tensor = Common::cast_to_tensor(input.second); result_map[name] = tensor; } else { @@ -149,7 +149,7 @@ const Containers::TensorIndexMap cast_to_tensor_index_map(const py::dict& inputs } else { throw py::type_error("incompatible function arguments!"); } - if (py::isinstance(input.second)) { + if (py::isinstance(input.second)) { auto tensor = Common::cast_to_tensor(input.second); result_map[idx] = tensor; } else { @@ -159,7 +159,7 @@ const Containers::TensorIndexMap cast_to_tensor_index_map(const py::dict& inputs return result_map; } -void set_request_tensors(ov::runtime::InferRequest& request, const py::dict& inputs) { +void set_request_tensors(ov::InferRequest& request, const py::dict& inputs) { if (!inputs.empty()) { for (auto&& input : inputs) { if (py::isinstance(input.first)) { @@ -294,7 +294,7 @@ PyAny from_ov_any(const ov::Any& any) { } } -uint32_t get_optimal_number_of_requests(const ov::runtime::CompiledModel& actual) { +uint32_t get_optimal_number_of_requests(const ov::CompiledModel& actual) { try { auto parameter_value = actual.get_metric(METRIC_KEY(SUPPORTED_METRICS)); auto supported_metrics = parameter_value.as>(); @@ -315,10 +315,10 @@ uint32_t get_optimal_number_of_requests(const ov::runtime::CompiledModel& actual } } -py::dict outputs_to_dict(const std::vector>& outputs, ov::runtime::InferRequest& request) { +py::dict outputs_to_dict(const std::vector>& outputs, ov::InferRequest& request) { py::dict res; for (const auto& out : outputs) { - ov::runtime::Tensor t{request.get_tensor(out)}; + ov::Tensor t{request.get_tensor(out)}; switch (t.get_element_type()) { case ov::element::Type_t::i8: { res[py::cast(out)] = py::array_t(t.get_shape(), t.data()); diff --git a/src/bindings/python/src/pyopenvino/core/common.hpp b/src/bindings/python/src/pyopenvino/core/common.hpp index 119e78d6a37..10faf5549be 100644 --- a/src/bindings/python/src/pyopenvino/core/common.hpp +++ b/src/bindings/python/src/pyopenvino/core/common.hpp @@ -28,23 +28,23 @@ const std::map& ov_type_to_dtype(); const std::map& dtype_to_ov_type(); -ov::runtime::Tensor tensor_from_numpy(py::array& array, bool shared_memory); +ov::Tensor tensor_from_numpy(py::array& array, bool shared_memory); py::array as_contiguous(py::array& array, ov::element::Type type); -const ov::runtime::Tensor& cast_to_tensor(const py::handle& tensor); +const ov::Tensor& cast_to_tensor(const py::handle& tensor); const Containers::TensorNameMap cast_to_tensor_name_map(const py::dict& inputs); const Containers::TensorIndexMap cast_to_tensor_index_map(const py::dict& inputs); -void set_request_tensors(ov::runtime::InferRequest& request, const py::dict& inputs); +void set_request_tensors(ov::InferRequest& request, const py::dict& inputs); PyAny from_ov_any(const ov::Any& any); -uint32_t get_optimal_number_of_requests(const ov::runtime::CompiledModel& actual); +uint32_t get_optimal_number_of_requests(const ov::CompiledModel& actual); -py::dict outputs_to_dict(const std::vector>& outputs, ov::runtime::InferRequest& request); +py::dict outputs_to_dict(const std::vector>& outputs, ov::InferRequest& request); // Use only with classes that are not creatable by users on Python's side, because // Objects created in Python that are wrapped with such wrapper will cause memory leaks. diff --git a/src/bindings/python/src/pyopenvino/core/compiled_model.cpp b/src/bindings/python/src/pyopenvino/core/compiled_model.cpp index 7e9796c8e63..540cd0a45c4 100644 --- a/src/bindings/python/src/pyopenvino/core/compiled_model.cpp +++ b/src/bindings/python/src/pyopenvino/core/compiled_model.cpp @@ -16,20 +16,20 @@ PYBIND11_MAKE_OPAQUE(Containers::TensorNameMap); namespace py = pybind11; void regclass_CompiledModel(py::module m) { - py::class_> cls(m, "CompiledModel"); + py::class_> cls(m, "CompiledModel"); - cls.def(py::init([](ov::runtime::CompiledModel& other) { + cls.def(py::init([](ov::CompiledModel& other) { return other; }), py::arg("other")); - cls.def("create_infer_request", [](ov::runtime::CompiledModel& self) { + cls.def("create_infer_request", [](ov::CompiledModel& self) { return InferRequestWrapper(self.create_infer_request(), self.inputs(), self.outputs()); }); cls.def( "infer_new_request", - [](ov::runtime::CompiledModel& self, const py::dict& inputs) { + [](ov::CompiledModel& self, const py::dict& inputs) { auto request = self.create_infer_request(); // Update inputs if there are any Common::set_request_tensors(request, inputs); @@ -38,51 +38,45 @@ void regclass_CompiledModel(py::module m) { }, py::arg("inputs")); - cls.def("export_model", &ov::runtime::CompiledModel::export_model, py::arg("model_stream")); + cls.def("export_model", &ov::CompiledModel::export_model, py::arg("model_stream")); cls.def( "get_config", - [](ov::runtime::CompiledModel& self, const std::string& name) -> py::object { + [](ov::CompiledModel& self, const std::string& name) -> py::object { return Common::from_ov_any(self.get_config(name)).as(); }, py::arg("name")); cls.def( "get_metric", - [](ov::runtime::CompiledModel& self, const std::string& name) -> py::object { + [](ov::CompiledModel& self, const std::string& name) -> py::object { return Common::from_ov_any(self.get_metric(name)).as(); }, py::arg("name")); - cls.def("get_runtime_model", &ov::runtime::CompiledModel::get_runtime_model); + cls.def("get_runtime_model", &ov::CompiledModel::get_runtime_model); - cls.def_property_readonly("inputs", &ov::runtime::CompiledModel::inputs); + cls.def_property_readonly("inputs", &ov::CompiledModel::inputs); + + cls.def("input", (ov::Output(ov::CompiledModel::*)() const) & ov::CompiledModel::input); cls.def("input", - (ov::Output(ov::runtime::CompiledModel::*)() const) & ov::runtime::CompiledModel::input); - - cls.def( - "input", - (ov::Output(ov::runtime::CompiledModel::*)(size_t) const) & ov::runtime::CompiledModel::input, - py::arg("index")); + (ov::Output(ov::CompiledModel::*)(size_t) const) & ov::CompiledModel::input, + py::arg("index")); cls.def("input", - (ov::Output(ov::runtime::CompiledModel::*)(const std::string&) const) & - ov::runtime::CompiledModel::input, + (ov::Output(ov::CompiledModel::*)(const std::string&) const) & ov::CompiledModel::input, py::arg("tensor_name")); - cls.def_property_readonly("outputs", &ov::runtime::CompiledModel::outputs); + cls.def_property_readonly("outputs", &ov::CompiledModel::outputs); + + cls.def("output", (ov::Output(ov::CompiledModel::*)() const) & ov::CompiledModel::output); cls.def("output", - (ov::Output(ov::runtime::CompiledModel::*)() const) & ov::runtime::CompiledModel::output); - - cls.def( - "output", - (ov::Output(ov::runtime::CompiledModel::*)(size_t) const) & ov::runtime::CompiledModel::output, - py::arg("index")); + (ov::Output(ov::CompiledModel::*)(size_t) const) & ov::CompiledModel::output, + py::arg("index")); cls.def("output", - (ov::Output(ov::runtime::CompiledModel::*)(const std::string&) const) & - ov::runtime::CompiledModel::output, + (ov::Output(ov::CompiledModel::*)(const std::string&) const) & ov::CompiledModel::output, py::arg("tensor_name")); } diff --git a/src/bindings/python/src/pyopenvino/core/containers.hpp b/src/bindings/python/src/pyopenvino/core/containers.hpp index 5a4be7c9dac..64e1eaeff9a 100644 --- a/src/bindings/python/src/pyopenvino/core/containers.hpp +++ b/src/bindings/python/src/pyopenvino/core/containers.hpp @@ -15,8 +15,8 @@ namespace py = pybind11; namespace Containers { - using TensorIndexMap = std::map; - using TensorNameMap = std::map; + using TensorIndexMap = std::map; + using TensorNameMap = std::map; void regclass_TensorIndexMap(py::module m); void regclass_TensorNameMap(py::module m); diff --git a/src/bindings/python/src/pyopenvino/core/core.cpp b/src/bindings/python/src/pyopenvino/core/core.cpp index 429c7bf0643..684d9a082d6 100644 --- a/src/bindings/python/src/pyopenvino/core/core.cpp +++ b/src/bindings/python/src/pyopenvino/core/core.cpp @@ -23,96 +23,93 @@ std::string to_string(py::handle handle) { } void regclass_Core(py::module m) { - py::class_> cls(m, "Core"); + py::class_> cls(m, "Core"); cls.def(py::init(), py::arg("xml_config_file") = ""); cls.def("set_config", - (void (ov::runtime::Core::*)(const ConfigMap&, const std::string&)) & ov::runtime::Core::set_config, + (void (ov::Core::*)(const ConfigMap&, const std::string&)) & ov::Core::set_config, py::arg("config"), py::arg("device_name") = ""); cls.def("compile_model", - (ov::runtime::CompiledModel( - ov::runtime::Core::*)(const std::shared_ptr&, const std::string&, const ConfigMap&)) & - ov::runtime::Core::compile_model, + (ov::CompiledModel( + ov::Core::*)(const std::shared_ptr&, const std::string&, const ConfigMap&)) & + ov::Core::compile_model, py::arg("model"), py::arg("device_name"), py::arg("config") = py::dict()); - cls.def( - "compile_model", - (ov::runtime::CompiledModel(ov::runtime::Core::*)(const std::shared_ptr&, const ConfigMap&)) & - ov::runtime::Core::compile_model, - py::arg("model"), - py::arg("config") = py::dict()); - - cls.def( - "compile_model", - (ov::runtime::CompiledModel(ov::runtime::Core::*)(const std::string&, const std::string&, const ConfigMap&)) & - ov::runtime::Core::compile_model, - py::arg("model_path"), - py::arg("device_name"), - py::arg("config") = py::dict()); + cls.def("compile_model", + (ov::CompiledModel(ov::Core::*)(const std::shared_ptr&, const ConfigMap&)) & + ov::Core::compile_model, + py::arg("model"), + py::arg("config") = py::dict()); cls.def("compile_model", - (ov::runtime::CompiledModel(ov::runtime::Core::*)(const std::string&, const ConfigMap&)) & - ov::runtime::Core::compile_model, + (ov::CompiledModel(ov::Core::*)(const std::string&, const std::string&, const ConfigMap&)) & + ov::Core::compile_model, + py::arg("model_path"), + py::arg("device_name"), + py::arg("config") = py::dict()); + + cls.def("compile_model", + (ov::CompiledModel(ov::Core::*)(const std::string&, const ConfigMap&)) & ov::Core::compile_model, py::arg("model_path"), py::arg("config") = py::dict()); - cls.def("get_versions", &ov::runtime::Core::get_versions, py::arg("device_name")); + cls.def("get_versions", &ov::Core::get_versions, py::arg("device_name")); cls.def( "read_model", - [](ov::runtime::Core& self, py::bytes model, py::bytes weights) { + [](ov::Core& self, py::bytes model, py::bytes weights) { // works on view in order to omit copying bytes into string py::buffer_info info(py::buffer(weights).request()); size_t bin_size = static_cast(info.size); // if weights are not empty if (bin_size) { const uint8_t* bin = reinterpret_cast(info.ptr); - ov::runtime::Tensor tensor(ov::element::Type_t::u8, {bin_size}); + ov::Tensor tensor(ov::element::Type_t::u8, {bin_size}); std::memcpy(tensor.data(), bin, bin_size); return self.read_model(model, tensor); } // create empty tensor of type u8 - ov::runtime::Tensor tensor(ov::element::Type_t::u8, {}); + ov::Tensor tensor(ov::element::Type_t::u8, {}); return self.read_model(model, tensor); }, py::arg("model"), py::arg("weights") = py::bytes()); - cls.def("read_model", - (std::shared_ptr(ov::runtime::Core::*)(const std::string&, const std::string&) const) & - ov::runtime::Core::read_model, - py::arg("model"), - py::arg("weights") = ""); - - cls.def("read_model", - (std::shared_ptr(ov::runtime::Core::*)(const std::string&, const ov::runtime::Tensor&) const) & - ov::runtime::Core::read_model, - py::arg("model"), - py::arg("weights")); + cls.def( + "read_model", + (std::shared_ptr(ov::Core::*)(const std::string&, const std::string&) const) & ov::Core::read_model, + py::arg("model"), + py::arg("weights") = ""); cls.def( "read_model", - [](ov::runtime::Core& self, py::object model, py::object weights) { + (std::shared_ptr(ov::Core::*)(const std::string&, const ov::Tensor&) const) & ov::Core::read_model, + py::arg("model"), + py::arg("weights")); + + cls.def( + "read_model", + [](ov::Core& self, py::object model, py::object weights) { return self.read_model(py::str(model), py::str(weights)); }, py::arg("model"), py::arg("weights") = ""); - cls.def("import_model", - (ov::runtime::CompiledModel(ov::runtime::Core::*)(std::istream&, const std::string&, const ConfigMap&)) & - ov::runtime::Core::import_model, - py::arg("model_file"), - py::arg("device_name"), - py::arg("config") = py::none()); + cls.def( + "import_model", + (ov::CompiledModel(ov::Core::*)(std::istream&, const std::string&, const ConfigMap&)) & ov::Core::import_model, + py::arg("model_file"), + py::arg("device_name"), + py::arg("config") = py::none()); cls.def( "get_config", - [](ov::runtime::Core& self, const std::string& device_name, const std::string& name) -> py::object { + [](ov::Core& self, const std::string& device_name, const std::string& name) -> py::object { return Common::from_ov_any(self.get_config(device_name, name)).as(); }, py::arg("device_name"), @@ -120,39 +117,38 @@ void regclass_Core(py::module m) { cls.def( "get_metric", - [](ov::runtime::Core& self, const std::string device_name, const std::string name) -> py::object { + [](ov::Core& self, const std::string device_name, const std::string name) -> py::object { return Common::from_ov_any(self.get_metric(device_name, name)).as(); }, py::arg("device_name"), py::arg("name")); - cls.def("register_plugin", &ov::runtime::Core::register_plugin, py::arg("plugin_name"), py::arg("device_name")); + cls.def("register_plugin", &ov::Core::register_plugin, py::arg("plugin_name"), py::arg("device_name")); - cls.def("register_plugins", &ov::runtime::Core::register_plugins, py::arg("xml_config_file")); + cls.def("register_plugins", &ov::Core::register_plugins, py::arg("xml_config_file")); - cls.def("unload_plugin", &ov::runtime::Core::unload_plugin, py::arg("device_name")); + cls.def("unload_plugin", &ov::Core::unload_plugin, py::arg("device_name")); cls.def("query_model", - (ov::runtime::SupportedOpsMap( - ov::runtime::Core::*)(const std::shared_ptr&, const std::string&, const ConfigMap&)) & - ov::runtime::Core::query_model, + (ov::SupportedOpsMap( + ov::Core::*)(const std::shared_ptr&, const std::string&, const ConfigMap&)) & + ov::Core::query_model, py::arg("model"), py::arg("device_name"), py::arg("config") = py::dict()); cls.def("add_extension", - static_cast(&ov::runtime::Core::add_extension), + static_cast(&ov::Core::add_extension), py::arg("library_path")); cls.def("add_extension", - static_cast&)>( - &ov::runtime::Core::add_extension), + static_cast&)>(&ov::Core::add_extension), py::arg("extension")); - cls.def("add_extension", - static_cast>&)>( - &ov::runtime::Core::add_extension), - py::arg("extensions")); + cls.def( + "add_extension", + static_cast>&)>(&ov::Core::add_extension), + py::arg("extensions")); - cls.def_property_readonly("available_devices", &ov::runtime::Core::get_available_devices); + cls.def_property_readonly("available_devices", &ov::Core::get_available_devices); } diff --git a/src/bindings/python/src/pyopenvino/core/infer_request.cpp b/src/bindings/python/src/pyopenvino/core/infer_request.cpp index b2d4566d36a..c173004429e 100644 --- a/src/bindings/python/src/pyopenvino/core/infer_request.cpp +++ b/src/bindings/python/src/pyopenvino/core/infer_request.cpp @@ -172,7 +172,7 @@ void regclass_InferRequest(py::module m) { cls.def( "set_tensor", - [](InferRequestWrapper& self, const std::string& name, const ov::runtime::Tensor& tensor) { + [](InferRequestWrapper& self, const std::string& name, const ov::Tensor& tensor) { self._request.set_tensor(name, tensor); }, py::arg("name"), @@ -180,7 +180,7 @@ void regclass_InferRequest(py::module m) { cls.def( "set_tensor", - [](InferRequestWrapper& self, const ov::Output& port, const ov::runtime::Tensor& tensor) { + [](InferRequestWrapper& self, const ov::Output& port, const ov::Tensor& tensor) { self._request.set_tensor(port, tensor); }, py::arg("port"), @@ -188,7 +188,7 @@ void regclass_InferRequest(py::module m) { cls.def( "set_tensor", - [](InferRequestWrapper& self, const ov::Output& port, const ov::runtime::Tensor& tensor) { + [](InferRequestWrapper& self, const ov::Output& port, const ov::Tensor& tensor) { self._request.set_tensor(port, tensor); }, py::arg("port"), @@ -196,7 +196,7 @@ void regclass_InferRequest(py::module m) { cls.def( "set_input_tensor", - [](InferRequestWrapper& self, size_t idx, const ov::runtime::Tensor& tensor) { + [](InferRequestWrapper& self, size_t idx, const ov::Tensor& tensor) { self._request.set_input_tensor(idx, tensor); }, py::arg("index"), @@ -204,14 +204,14 @@ void regclass_InferRequest(py::module m) { cls.def( "set_input_tensor", - [](InferRequestWrapper& self, const ov::runtime::Tensor& tensor) { + [](InferRequestWrapper& self, const ov::Tensor& tensor) { self._request.set_input_tensor(tensor); }, py::arg("tensor")); cls.def( "set_output_tensor", - [](InferRequestWrapper& self, size_t idx, const ov::runtime::Tensor& tensor) { + [](InferRequestWrapper& self, size_t idx, const ov::Tensor& tensor) { self._request.set_output_tensor(idx, tensor); }, py::arg("index"), @@ -219,7 +219,7 @@ void regclass_InferRequest(py::module m) { cls.def( "set_output_tensor", - [](InferRequestWrapper& self, const ov::runtime::Tensor& tensor) { + [](InferRequestWrapper& self, const ov::Tensor& tensor) { self._request.set_output_tensor(tensor); }, py::arg("tensor")); diff --git a/src/bindings/python/src/pyopenvino/core/infer_request.hpp b/src/bindings/python/src/pyopenvino/core/infer_request.hpp index ab8c81ff468..4f82f7d2a09 100644 --- a/src/bindings/python/src/pyopenvino/core/infer_request.hpp +++ b/src/bindings/python/src/pyopenvino/core/infer_request.hpp @@ -17,13 +17,13 @@ typedef std::chrono::nanoseconds ns; class InferRequestWrapper { public: - InferRequestWrapper(ov::runtime::InferRequest request) + InferRequestWrapper(ov::InferRequest request) : _request(request) { // AsyncInferQueue uses this constructor - setting callback for computing a latency will be done there } - InferRequestWrapper(ov::runtime::InferRequest request, const std::vector>& inputs, const std::vector>& outputs) + InferRequestWrapper(ov::InferRequest request, const std::vector>& inputs, const std::vector>& outputs) : _request(request), _inputs(inputs), _outputs(outputs) { _request.set_callback([this](std::exception_ptr exception_ptr) { @@ -32,16 +32,16 @@ public: } // ~InferRequestWrapper() = default; - std::vector get_input_tensors() { - std::vector tensors; + std::vector get_input_tensors() { + std::vector tensors; for (auto&& node : _inputs) { tensors.push_back(_request.get_tensor(node)); } return tensors; } - std::vector get_output_tensors() { - std::vector tensors; + std::vector get_output_tensors() { + std::vector tensors; for (auto&& node : _outputs) { tensors.push_back(_request.get_tensor(node)); } @@ -56,7 +56,7 @@ public: return static_cast(execTime.count()) * 0.000001; } - ov::runtime::InferRequest _request; + ov::InferRequest _request; std::vector> _inputs; std::vector> _outputs; diff --git a/src/bindings/python/src/pyopenvino/core/profiling_info.cpp b/src/bindings/python/src/pyopenvino/core/profiling_info.cpp index 81850cfd843..ca49390f3fd 100644 --- a/src/bindings/python/src/pyopenvino/core/profiling_info.cpp +++ b/src/bindings/python/src/pyopenvino/core/profiling_info.cpp @@ -11,18 +11,18 @@ namespace py = pybind11; void regclass_ProfilingInfo(py::module m) { - py::class_> cls(m, "ProfilingInfo"); + py::class_> cls(m, "ProfilingInfo"); cls.def(py::init<>()) - .def_readwrite("status", &ov::runtime::ProfilingInfo::status) - .def_readwrite("real_time", &ov::runtime::ProfilingInfo::real_time) - .def_readwrite("cpu_time", &ov::runtime::ProfilingInfo::cpu_time) - .def_readwrite("node_name", &ov::runtime::ProfilingInfo::node_name) - .def_readwrite("exec_type", &ov::runtime::ProfilingInfo::exec_type) - .def_readwrite("node_type", &ov::runtime::ProfilingInfo::node_type); + .def_readwrite("status", &ov::ProfilingInfo::status) + .def_readwrite("real_time", &ov::ProfilingInfo::real_time) + .def_readwrite("cpu_time", &ov::ProfilingInfo::cpu_time) + .def_readwrite("node_name", &ov::ProfilingInfo::node_name) + .def_readwrite("exec_type", &ov::ProfilingInfo::exec_type) + .def_readwrite("node_type", &ov::ProfilingInfo::node_type); - py::enum_(cls, "Status") - .value("NOT_RUN", ov::runtime::ProfilingInfo::Status::NOT_RUN) - .value("OPTIMIZED_OUT", ov::runtime::ProfilingInfo::Status::OPTIMIZED_OUT) - .value("EXECUTED", ov::runtime::ProfilingInfo::Status::EXECUTED) + py::enum_(cls, "Status") + .value("NOT_RUN", ov::ProfilingInfo::Status::NOT_RUN) + .value("OPTIMIZED_OUT", ov::ProfilingInfo::Status::OPTIMIZED_OUT) + .value("EXECUTED", ov::ProfilingInfo::Status::EXECUTED) .export_values(); } diff --git a/src/bindings/python/src/pyopenvino/core/tensor.cpp b/src/bindings/python/src/pyopenvino/core/tensor.cpp index ee3c16669b4..022b5f03530 100644 --- a/src/bindings/python/src/pyopenvino/core/tensor.cpp +++ b/src/bindings/python/src/pyopenvino/core/tensor.cpp @@ -13,7 +13,7 @@ namespace py = pybind11; void regclass_Tensor(py::module m) { - py::class_> cls(m, "Tensor"); + py::class_> cls(m, "Tensor"); cls.def(py::init([](py::array& array, bool shared_memory) { return Common::tensor_from_numpy(array, shared_memory); @@ -26,48 +26,43 @@ void regclass_Tensor(py::module m) { cls.def(py::init>(), py::arg("type"), py::arg("shape")); cls.def(py::init([](py::dtype& np_dtype, std::vector& shape) { - return ov::runtime::Tensor(Common::dtype_to_ov_type().at(py::str(np_dtype)), shape); + return ov::Tensor(Common::dtype_to_ov_type().at(py::str(np_dtype)), shape); }), py::arg("type"), py::arg("shape")); cls.def(py::init([](py::object& np_literal, std::vector& shape) { - return ov::runtime::Tensor(Common::dtype_to_ov_type().at(py::str(py::dtype::from_args(np_literal))), - shape); + return ov::Tensor(Common::dtype_to_ov_type().at(py::str(py::dtype::from_args(np_literal))), shape); }), py::arg("type"), py::arg("shape")); cls.def(py::init([](py::dtype& np_dtype, const ov::Shape& shape) { - return ov::runtime::Tensor(Common::dtype_to_ov_type().at(py::str(np_dtype)), shape); + return ov::Tensor(Common::dtype_to_ov_type().at(py::str(np_dtype)), shape); }), py::arg("type"), py::arg("shape")); cls.def(py::init([](py::object& np_literal, const ov::Shape& shape) { - return ov::runtime::Tensor(Common::dtype_to_ov_type().at(py::str(py::dtype::from_args(np_literal))), - shape); + return ov::Tensor(Common::dtype_to_ov_type().at(py::str(py::dtype::from_args(np_literal))), shape); }), py::arg("type"), py::arg("shape")); - cls.def(py::init(), + cls.def(py::init(), py::arg("other"), py::arg("begin"), py::arg("end")); + + cls.def(py::init, std::vector>(), py::arg("other"), py::arg("begin"), py::arg("end")); - cls.def(py::init, std::vector>(), - py::arg("other"), - py::arg("begin"), - py::arg("end")); + cls.def_property_readonly("element_type", &ov::Tensor::get_element_type); - cls.def_property_readonly("element_type", &ov::runtime::Tensor::get_element_type); + cls.def_property_readonly("size", &ov::Tensor::get_size); - cls.def_property_readonly("size", &ov::runtime::Tensor::get_size); + cls.def_property_readonly("byte_size", &ov::Tensor::get_byte_size); - cls.def_property_readonly("byte_size", &ov::runtime::Tensor::get_byte_size); - - cls.def_property_readonly("data", [](ov::runtime::Tensor& self) { + cls.def_property_readonly("data", [](ov::Tensor& self) { return py::array(Common::ov_type_to_dtype().at(self.get_element_type()), self.get_shape(), self.get_strides(), @@ -75,11 +70,9 @@ void regclass_Tensor(py::module m) { py::cast(self)); }); - cls.def_property("shape", &ov::runtime::Tensor::get_shape, &ov::runtime::Tensor::set_shape); + cls.def_property("shape", &ov::Tensor::get_shape, &ov::Tensor::set_shape); - cls.def_property("shape", - &ov::runtime::Tensor::get_shape, - [](ov::runtime::Tensor& self, std::vector& shape) { - self.set_shape(shape); - }); + cls.def_property("shape", &ov::Tensor::get_shape, [](ov::Tensor& self, std::vector& shape) { + self.set_shape(shape); + }); } diff --git a/src/bindings/python/src/pyopenvino/core/variable_state.cpp b/src/bindings/python/src/pyopenvino/core/variable_state.cpp index 0ba7a908724..c52d4e03add 100644 --- a/src/bindings/python/src/pyopenvino/core/variable_state.cpp +++ b/src/bindings/python/src/pyopenvino/core/variable_state.cpp @@ -11,11 +11,11 @@ namespace py = pybind11; void regclass_VariableState(py::module m) { - py::class_> variable_st(m, "VariableState"); + py::class_> variable_st(m, "VariableState"); - variable_st.def("reset", &ov::runtime::VariableState::reset); + variable_st.def("reset", &ov::VariableState::reset); - variable_st.def_property_readonly("name", &ov::runtime::VariableState::get_name); + variable_st.def_property_readonly("name", &ov::VariableState::get_name); - variable_st.def_property("state", &ov::runtime::VariableState::get_state, &ov::runtime::VariableState::set_state); + variable_st.def_property("state", &ov::VariableState::get_state, &ov::VariableState::set_state); } diff --git a/src/bindings/python/src/pyopenvino/graph/model.cpp b/src/bindings/python/src/pyopenvino/graph/model.cpp index ee8ccccda29..da9e19afa9d 100644 --- a/src/bindings/python/src/pyopenvino/graph/model.cpp +++ b/src/bindings/python/src/pyopenvino/graph/model.cpp @@ -699,8 +699,8 @@ void regclass_graph_Model(py::module m) { function.def( "evaluate", [](ov::Model& self, - ov::runtime::TensorVector& output_tensors, - const ov::runtime::TensorVector& input_tensors, + ov::TensorVector& output_tensors, + const ov::TensorVector& input_tensors, PyRTMap evaluation_context) -> bool { return self.evaluate(output_tensors, input_tensors, evaluation_context); }, diff --git a/src/bindings/python/src/pyopenvino/graph/node.cpp b/src/bindings/python/src/pyopenvino/graph/node.cpp index d9c1f317cfd..bb42e47830b 100644 --- a/src/bindings/python/src/pyopenvino/graph/node.cpp +++ b/src/bindings/python/src/pyopenvino/graph/node.cpp @@ -83,8 +83,8 @@ void regclass_graph_Node(py::module m) { node.def( "evaluate", [](const ov::Node& self, - ov::runtime::TensorVector& output_values, - const ov::runtime::TensorVector& input_values, + ov::TensorVector& output_values, + const ov::TensorVector& input_values, const ov::EvaluationContext& evaluationContext) -> bool { return self.evaluate(output_values, input_values, evaluationContext); }, @@ -108,9 +108,7 @@ void regclass_graph_Node(py::module m) { )"); node.def( "evaluate", - [](const ov::Node& self, - ov::runtime::TensorVector& output_values, - const ov::runtime::TensorVector& input_values) -> bool { + [](const ov::Node& self, ov::TensorVector& output_values, const ov::TensorVector& input_values) -> bool { return self.evaluate(output_values, input_values); }, py::arg("output_values"), diff --git a/src/core/include/openvino/core/any.hpp b/src/core/include/openvino/core/any.hpp index 62cffd07b71..2743dcfbd02 100644 --- a/src/core/include/openvino/core/any.hpp +++ b/src/core/include/openvino/core/any.hpp @@ -29,14 +29,10 @@ namespace ov { class Node; class RuntimeAttribute; -class ParamMap; - -namespace runtime { class CompiledModel; class RemoteContext; class RemoteTensor; class InferencePlugin; -} // namespace runtime /** * @brief This class represents an object to work with different types @@ -336,13 +332,12 @@ class OPENVINO_API Any { }; friend class ::ov::RuntimeAttribute; - friend class ::ov::ParamMap; friend class ::InferenceEngine::InferencePlugin; friend class ::InferenceEngine::ExecutableNetwork; - friend class ::ov::runtime::CompiledModel; - friend class ::ov::runtime::RemoteContext; - friend class ::ov::runtime::RemoteTensor; - friend class ::ov::runtime::InferencePlugin; + friend class ::ov::CompiledModel; + friend class ::ov::RemoteContext; + friend class ::ov::RemoteTensor; + friend class ::ov::InferencePlugin; Any(const Any& other, const std::shared_ptr& so); diff --git a/src/core/include/openvino/core/model.hpp b/src/core/include/openvino/core/model.hpp index b754b433ed7..e31049dac25 100644 --- a/src/core/include/openvino/core/model.hpp +++ b/src/core/include/openvino/core/model.hpp @@ -215,14 +215,14 @@ public: /// \param value Output containing Node int64_t get_result_index(const ov::Output& value) const; - /// \deprecated Use evaluate with ov::runtime::Tensor instead + /// \deprecated Use evaluate with ov::Tensor instead /// \brief Evaluate the function on inputs, putting results in outputs. /// \param output_tensors Tensors for the outputs to compute. One for each result /// \param input_tensors Tensors for the inputs. One for each inputs. /// \param evaluation_context Storage of additional settings and attributes that can be used /// when evaluating the function. This additional information can be shared across nodes. OPENVINO_DEPRECATED( - "This method is deprecated and will be removed soon. Please use evaluate with ov::runtime::Tensor instead.") + "This method is deprecated and will be removed soon. Please use evaluate with ov::Tensor instead.") bool evaluate(const ov::HostTensorVector& output_tensors, const ov::HostTensorVector& input_tensors, ov::EvaluationContext evaluation_context = ov::EvaluationContext()) const; @@ -232,8 +232,8 @@ public: /// \param input_tensors Tensors for the inputs. One for each inputs. /// \param evaluation_context Storage of additional settings and attributes that can be used /// when evaluating the function. This additional information can be shared across nodes. - bool evaluate(ov::runtime::TensorVector& output_tensors, - const ov::runtime::TensorVector& input_tensors, + bool evaluate(ov::TensorVector& output_tensors, + const ov::TensorVector& input_tensors, ov::EvaluationContext evaluation_context = ov::EvaluationContext()) const; /// \brief Return a list of function's sinks. diff --git a/src/core/include/openvino/core/node.hpp b/src/core/include/openvino/core/node.hpp index 59815f9623f..ffb931c2213 100644 --- a/src/core/include/openvino/core/node.hpp +++ b/src/core/include/openvino/core/node.hpp @@ -195,15 +195,15 @@ public: /// operation // \returns true if evaluate is available virtual bool has_evaluate() const; - /// \deprecated Use evaluate with ov::runtime::Tensor instead + /// \deprecated Use evaluate with ov::Tensor instead /// \brief Evaluates the op on input_values putting results in output_values /// \param output_values Tensors for the outputs to compute. One for each result /// \param input_values Tensors for the inputs. One for each inputs. /// \returns true if successful OPENVINO_DEPRECATED( - "This method is deprecated and will be removed soon. Please use evaluate with ov::runtime::Tensor instead.") + "This method is deprecated and will be removed soon. Please use evaluate with ov::Tensor instead.") virtual bool evaluate(const ov::HostTensorVector& output_values, const ov::HostTensorVector& input_values) const; - /// \deprecated Use evaluate with ov::runtime::Tensor instead + /// \deprecated Use evaluate with ov::Tensor instead /// \brief Evaluates the op on input_values putting results in output_values /// \param output_values Tensors for the outputs to compute. One for each result /// \param input_values Tensors for the inputs. One for each inputs. @@ -211,34 +211,33 @@ public: /// when evaluating the op. /// \returns true if successful OPENVINO_DEPRECATED( - "This method is deprecated and will be removed soon. Please use evaluate with ov::runtime::Tensor instead.") + "This method is deprecated and will be removed soon. Please use evaluate with ov::Tensor instead.") virtual bool evaluate(const ov::HostTensorVector& output_values, const ov::HostTensorVector& input_values, const EvaluationContext& evaluationContext) const; OPENVINO_DEPRECATED("This method is deprecated and will be removed soon. Please use evaluate_lower with " - "ov::runtime::Tensor instead.") + "ov::Tensor instead.") virtual bool evaluate_lower(const ov::HostTensorVector& output_values) const; OPENVINO_DEPRECATED("This method is deprecated and will be removed soon. Please use evaluate_upper with " - "ov::runtime::Tensor instead.") + "ov::Tensor instead.") virtual bool evaluate_upper(const ov::HostTensorVector& output_values) const; /// \brief Evaluates the op on input_values putting results in output_values /// \param output_values Tensors for the outputs to compute. One for each result /// \param input_values Tensors for the inputs. One for each inputs. /// \returns true if successful - virtual bool evaluate(ov::runtime::TensorVector& output_values, - const ov::runtime::TensorVector& input_values) const; + virtual bool evaluate(ov::TensorVector& output_values, const ov::TensorVector& input_values) const; /// \brief Evaluates the op on input_values putting results in output_values /// \param output_values Tensors for the outputs to compute. One for each result /// \param input_values Tensors for the inputs. One for each inputs. /// \param evaluation_context Storage of additional settings and attributes that can be used /// when evaluating the op. /// \returns true if successful - virtual bool evaluate(ov::runtime::TensorVector& output_values, - const ov::runtime::TensorVector& input_values, + virtual bool evaluate(ov::TensorVector& output_values, + const ov::TensorVector& input_values, const ov::EvaluationContext& evaluationContext) const; - virtual bool evaluate_lower(ov::runtime::TensorVector& output_values) const; - virtual bool evaluate_upper(ov::runtime::TensorVector& output_values) const; + virtual bool evaluate_lower(ov::TensorVector& output_values) const; + virtual bool evaluate_upper(ov::TensorVector& output_values) const; virtual bool constant_fold(OutputVector& output_values, const OutputVector& inputs_values); /// \brief Decomposes the FusedOp into a sub-graph consisting of core openvino ops diff --git a/src/core/include/openvino/runtime/allocator.hpp b/src/core/include/openvino/runtime/allocator.hpp index 8277b3d742a..a0f64dc4bc9 100644 --- a/src/core/include/openvino/runtime/allocator.hpp +++ b/src/core/include/openvino/runtime/allocator.hpp @@ -15,7 +15,6 @@ #include "openvino/core/core_visibility.hpp" namespace ov { -namespace runtime { /** * @interface AllocatorImpl @@ -75,7 +74,7 @@ class OPENVINO_API Allocator { */ Allocator(const AllocatorImpl::Ptr& impl, const std::shared_ptr& so); - friend class ov::runtime::Tensor; + friend class ov::Tensor; public: /** @@ -148,5 +147,10 @@ public: */ explicit operator bool() const noexcept; }; + +namespace runtime { +using ov::Allocator; +using ov::AllocatorImpl; } // namespace runtime + } // namespace ov diff --git a/src/core/include/openvino/runtime/tensor.hpp b/src/core/include/openvino/runtime/tensor.hpp index b2c9ffebbdb..b58f39c0fca 100644 --- a/src/core/include/openvino/runtime/tensor.hpp +++ b/src/core/include/openvino/runtime/tensor.hpp @@ -22,7 +22,6 @@ class Blob; } // namespace InferenceEngine namespace ov { -namespace runtime { class Core; class InferRequest; @@ -47,10 +46,10 @@ protected: */ Tensor(const std::shared_ptr& impl, const std::shared_ptr& so); - friend class ov::runtime::Core; - friend class ov::runtime::InferRequest; - friend class ov::runtime::RemoteContext; - friend class ov::runtime::VariableState; + friend class ov::Core; + friend class ov::InferRequest; + friend class ov::RemoteContext; + friend class ov::VariableState; public: /// @brief Default constructor @@ -210,5 +209,10 @@ public: }; using TensorVector = std::vector; + +namespace runtime { +using ov::Tensor; +using ov::TensorVector; } // namespace runtime + } // namespace ov diff --git a/src/core/src/model.cpp b/src/core/src/model.cpp index 599193b7567..7641af5a58b 100644 --- a/src/core/src/model.cpp +++ b/src/core/src/model.cpp @@ -462,20 +462,20 @@ int64_t ov::Model::get_result_index(const Output& value) const { namespace { -inline ov::runtime::Tensor create_tmp_tensor(const ngraph::HostTensorPtr& tensor) { +inline ov::Tensor create_tmp_tensor(const ngraph::HostTensorPtr& tensor) { if (tensor->get_partial_shape().is_static()) { ov::Shape shape = tensor->get_shape(); - return std::move(ov::runtime::Tensor(tensor->get_element_type(), shape, tensor->get_data_ptr())); + return std::move(ov::Tensor(tensor->get_element_type(), shape, tensor->get_data_ptr())); } else { if (tensor->get_element_type().is_dynamic()) { - return std::move(ov::runtime::Tensor()); + return std::move(ov::Tensor()); } else { - return std::move(ov::runtime::Tensor(tensor->get_element_type(), {0})); + return std::move(ov::Tensor(tensor->get_element_type(), {0})); } } } -inline ov::runtime::TensorVector create_tmp_tensors(const ngraph::HostTensorVector& tensors) { - ov::runtime::TensorVector result; +inline ov::TensorVector create_tmp_tensors(const ngraph::HostTensorVector& tensors) { + ov::TensorVector result; result.reserve(tensors.size()); for (const auto& tensor : tensors) { result.emplace_back(create_tmp_tensor(tensor)); @@ -483,8 +483,7 @@ inline ov::runtime::TensorVector create_tmp_tensors(const ngraph::HostTensorVect return std::move(result); } -inline void update_output_tensors(const ngraph::HostTensorVector& output_values, - const ov::runtime::TensorVector& outputs) { +inline void update_output_tensors(const ngraph::HostTensorVector& output_values, const ov::TensorVector& outputs) { OPENVINO_ASSERT(output_values.size(), outputs.size()); for (size_t i = 0; i < outputs.size(); i++) { const auto& tensor = output_values[i]; @@ -501,23 +500,23 @@ inline void update_output_tensors(const ngraph::HostTensorVector& output_values, bool ov::Model::evaluate(const HostTensorVector& output_tensors, const HostTensorVector& input_tensors, EvaluationContext evaluation_context) const { - ov::runtime::TensorVector outputs = create_tmp_tensors(output_tensors); - ov::runtime::TensorVector inputs = create_tmp_tensors(input_tensors); + ov::TensorVector outputs = create_tmp_tensors(output_tensors); + ov::TensorVector inputs = create_tmp_tensors(input_tensors); bool sts = evaluate(outputs, inputs, std::move(evaluation_context)); update_output_tensors(output_tensors, outputs); return sts; } -bool ov::Model::evaluate(ov::runtime::TensorVector& output_tensors, - const ov::runtime::TensorVector& input_tensors, +bool ov::Model::evaluate(ov::TensorVector& output_tensors, + const ov::TensorVector& input_tensors, ov::EvaluationContext evaluation_context) const { evaluation_context.emplace("VariableContext", ov::op::util::VariableContext()); - std::map value_map; + std::map value_map; for (size_t i = 0; i < m_parameters.size(); ++i) { value_map[m_parameters.at(i)->output(0)] = input_tensors.at(i); } OutputVector outputs; - std::map output_tensor_map; + std::map output_tensor_map; for (size_t i = 0; i < m_results.size(); ++i) { auto result = m_results.at(i)->output(0); output_tensor_map[result] = output_tensors.at(i); @@ -528,19 +527,19 @@ bool ov::Model::evaluate(ov::runtime::TensorVector& output_tensors, } // evaluate nodes OPENVINO_SUPPRESS_DEPRECATED_START - ngraph::Evaluator evaluator({}, value_map); + ngraph::Evaluator evaluator({}, value_map); evaluator.set_universal_handler( - [&output_tensor_map, - &evaluation_context](Node* node, const ov::runtime::TensorVector& input_tensors) -> ov::runtime::TensorVector { - ov::runtime::TensorVector output_tensors; + [&output_tensor_map, &evaluation_context](Node* node, + const ov::TensorVector& input_tensors) -> ov::TensorVector { + ov::TensorVector output_tensors; for (const auto& v : node->outputs()) { auto it = output_tensor_map.find(v); if (it == output_tensor_map.end()) { if (v.get_partial_shape().is_dynamic() || v.get_element_type().is_dynamic()) { - ov::runtime::Tensor c = create_tmp_tensor(std::make_shared(v)); + ov::Tensor c = create_tmp_tensor(std::make_shared(v)); output_tensors.push_back(c); } else { - ov::runtime::Tensor c(v.get_element_type(), v.get_shape()); + ov::Tensor c(v.get_element_type(), v.get_shape()); output_tensors.push_back(c); } } else { diff --git a/src/core/src/node.cpp b/src/core/src/node.cpp index 9adefea5126..602774fb848 100644 --- a/src/core/src/node.cpp +++ b/src/core/src/node.cpp @@ -665,12 +665,12 @@ namespace { class DynamicTensor : public ngraph::runtime::HostTensor { private: - ov::runtime::Tensor tensor; + ov::Tensor tensor; public: DynamicTensor(const ov::element::Type& type) : ngraph::runtime::HostTensor(type, ov::PartialShape::dynamic()) {} - ov::runtime::Tensor get_tensor() { + ov::Tensor get_tensor() { return tensor; } @@ -683,13 +683,13 @@ protected: "Attempt to allocate buffer for tensor with dynamic type: ", get_element_type()); m_buffer_size = m_descriptor->size(); - tensor = ov::runtime::Tensor(get_element_type(), get_partial_shape().get_shape()); + tensor = ov::Tensor(get_element_type(), get_partial_shape().get_shape()); m_memory_pointer = tensor.data(); m_aligned_buffer_pool = m_memory_pointer; } }; -inline ngraph::HostTensorVector create_tmp_tensors(const ov::runtime::TensorVector& tensors) { +inline ngraph::HostTensorVector create_tmp_tensors(const ov::TensorVector& tensors) { ngraph::HostTensorVector result; result.reserve(tensors.size()); for (const auto& tensor : tensors) { @@ -708,7 +708,7 @@ inline ngraph::HostTensorVector create_tmp_tensors(const ov::runtime::TensorVect return std::move(result); } -inline void update_output_tensors(ov::runtime::TensorVector& output_values, const ngraph::HostTensorVector& outputs) { +inline void update_output_tensors(ov::TensorVector& output_values, const ngraph::HostTensorVector& outputs) { OPENVINO_ASSERT(output_values.size() == outputs.size()); for (size_t i = 0; i < outputs.size(); i++) { if (auto dyn_output = std::dynamic_pointer_cast(outputs[i])) { @@ -718,7 +718,7 @@ inline void update_output_tensors(ov::runtime::TensorVector& output_values, cons } } // namespace -bool ov::Node::evaluate(ov::runtime::TensorVector& output_values, const ov::runtime::TensorVector& input_values) const { +bool ov::Node::evaluate(ov::TensorVector& output_values, const ov::TensorVector& input_values) const { HostTensorVector output = create_tmp_tensors(output_values); HostTensorVector input = create_tmp_tensors(input_values); OPENVINO_SUPPRESS_DEPRECATED_START @@ -728,8 +728,8 @@ bool ov::Node::evaluate(ov::runtime::TensorVector& output_values, const ov::runt return sts; } -bool ov::Node::evaluate(ov::runtime::TensorVector& output_values, - const ov::runtime::TensorVector& input_values, +bool ov::Node::evaluate(ov::TensorVector& output_values, + const ov::TensorVector& input_values, const ov::EvaluationContext& evaluationContext) const { HostTensorVector output = create_tmp_tensors(output_values); HostTensorVector input = create_tmp_tensors(input_values); @@ -740,7 +740,7 @@ bool ov::Node::evaluate(ov::runtime::TensorVector& output_values, return sts; } -bool ov::Node::evaluate_lower(ov::runtime::TensorVector& output_values) const { +bool ov::Node::evaluate_lower(ov::TensorVector& output_values) const { HostTensorVector output = create_tmp_tensors(output_values); OPENVINO_SUPPRESS_DEPRECATED_START bool sts = evaluate_lower(output); @@ -749,7 +749,7 @@ bool ov::Node::evaluate_lower(ov::runtime::TensorVector& output_values) const { return sts; } -bool ov::Node::evaluate_upper(ov::runtime::TensorVector& output_values) const { +bool ov::Node::evaluate_upper(ov::TensorVector& output_values) const { HostTensorVector output = create_tmp_tensors(output_values); OPENVINO_SUPPRESS_DEPRECATED_START bool sts = evaluate_upper(output); diff --git a/src/core/src/runtime/allocator.cpp b/src/core/src/runtime/allocator.cpp index 0f287ed2ba4..6dcb27c9a76 100644 --- a/src/core/src/runtime/allocator.cpp +++ b/src/core/src/runtime/allocator.cpp @@ -10,7 +10,6 @@ #include "openvino/core/except.hpp" namespace ov { -namespace runtime { Allocator::Allocator() : _impl{std::make_shared()} {} @@ -61,5 +60,4 @@ Allocator::operator bool() const noexcept { return (!!_impl); } -} // namespace runtime } // namespace ov diff --git a/src/core/src/runtime/blob_allocator.hpp b/src/core/src/runtime/blob_allocator.hpp index 1bccd0fd744..acc6e51aa09 100644 --- a/src/core/src/runtime/blob_allocator.hpp +++ b/src/core/src/runtime/blob_allocator.hpp @@ -12,7 +12,7 @@ namespace InferenceEngine { struct BlobAllocator : public IAllocator { - BlobAllocator(const std::shared_ptr& impl) : _impl{impl} {} + BlobAllocator(const std::shared_ptr& impl) : _impl{impl} {} void* lock(void* handle, LockOp) noexcept override { return handle; @@ -39,7 +39,7 @@ struct BlobAllocator : public IAllocator { } } - std::shared_ptr _impl; + std::shared_ptr _impl; std::unordered_map size_map; }; } // namespace InferenceEngine diff --git a/src/core/src/runtime/ov_tensor.cpp b/src/core/src/runtime/ov_tensor.cpp index 2175c2db434..cae837889e5 100644 --- a/src/core/src/runtime/ov_tensor.cpp +++ b/src/core/src/runtime/ov_tensor.cpp @@ -11,7 +11,6 @@ #include "runtime/blob_allocator.hpp" namespace ov { -namespace runtime { #define OV_TENSOR_STATEMENT(...) \ OPENVINO_ASSERT(_impl != nullptr, "Tensor was not initialized."); \ @@ -164,5 +163,4 @@ Tensor::operator bool() const noexcept { return (!!_impl); } -} // namespace runtime } // namespace ov diff --git a/src/core/tests/engines_util/test_case.cpp b/src/core/tests/engines_util/test_case.cpp index 2d36a8b57e9..a2c0fb2d273 100644 --- a/src/core/tests/engines_util/test_case.cpp +++ b/src/core/tests/engines_util/test_case.cpp @@ -9,12 +9,12 @@ namespace { template typename std::enable_if::value, testing::AssertionResult>::type -compare_values(const ov::runtime::Tensor& expected, const ov::runtime::Tensor& result, const size_t tolerance_bits) { +compare_values(const ov::Tensor& expected, const ov::Tensor& result, const size_t tolerance_bits) { return ngraph::test::all_close_f(expected, result, tolerance_bits); } -testing::AssertionResult compare_with_fp_tolerance(const ov::runtime::Tensor& expected_tensor, - const ov::runtime::Tensor& result_tensor, +testing::AssertionResult compare_with_fp_tolerance(const ov::Tensor& expected_tensor, + const ov::Tensor& result_tensor, const float tolerance) { auto comparison_result = testing::AssertionSuccess(); @@ -32,16 +32,14 @@ testing::AssertionResult compare_with_fp_tolerance(const ov::runtime::Tensor& ex template typename std::enable_if::value, testing::AssertionResult>::type -compare_values(const ov::runtime::Tensor& expected, const ov::runtime::Tensor& result, const size_t) { +compare_values(const ov::Tensor& expected, const ov::Tensor& result, const size_t) { return ov::test::all_close(expected, result); } // used for float16 and bfloat 16 comparisons template -typename std::enable_if::value, testing::AssertionResult>::type compare_values( - const ov::runtime::Tensor& expected_tensor, - const ov::runtime::Tensor& result_tensor, - const size_t tolerance_bits) { +typename std::enable_if::value, testing::AssertionResult>::type +compare_values(const ov::Tensor& expected_tensor, const ov::Tensor& result_tensor, const size_t tolerance_bits) { auto exp_host_t = std::make_shared(expected_tensor.get_element_type(), expected_tensor.get_shape(), expected_tensor.data()); @@ -69,7 +67,7 @@ typename std::enable_if::value, testing::AssertionResult>::type namespace ngraph { namespace test { std::shared_ptr function_from_ir(const std::string& xml_path, const std::string& bin_path) { - ov::runtime::Core c; + ov::Core c; return c.read_model(xml_path, bin_path); } diff --git a/src/core/tests/engines_util/test_case.hpp b/src/core/tests/engines_util/test_case.hpp index 677718cbc54..0d1ed28db80 100644 --- a/src/core/tests/engines_util/test_case.hpp +++ b/src/core/tests/engines_util/test_case.hpp @@ -64,7 +64,7 @@ public: } if (is_dynamic) { - ov::runtime::Tensor tensor(params.at(m_input_index)->get_element_type(), shape); + ov::Tensor tensor(params.at(m_input_index)->get_element_type(), shape); std::copy(values.begin(), values.end(), tensor.data()); m_request.set_input_tensor(m_input_index, tensor); @@ -146,7 +146,7 @@ public: " for output ", m_output_index); - ov::runtime::Tensor tensor(results[m_output_index]->get_output_element_type(0), expected_shape); + ov::Tensor tensor(results[m_output_index]->get_output_element_type(0), expected_shape); std::copy(values.begin(), values.end(), tensor.data()); ++m_output_index; @@ -208,9 +208,9 @@ public: private: std::shared_ptr m_function; - ov::runtime::Core m_core; - ov::runtime::InferRequest m_request; - std::vector m_expected_outputs; + ov::Core m_core; + ov::InferRequest m_request; + std::vector m_expected_outputs; size_t m_input_index = 0; size_t m_output_index = 0; testing::AssertionResult compare_results(size_t tolerance_bits); diff --git a/src/core/tests/int4.cpp b/src/core/tests/int4.cpp index 055a180768f..7a73cf08abf 100644 --- a/src/core/tests/int4.cpp +++ b/src/core/tests/int4.cpp @@ -29,6 +29,6 @@ TEST(int4, tensor_or_constant_size) { ngraph::HostTensor host_tensor(ngraph::element::i4, Shape{3}); EXPECT_EQ(constant->get_byte_size(), host_tensor.get_size_in_bytes()); - ov::runtime::Tensor runtime_tensor(ov::element::i4, ov::Shape{3}); + ov::Tensor runtime_tensor(ov::element::i4, ov::Shape{3}); EXPECT_EQ(constant->get_byte_size(), runtime_tensor.get_byte_size()); } diff --git a/src/core/tests/ov_default_allocator_test.cpp b/src/core/tests/ov_default_allocator_test.cpp index 85b60ba7585..e3dec777f61 100644 --- a/src/core/tests/ov_default_allocator_test.cpp +++ b/src/core/tests/ov_default_allocator_test.cpp @@ -12,26 +12,26 @@ using OVDefaultAllocatorTest = ::testing::Test; TEST_F(OVDefaultAllocatorTest, notThrowOnZeroSize) { - ov::runtime::Allocator allocator; + ov::Allocator allocator; void* ptr = nullptr; ASSERT_NO_THROW(ptr = allocator.allocate(0)); ASSERT_NO_THROW(allocator.deallocate(ptr)); } TEST_F(OVDefaultAllocatorTest, canAllocateAndDeallocate) { - ov::runtime::Allocator allocator; + ov::Allocator allocator; void* ptr = nullptr; ASSERT_NO_THROW(ptr = allocator.allocate(64)); ASSERT_NO_THROW(allocator.deallocate(ptr)); } TEST_F(OVDefaultAllocatorTest, alignedAllocationIsNotImplemented) { - ov::runtime::Allocator allocator; + ov::Allocator allocator; ASSERT_THROW(allocator.allocate(64, 64), ov::Exception); } TEST_F(OVDefaultAllocatorTest, sizedAndAlignedDeallocationAreNotImplemented) { - ov::runtime::Allocator allocator; + ov::Allocator allocator; void* ptr = nullptr; ASSERT_NO_THROW(ptr = allocator.allocate(64)); ASSERT_THROW(allocator.deallocate(ptr, 64), ov::Exception); @@ -40,7 +40,7 @@ TEST_F(OVDefaultAllocatorTest, sizedAndAlignedDeallocationAreNotImplemented) { } TEST_F(OVDefaultAllocatorTest, defaultAllocatorsAreEqual) { - ov::runtime::Allocator allocator0, allocator1; + ov::Allocator allocator0, allocator1; ASSERT_TRUE(allocator0 == allocator1); void* ptr = nullptr; ASSERT_NO_THROW(ptr = allocator0.allocate(64)); @@ -50,7 +50,7 @@ TEST_F(OVDefaultAllocatorTest, defaultAllocatorsAreEqual) { } TEST_F(OVDefaultAllocatorTest, canAllocate10KMemory) { - ov::runtime::Allocator allocator; + ov::Allocator allocator; // large block such as 10k will result in sigsegv if not allocated void* handle = allocator.allocate(10000); char* ptr = reinterpret_cast(handle); diff --git a/src/core/tests/ov_tensor_test.cpp b/src/core/tests/ov_tensor_test.cpp index e96e35a2e1c..4f44fe122c4 100644 --- a/src/core/tests/ov_tensor_test.cpp +++ b/src/core/tests/ov_tensor_test.cpp @@ -27,7 +27,7 @@ inline ov::Strides byteStrides(const ov::Strides& strides, const ov::element::Ty TEST_F(OVTensorTest, canCreateTensor) { ov::Shape shape = {4, 3, 2}; - ov::runtime::Tensor t{ov::element::f32, shape}; + ov::Tensor t{ov::element::f32, shape}; const std::size_t totalSize = ov::shape_size(shape); ASSERT_EQ(totalSize, t.get_size()); ASSERT_NE(nullptr, t.data()); @@ -41,21 +41,21 @@ TEST_F(OVTensorTest, canCreateTensor) { } TEST_F(OVTensorTest, emptySize) { - ov::runtime::Tensor t(ov::element::f32, {0}); + ov::Tensor t(ov::element::f32, {0}); ASSERT_NE(nullptr, t.data()); } TEST_F(OVTensorTest, operators) { - ov::runtime::Tensor t; + ov::Tensor t; ASSERT_FALSE(t); ASSERT_TRUE(!t); } -class OVMockAllocator : public ov::runtime::AllocatorImpl { +class OVMockAllocator : public ov::AllocatorImpl { public: MOCK_METHOD(void*, allocate, (size_t, size_t), ()); - MOCK_METHOD(void, deallocate, (void*, size_t, size_t), ()); // NOLINT(readability/casting) - MOCK_METHOD(bool, is_equal, (const ov::runtime::AllocatorImpl&), (const, noexcept)); // NOLINT(readability/casting) + MOCK_METHOD(void, deallocate, (void*, size_t, size_t), ()); // NOLINT(readability/casting) + MOCK_METHOD(bool, is_equal, (const ov::AllocatorImpl&), (const, noexcept)); // NOLINT(readability/casting) }; TEST_F(OVTensorTest, canCreateTensorUsingMockAllocator) { @@ -66,13 +66,13 @@ TEST_F(OVTensorTest, canCreateTensorUsingMockAllocator) { .WillRepeatedly(testing::Return(reinterpret_cast(1))); EXPECT_CALL(*allocator, deallocate(::testing::_, ::testing::_, ::testing::_)).Times(1); - { ov::runtime::Tensor t{ov::element::f32, shape, ov::runtime::Allocator{allocator}}; } + { ov::Tensor t{ov::element::f32, shape, ov::Allocator{allocator}}; } } TEST_F(OVTensorTest, canAccessExternalData) { ov::Shape shape = {1, 1, 3}; float data[] = {5.f, 6.f, 7.f}; - ov::runtime::Tensor t{ov::element::f32, shape, data}; + ov::Tensor t{ov::element::f32, shape, data}; { float* ptr = t.data(); ASSERT_EQ(ptr[2], 7); @@ -88,7 +88,7 @@ TEST_F(OVTensorTest, canAccessExternalData) { TEST_F(OVTensorTest, canAccessExternalDataWithStrides) { ov::Shape shape = {2, 3}; float data[] = {5.f, 6.f, 7.f, 0.f, 1.f, 42.f, 3.f, 0.f}; - ov::runtime::Tensor t{ov::element::f32, shape, data, {16, 4}}; + ov::Tensor t{ov::element::f32, shape, data, {16, 4}}; ASSERT_EQ(ov::Strides({16, 4}), t.get_strides()); { ASSERT_EQ((ov::Shape{2, 3}), t.get_shape()); @@ -99,7 +99,7 @@ TEST_F(OVTensorTest, canAccessExternalDataWithStrides) { TEST_F(OVTensorTest, cannotCreateTensorWithExternalNullptr) { ov::Shape shape = {2, 3}; - ASSERT_THROW(ov::runtime::Tensor(ov::element::f32, shape, nullptr), ov::Exception); + ASSERT_THROW(ov::Tensor(ov::element::f32, shape, nullptr), ov::Exception); } TEST_F(OVTensorTest, cannotCreateTensorWithWrongStrides) { @@ -108,28 +108,28 @@ TEST_F(OVTensorTest, cannotCreateTensorWithWrongStrides) { const auto el = ov::element::f32; { // strides.size() != shape.size() - EXPECT_THROW(ov::runtime::Tensor(el, shape, data, byteStrides({6, 3, 1}, el)), ov::Exception); + EXPECT_THROW(ov::Tensor(el, shape, data, byteStrides({6, 3, 1}, el)), ov::Exception); } { // strides values are element-wise >= ov::row_major_strides(shape) values - EXPECT_THROW(ov::runtime::Tensor(el, shape, data, byteStrides({2, 1}, el)), ov::Exception); - EXPECT_THROW(ov::runtime::Tensor(el, shape, data, byteStrides({3, 0}, el)), ov::Exception); - EXPECT_THROW(ov::runtime::Tensor(el, shape, data, byteStrides({3, 2}, el)), ov::Exception); - EXPECT_NO_THROW(ov::runtime::Tensor(el, shape, data, byteStrides({6, 2}, el))); + EXPECT_THROW(ov::Tensor(el, shape, data, byteStrides({2, 1}, el)), ov::Exception); + EXPECT_THROW(ov::Tensor(el, shape, data, byteStrides({3, 0}, el)), ov::Exception); + EXPECT_THROW(ov::Tensor(el, shape, data, byteStrides({3, 2}, el)), ov::Exception); + EXPECT_NO_THROW(ov::Tensor(el, shape, data, byteStrides({6, 2}, el))); } { // strides are not divisible by elem_size - EXPECT_THROW(ov::runtime::Tensor(el, shape, data, {7, el.size()}), ov::Exception); - EXPECT_THROW(ov::runtime::Tensor(el, shape, data, {3, 0}), ov::Exception); - EXPECT_THROW(ov::runtime::Tensor(el, shape, data, {el.size(), 3}), ov::Exception); + EXPECT_THROW(ov::Tensor(el, shape, data, {7, el.size()}), ov::Exception); + EXPECT_THROW(ov::Tensor(el, shape, data, {3, 0}), ov::Exception); + EXPECT_THROW(ov::Tensor(el, shape, data, {el.size(), 3}), ov::Exception); } } TEST_F(OVTensorTest, saveDimsAndSizeAfterMove) { ov::Shape shape = {1, 2, 3}; - ov::runtime::Tensor t{ov::element::f32, shape}; + ov::Tensor t{ov::element::f32, shape}; - ov::runtime::Tensor new_tensor(std::move(t)); + ov::Tensor new_tensor(std::move(t)); ASSERT_EQ(shape, new_tensor.get_shape()); ASSERT_EQ(ov::element::f32, new_tensor.get_element_type()); @@ -148,7 +148,7 @@ TEST_F(OVTensorTest, saveDimsAndSizeAfterMove) { // SetShape TEST_F(OVTensorTest, canSetShape) { const ov::Shape origShape({1, 2, 3}); - ov::runtime::Tensor t{ov::element::f32, {1, 2, 3}}; + ov::Tensor t{ov::element::f32, {1, 2, 3}}; const ov::Shape newShape({4, 5, 6}); const void* orig_data = t.data(); @@ -160,7 +160,7 @@ TEST_F(OVTensorTest, canSetShape) { // check that setShape for copy changes original Tensor { - ov::runtime::Tensor t2 = t; + ov::Tensor t2 = t; ASSERT_NO_THROW(t2.set_shape(newShape)); ASSERT_EQ(newShape, t.get_shape()); ASSERT_EQ(t2.get_shape(), t.get_shape()); @@ -177,15 +177,15 @@ TEST_F(OVTensorTest, canSetShape) { TEST_F(OVTensorTest, cannotSetShapeOnPreallocatedMemory) { float data[4 * 5 * 6 * 2]; - ov::runtime::Tensor t{ov::element::f32, {1, 2, 3}, data}; + ov::Tensor t{ov::element::f32, {1, 2, 3}, data}; const ov::Shape newShape({4, 5, 6}); ASSERT_THROW(t.set_shape(newShape), ov::Exception); } TEST_F(OVTensorTest, makeRangeRoiTensor) { - ov::runtime::Tensor t{ov::element::i32, {1, 3, 6, 5}}; // RGBp picture of size (WxH) = 5x6 - ov::runtime::Tensor roi_tensor{t, {0, 0, 1, 2}, {1, 3, 5, 4}}; + ov::Tensor t{ov::element::i32, {1, 3, 6, 5}}; // RGBp picture of size (WxH) = 5x6 + ov::Tensor roi_tensor{t, {0, 0, 1, 2}, {1, 3, 5, 4}}; ov::Shape ref_shape = {1, 3, 4, 2}; ptrdiff_t ref_offset_elems = 7; ptrdiff_t ref_offset_bytes = ref_offset_elems * ov::element::i32.size(); @@ -199,29 +199,29 @@ TEST_F(OVTensorTest, makeRangeRoiTensor) { } TEST_F(OVTensorTest, cannotSetShapeOnRoiTensor) { - ov::runtime::Tensor t{ov::element::i32, {1, 3, 6, 5}}; // RGBp picture of size (WxH) = 5x6 - ov::runtime::Tensor roi_tensor{t, {0, 0, 1, 2}, {1, 3, 5, 4}}; + ov::Tensor t{ov::element::i32, {1, 3, 6, 5}}; // RGBp picture of size (WxH) = 5x6 + ov::Tensor roi_tensor{t, {0, 0, 1, 2}, {1, 3, 5, 4}}; const ov::Shape newShape({4, 5, 6}); ASSERT_THROW(roi_tensor.set_shape(newShape), ov::Exception); } TEST_F(OVTensorTest, tensorInt4DataAccess) { - ov::runtime::Tensor t{ov::element::i4, {1, 6, 5, 3}}; // RGB picture of size (WxH) = 5x6 - ASSERT_THROW((ov::runtime::Tensor{t, {0, 1, 2, 0}, {1, 5, 4, 3}}), ov::Exception); + ov::Tensor t{ov::element::i4, {1, 6, 5, 3}}; // RGB picture of size (WxH) = 5x6 + ASSERT_THROW((ov::Tensor{t, {0, 1, 2, 0}, {1, 5, 4, 3}}), ov::Exception); ASSERT_THROW(t.get_strides(), ov::Exception); ASSERT_THROW(t.data(), ov::Exception); ASSERT_NO_THROW(t.data()); } TEST_F(OVTensorTest, makeRangeRoiBlobWrongSize) { - ov::runtime::Tensor t{ov::element::f32, {1, 3, 4, 4}}; - ASSERT_THROW((ov::runtime::Tensor{t, {0, 0, 1, 1}, {1, 3, 5, 5}}), ov::Exception); - ASSERT_THROW((ov::runtime::Tensor{t, {0, 0, 1, 1, 3}, {1, 3, 4, 4}}), ov::Exception); + ov::Tensor t{ov::element::f32, {1, 3, 4, 4}}; + ASSERT_THROW((ov::Tensor{t, {0, 0, 1, 1}, {1, 3, 5, 5}}), ov::Exception); + ASSERT_THROW((ov::Tensor{t, {0, 0, 1, 1, 3}, {1, 3, 4, 4}}), ov::Exception); } TEST_F(OVTensorTest, readRangeRoiBlob) { - ov::runtime::Tensor t{ov::element::i32, {1, 3, 4, 8}}; + ov::Tensor t{ov::element::i32, {1, 3, 4, 8}}; { const auto origPtr = t.data(); ASSERT_NE(nullptr, origPtr); @@ -229,7 +229,7 @@ TEST_F(OVTensorTest, readRangeRoiBlob) { origPtr[i] = i; } } - ov::runtime::Tensor roi_tensor{t, {0, 0, 2, 4}, {1, 3, 4, 8}}; + ov::Tensor roi_tensor{t, {0, 0, 2, 4}, {1, 3, 4, 8}}; ASSERT_NE(false, static_cast(roi_tensor)); { const std::uint8_t* roi = reinterpret_cast(roi_tensor.data()); diff --git a/src/core/tests/uint4.cpp b/src/core/tests/uint4.cpp index 6e3cc8c5d32..2ec663a14d0 100644 --- a/src/core/tests/uint4.cpp +++ b/src/core/tests/uint4.cpp @@ -28,7 +28,7 @@ TEST(uint4, tensor_or_constant_size) { ngraph::HostTensor host_tensor(ngraph::element::u4, Shape{3}); EXPECT_EQ(constant->get_byte_size(), host_tensor.get_size_in_bytes()); - ov::runtime::Tensor runtime_tensor(ov::element::u4, ov::Shape{3}); + ov::Tensor runtime_tensor(ov::element::u4, ov::Shape{3}); EXPECT_EQ(constant->get_byte_size(), runtime_tensor.get_byte_size()); } @@ -40,6 +40,6 @@ TEST(u1, tensor_or_constant_size) { ngraph::HostTensor host_tensor(ngraph::element::u1, Shape{3}); EXPECT_EQ(constant->get_byte_size(), host_tensor.get_size_in_bytes()); - ov::runtime::Tensor runtime_tensor(ov::element::u1, ov::Shape{3}); + ov::Tensor runtime_tensor(ov::element::u1, ov::Shape{3}); EXPECT_EQ(constant->get_byte_size(), runtime_tensor.get_byte_size()); } diff --git a/src/core/tests/util/all_close.cpp b/src/core/tests/util/all_close.cpp index bccecdb8214..876d4fc4679 100644 --- a/src/core/tests/util/all_close.cpp +++ b/src/core/tests/util/all_close.cpp @@ -4,10 +4,7 @@ #include "all_close.hpp" -::testing::AssertionResult ov::test::all_close(const ov::runtime::Tensor& a, - const ov::runtime::Tensor& b, - float rtol, - float atol) { +::testing::AssertionResult ov::test::all_close(const ov::Tensor& a, const ov::Tensor& b, float rtol, float atol) { if (a.get_element_type() != b.get_element_type()) { return ::testing::AssertionFailure() << "Cannot compare tensors with different element types"; } diff --git a/src/core/tests/util/all_close.hpp b/src/core/tests/util/all_close.hpp index ef4734d6457..57da0cdcc44 100644 --- a/src/core/tests/util/all_close.hpp +++ b/src/core/tests/util/all_close.hpp @@ -127,10 +127,7 @@ namespace test { /// \param atol Absolute tolerance /// Returns true if shapes match and for all elements, |a_i-b_i| <= atol + rtol*|b_i|. template -::testing::AssertionResult all_close(const ov::runtime::Tensor& a, - const ov::runtime::Tensor& b, - T rtol = 1e-5f, - T atol = 1e-8f) { +::testing::AssertionResult all_close(const ov::Tensor& a, const ov::Tensor& b, T rtol = 1e-5f, T atol = 1e-8f) { auto a_t = std::make_shared(a.get_element_type(), a.get_shape(), a.data()); auto b_t = std::make_shared(b.get_element_type(), b.get_shape(), b.data()); @@ -143,9 +140,6 @@ template /// \param rtol Relative tolerance /// \param atol Absolute tolerance /// Returns true if shapes match and for all elements, |a_i-b_i| <= atol + rtol*|b_i|. -::testing::AssertionResult all_close(const ov::runtime::Tensor& a, - const ov::runtime::Tensor& b, - float rtol = 1e-5f, - float atol = 1e-8f); +::testing::AssertionResult all_close(const ov::Tensor& a, const ov::Tensor& b, float rtol = 1e-5f, float atol = 1e-8f); } // namespace test } // namespace ov diff --git a/src/core/tests/util/all_close_f.cpp b/src/core/tests/util/all_close_f.cpp index 554b6bb4f4d..c6cbe8f0d60 100644 --- a/src/core/tests/util/all_close_f.cpp +++ b/src/core/tests/util/all_close_f.cpp @@ -499,8 +499,8 @@ uint32_t matching_mantissa_bits(uint64_t distance) { return ::testing::AssertionSuccess(); } -::testing::AssertionResult test::all_close_f(const ov::runtime::Tensor& a, - const ov::runtime::Tensor& b, +::testing::AssertionResult test::all_close_f(const ov::Tensor& a, + const ov::Tensor& b, int tolerance_bits, float min_signal) { return test::all_close_f(std::make_shared(a.get_element_type(), a.get_shape(), a.data()), @@ -509,8 +509,8 @@ uint32_t matching_mantissa_bits(uint64_t distance) { min_signal); } -::testing::AssertionResult test::all_close_f(const std::vector& as, - const std::vector& bs, +::testing::AssertionResult test::all_close_f(const std::vector& as, + const std::vector& bs, int tolerance_bits, float min_signal) { if (as.size() != bs.size()) { diff --git a/src/core/tests/util/all_close_f.hpp b/src/core/tests/util/all_close_f.hpp index 2bf1b771133..a782ea8bd3a 100644 --- a/src/core/tests/util/all_close_f.hpp +++ b/src/core/tests/util/all_close_f.hpp @@ -145,8 +145,8 @@ bool close_f(double a, double b, int tolerance_bits = DEFAULT_DOUBLE_TOLERANCE_B /// \param tolerance_bits Bit tolerance error /// \param min_signal Minimum value for comparisons /// Returns true iff the two TensorViews are all close in float -::testing::AssertionResult all_close_f(const ov::runtime::Tensor& a, - const ov::runtime::Tensor& b, +::testing::AssertionResult all_close_f(const ov::Tensor& a, + const ov::Tensor& b, int tolerance_bits = DEFAULT_FLOAT_TOLERANCE_BITS, float min_signal = 0.0f); @@ -156,8 +156,8 @@ bool close_f(double a, double b, int tolerance_bits = DEFAULT_DOUBLE_TOLERANCE_B /// \param tolerance_bits Bit tolerance error /// \param min_signal Minimum value for comparisons /// Returns true iff the two TensorViews are all close in float -::testing::AssertionResult all_close_f(const std::vector& as, - const std::vector& bs, +::testing::AssertionResult all_close_f(const std::vector& as, + const std::vector& bs, int tolerance_bits = DEFAULT_FLOAT_TOLERANCE_BITS, float min_signal = 0.0f); } // namespace test diff --git a/src/inference/dev_api/cpp_interfaces/interface/ie_iexecutable_network_internal.hpp b/src/inference/dev_api/cpp_interfaces/interface/ie_iexecutable_network_internal.hpp index 7a428f7a1d0..4bdf474b035 100644 --- a/src/inference/dev_api/cpp_interfaces/interface/ie_iexecutable_network_internal.hpp +++ b/src/inference/dev_api/cpp_interfaces/interface/ie_iexecutable_network_internal.hpp @@ -188,6 +188,6 @@ protected: /** * @brief SoPtr to IExecutableNetworkInternal. */ -using SoExecutableNetworkInternal = ov::runtime::SoPtr; +using SoExecutableNetworkInternal = ov::SoPtr; } // namespace InferenceEngine diff --git a/src/inference/dev_api/cpp_interfaces/interface/ie_iinfer_request_internal.hpp b/src/inference/dev_api/cpp_interfaces/interface/ie_iinfer_request_internal.hpp index 03b8da815a0..6c10b2ea44e 100644 --- a/src/inference/dev_api/cpp_interfaces/interface/ie_iinfer_request_internal.hpp +++ b/src/inference/dev_api/cpp_interfaces/interface/ie_iinfer_request_internal.hpp @@ -347,6 +347,6 @@ private: /** * @brief SoPtr to IInferRequestInternal. */ -using SoIInferRequestInternal = ov::runtime::SoPtr; +using SoIInferRequestInternal = ov::SoPtr; } // namespace InferenceEngine diff --git a/src/inference/dev_api/cpp_interfaces/interface/ie_ivariable_state_internal.hpp b/src/inference/dev_api/cpp_interfaces/interface/ie_ivariable_state_internal.hpp index 851571fe3a6..96660230d62 100644 --- a/src/inference/dev_api/cpp_interfaces/interface/ie_ivariable_state_internal.hpp +++ b/src/inference/dev_api/cpp_interfaces/interface/ie_ivariable_state_internal.hpp @@ -68,7 +68,7 @@ using IMemoryStateInternal = IVariableStateInternal; /** * @brief SoPtr to IVariableStateInternal. */ -using SoIVariableStateInternal = ov::runtime::SoPtr; +using SoIVariableStateInternal = ov::SoPtr; /** * @brief For compatibility reasons. diff --git a/src/inference/dev_api/so_ptr.hpp b/src/inference/dev_api/so_ptr.hpp index 9484c814e35..e4c0c2a7b3d 100644 --- a/src/inference/dev_api/so_ptr.hpp +++ b/src/inference/dev_api/so_ptr.hpp @@ -17,7 +17,6 @@ #include "openvino/runtime/common.hpp" namespace ov { -namespace runtime { /** * @brief This class instantiate object using shared library @@ -89,5 +88,5 @@ struct SoPtr { */ std::shared_ptr _so; }; -} // namespace runtime + } // namespace ov diff --git a/src/inference/include/ie/cpp/ie_executable_network.hpp b/src/inference/include/ie/cpp/ie_executable_network.hpp index 94edb042583..f2605f92165 100644 --- a/src/inference/include/ie/cpp/ie_executable_network.hpp +++ b/src/inference/include/ie/cpp/ie_executable_network.hpp @@ -23,9 +23,7 @@ #include "ie_remote_context.hpp" namespace ov { -namespace runtime { class Core; -} // namespace runtime } // namespace ov namespace InferenceEngine { @@ -46,7 +44,7 @@ class INFERENCE_ENGINE_API_CLASS(ExecutableNetwork) { */ ExecutableNetwork(const std::shared_ptr& impl, const std::shared_ptr& so); friend class Core; - friend class ov::runtime::Core; + friend class ov::Core; public: /// @brief Default constructor diff --git a/src/inference/include/ie/ie_parameter.hpp b/src/inference/include/ie/ie_parameter.hpp index 9c152fcabc8..c63c8407a6a 100644 --- a/src/inference/include/ie/ie_parameter.hpp +++ b/src/inference/include/ie/ie_parameter.hpp @@ -28,6 +28,6 @@ namespace InferenceEngine { * @brief Alias for type that can store any value */ using Parameter = ov::Any; -using ov::runtime::ParamMap; +using ov::ParamMap; } // namespace InferenceEngine diff --git a/src/inference/include/openvino/runtime/common.hpp b/src/inference/include/openvino/runtime/common.hpp index 34c53ed157d..8aa8bbf280f 100644 --- a/src/inference/include/openvino/runtime/common.hpp +++ b/src/inference/include/openvino/runtime/common.hpp @@ -43,7 +43,6 @@ namespace InferenceEngine {} namespace ov { namespace ie = InferenceEngine; -namespace runtime { /** * @brief This type of map is commonly used to pass set of device configuration parameters */ @@ -56,5 +55,9 @@ using ConfigMap = std::map; */ using SupportedOpsMap = std::map; +namespace runtime { +using ov::ConfigMap; +using ov::SupportedOpsMap; } // namespace runtime + } // namespace ov \ No newline at end of file diff --git a/src/inference/include/openvino/runtime/compiled_model.hpp b/src/inference/include/openvino/runtime/compiled_model.hpp index b9b3fc6ab6e..0b715f3435c 100644 --- a/src/inference/include/openvino/runtime/compiled_model.hpp +++ b/src/inference/include/openvino/runtime/compiled_model.hpp @@ -24,8 +24,8 @@ namespace InferenceEngine { class IExecutableNetworkInternal; } // namespace InferenceEngine + namespace ov { -namespace runtime { class Core; class InferRequest; @@ -47,8 +47,8 @@ class OPENVINO_RUNTIME_API CompiledModel { */ CompiledModel(const std::shared_ptr& impl, const std::shared_ptr& so); - friend class ov::runtime::Core; - friend class ov::runtime::InferRequest; + friend class ov::Core; + friend class ov::InferRequest; public: /** @@ -152,8 +152,8 @@ public: /** * @brief Exports the current compiled model to an output stream `std::ostream`. - * The exported model can also be imported via ov::runtime::Core::import_model method - * @see ov::runtime::Core::import_model + * The exported model can also be imported via ov::Core::import_model method + * @see ov::Core::import_model * @param model_stream Output stream to store the model to */ void export_model(std::ostream& model_stream); @@ -208,5 +208,8 @@ public: explicit operator bool() const noexcept; }; +namespace runtime { +using ov::CompiledModel; } // namespace runtime + } // namespace ov diff --git a/src/inference/include/openvino/runtime/core.hpp b/src/inference/include/openvino/runtime/core.hpp index 30a760f2dab..cd8960b671f 100644 --- a/src/inference/include/openvino/runtime/core.hpp +++ b/src/inference/include/openvino/runtime/core.hpp @@ -32,8 +32,6 @@ class IExtension; namespace ov { -namespace runtime { - /** * @brief This class represents OpenVINO runtime Core entity. * User applications can create several Core class instances, but in this case the underlying plugins @@ -267,7 +265,7 @@ public: /** * @brief Imports a compiled model from a previously exported one * @param model_stream std::istream input stream containing a model previously exported using - * ov::runtime::CompiledModel::export_model method + * ov::CompiledModel::export_model method * @param device_name Name of device to import compiled model for. Note, if @p device_name device was not used to * compile the original mode, an exception is thrown * @param config Optional map of pairs: (config parameter name, config parameter value) relevant only for this load @@ -281,7 +279,7 @@ public: /** * @brief Imports a compiled model from a previously exported one with a specified remote context. * @param model_stream std::istream input stream containing a model previously exported from - * ov::runtime::CompiledModel::export_model + * ov::CompiledModel::export_model * @param context A reference to a RemoteContext object. Note, if the device from @p context was not used to compile * the original mode, an exception is thrown * @param config Optional map of pairs: (config parameter name, config parameter value) relevant only for this load @@ -393,8 +391,8 @@ public: * - `location` specifies absolute path to dynamic library with a plugin. * A path can also be relative to inference engine shared library. It allows to have common config * for different systems with different configurations. - * - `properties` are set to a plugin via the ov::runtime::Core::set_config method. - * - `extensions` are set to a plugin via the ov::runtime::Core::add_extension method. + * - `properties` are set to a plugin via the ov::Core::set_config method. + * - `extensions` are set to a plugin via the ov::Core::add_extension method. * * @param xml_config_file A path to .xml file with plugins to register. */ @@ -416,5 +414,9 @@ public: */ RemoteContext get_default_context(const std::string& device_name); }; + +namespace runtime { +using ov::Core; } // namespace runtime + } // namespace ov diff --git a/src/inference/include/openvino/runtime/exception.hpp b/src/inference/include/openvino/runtime/exception.hpp index 3151dff870f..031ca3e01f7 100644 --- a/src/inference/include/openvino/runtime/exception.hpp +++ b/src/inference/include/openvino/runtime/exception.hpp @@ -8,7 +8,6 @@ #include "openvino/runtime/common.hpp" namespace ov { -namespace runtime { /** * @brief Thrown in case of cancel;ed asynchronous operation @@ -23,5 +22,10 @@ class OPENVINO_RUNTIME_API Cancelled : public Exception { class OPENVINO_RUNTIME_API Busy : public Exception { using Exception::Exception; }; + +namespace runtime { +using ov::Busy; +using ov::Cancelled; } // namespace runtime + } // namespace ov \ No newline at end of file diff --git a/src/inference/include/openvino/runtime/infer_request.hpp b/src/inference/include/openvino/runtime/infer_request.hpp index e311d563122..abd2fe9e3f4 100644 --- a/src/inference/include/openvino/runtime/infer_request.hpp +++ b/src/inference/include/openvino/runtime/infer_request.hpp @@ -24,7 +24,6 @@ class IInferRequestInternal; } // namespace InferenceEngine namespace ov { -namespace runtime { class CompiledModel; @@ -42,7 +41,7 @@ class OPENVINO_RUNTIME_API InferRequest { * destroyed. */ InferRequest(const std::shared_ptr& impl, const std::shared_ptr& so); - friend class ov::runtime::CompiledModel; + friend class ov::CompiledModel; public: /** @@ -99,10 +98,10 @@ public: * - ov::Model::inputs() * - ov::Model::outputs() * - ov::Model::outputs() - * - ov::runtime::CompiledModel::input() - * - ov::runtime::CompiledModel::inputs() - * - ov::runtime::CompiledModel::outputs() - * - ov::runtime::CompiledModel::outputs() + * - ov::CompiledModel::input() + * - ov::CompiledModel::inputs() + * - ov::CompiledModel::outputs() + * - ov::CompiledModel::outputs() * @param tensor Reference to a tensor. The element_type and shape of a tensor must match * the model's input/output element_type and size. */ @@ -115,10 +114,10 @@ public: * - ov::Model::inputs() * - ov::Model::outputs() * - ov::Model::outputs() - * - ov::runtime::CompiledModel::input() - * - ov::runtime::CompiledModel::inputs() - * - ov::runtime::CompiledModel::outputs() - * - ov::runtime::CompiledModel::outputs() + * - ov::CompiledModel::input() + * - ov::CompiledModel::inputs() + * - ov::CompiledModel::outputs() + * - ov::CompiledModel::outputs() * @param tensor Reference to a tensor. The element_type and shape of a tensor must match * the model's input/output element_type and size. */ @@ -185,7 +184,7 @@ public: /** * @brief Sets output tensor to infer - * @note An index of input preserved accross ov::Model, ov::runtime::CompiledModel and ov::runtime::InferRequest + * @note An index of input preserved accross ov::Model, ov::CompiledModel and ov::InferRequest * @param idx Index of output tensor. * @param tensor Reference to output tensor. The type of a tensor must match the model output element type and * shape. @@ -257,7 +256,7 @@ public: /** * @brief Infers specified input(s) in synchronous mode * @note blocks all methods of InferRequest while request is ongoing (running or waiting in queue) - * Calling any method will lead to throwning ov::runtime::Busy exception + * Calling any method will lead to throwning ov::Busy exception */ void infer(); @@ -276,7 +275,7 @@ public: /** * @brief Starts inference of specified input(s) in asynchronous mode * @note It returns immediately. Inference starts also immediately. - * Calling any method while the request in a running state will lead to throwning ov::runtime::Busy exception + * Calling any method while the request in a running state will lead to throwning ov::Busy exception */ void start_async(); @@ -341,5 +340,9 @@ public: */ bool operator==(const InferRequest& other) const noexcept; }; + +namespace runtime { +using ov::InferRequest; } // namespace runtime + } // namespace ov diff --git a/src/inference/include/openvino/runtime/intel_gpu/ocl/dx.hpp b/src/inference/include/openvino/runtime/intel_gpu/ocl/dx.hpp index 381be54f318..b4e1db1c9c5 100644 --- a/src/inference/include/openvino/runtime/intel_gpu/ocl/dx.hpp +++ b/src/inference/include/openvino/runtime/intel_gpu/ocl/dx.hpp @@ -27,7 +27,6 @@ #include "openvino/runtime/intel_gpu/ocl/ocl.hpp" namespace ov { -namespace runtime { namespace intel_gpu { namespace ocl { @@ -194,5 +193,4 @@ public: }; } // namespace ocl } // namespace intel_gpu -} // namespace runtime } // namespace ov diff --git a/src/inference/include/openvino/runtime/intel_gpu/ocl/ocl.hpp b/src/inference/include/openvino/runtime/intel_gpu/ocl/ocl.hpp index 8381da250cd..8d1ed73e204 100644 --- a/src/inference/include/openvino/runtime/intel_gpu/ocl/ocl.hpp +++ b/src/inference/include/openvino/runtime/intel_gpu/ocl/ocl.hpp @@ -20,7 +20,6 @@ #include "openvino/runtime/remote_tensor.hpp" namespace ov { -namespace runtime { namespace intel_gpu { namespace ocl { @@ -321,5 +320,4 @@ public: } // namespace ocl } // namespace intel_gpu -} // namespace runtime } // namespace ov diff --git a/src/inference/include/openvino/runtime/intel_gpu/ocl/va.hpp b/src/inference/include/openvino/runtime/intel_gpu/ocl/va.hpp index d3802e160f9..2f5bdc09e06 100644 --- a/src/inference/include/openvino/runtime/intel_gpu/ocl/va.hpp +++ b/src/inference/include/openvino/runtime/intel_gpu/ocl/va.hpp @@ -25,7 +25,6 @@ // clang-format on namespace ov { -namespace runtime { namespace intel_gpu { namespace ocl { @@ -148,5 +147,4 @@ public: }; } // namespace ocl } // namespace intel_gpu -} // namespace runtime } // namespace ov diff --git a/src/inference/include/openvino/runtime/parameter.hpp b/src/inference/include/openvino/runtime/parameter.hpp index 02abb4a4409..5793308d54e 100644 --- a/src/inference/include/openvino/runtime/parameter.hpp +++ b/src/inference/include/openvino/runtime/parameter.hpp @@ -13,10 +13,14 @@ #include "openvino/core/any.hpp" namespace ov { -namespace runtime { + /** * @brief An std::map object containing parameters */ using ParamMap = std::map; + +namespace runtime { +using ov::ParamMap; } // namespace runtime + } // namespace ov diff --git a/src/inference/include/openvino/runtime/profiling_info.hpp b/src/inference/include/openvino/runtime/profiling_info.hpp index d8270498c03..872901134b0 100644 --- a/src/inference/include/openvino/runtime/profiling_info.hpp +++ b/src/inference/include/openvino/runtime/profiling_info.hpp @@ -14,7 +14,7 @@ #include namespace ov { -namespace runtime { + /** * @struct ProfilingInfo * @brief Represents basic inference profiling information per operation. @@ -61,5 +61,9 @@ struct ProfilingInfo { */ std::string node_type; }; + +namespace runtime { +using ov::ProfilingInfo; } // namespace runtime + } // namespace ov \ No newline at end of file diff --git a/src/inference/include/openvino/runtime/remote_context.hpp b/src/inference/include/openvino/runtime/remote_context.hpp index 94e5adc2ea0..4fc3234dbf7 100644 --- a/src/inference/include/openvino/runtime/remote_context.hpp +++ b/src/inference/include/openvino/runtime/remote_context.hpp @@ -23,7 +23,6 @@ class RemoteContext; } // namespace InferenceEngine namespace ov { -namespace runtime { class Core; class CompiledModel; @@ -46,8 +45,8 @@ protected: * object is destroyed. */ RemoteContext(const std::shared_ptr& impl, const std::shared_ptr& so); - friend class ov::runtime::Core; - friend class ov::runtime::CompiledModel; + friend class ov::Core; + friend class ov::CompiledModel; public: /** @@ -167,5 +166,8 @@ public: Tensor create_host_tensor(const element::Type type, const Shape& shape); }; +namespace runtime { +using ov::RemoteContext; } // namespace runtime + } // namespace ov diff --git a/src/inference/include/openvino/runtime/remote_tensor.hpp b/src/inference/include/openvino/runtime/remote_tensor.hpp index e5f24774098..70c344f1ed3 100644 --- a/src/inference/include/openvino/runtime/remote_tensor.hpp +++ b/src/inference/include/openvino/runtime/remote_tensor.hpp @@ -14,7 +14,7 @@ #include "openvino/runtime/tensor.hpp" namespace ov { -namespace runtime { + class RemoteContext; /** @@ -22,7 +22,7 @@ class RemoteContext; */ class OPENVINO_RUNTIME_API RemoteTensor : public Tensor { using Tensor::Tensor; - friend class ov::runtime::RemoteContext; + friend class ov::RemoteContext; public: /** @@ -63,5 +63,8 @@ public: std::string get_device_name() const; }; +namespace runtime { +using ov::RemoteTensor; } // namespace runtime + } // namespace ov \ No newline at end of file diff --git a/src/inference/include/openvino/runtime/variable_state.hpp b/src/inference/include/openvino/runtime/variable_state.hpp index d8b008ff916..847af8e82ac 100644 --- a/src/inference/include/openvino/runtime/variable_state.hpp +++ b/src/inference/include/openvino/runtime/variable_state.hpp @@ -3,7 +3,7 @@ // /** - * @brief A header file that provides ov::runtime::VariableState + * @brief A header file that provides ov::VariableState * @file openvino/runtime/variable_state.hpp */ @@ -20,7 +20,6 @@ class IVariableStateInternal; } // namespace InferenceEngine namespace ov { -namespace runtime { class InferRequest; @@ -40,7 +39,7 @@ class OPENVINO_RUNTIME_API VariableState { VariableState(const std::shared_ptr& impl, const std::shared_ptr& so); - friend class ov::runtime::InferRequest; + friend class ov::InferRequest; public: /** @@ -78,5 +77,9 @@ public: */ void set_state(const Tensor& state); }; + +namespace runtime { +using ov::VariableState; } // namespace runtime + } // namespace ov diff --git a/src/inference/src/cpp/ie_executable_network.cpp b/src/inference/src/cpp/ie_executable_network.cpp index c2391874738..08d37882222 100644 --- a/src/inference/src/cpp/ie_executable_network.cpp +++ b/src/inference/src/cpp/ie_executable_network.cpp @@ -115,7 +115,6 @@ ExecutableNetwork::operator bool() const noexcept { } // namespace InferenceEngine namespace ov { -namespace runtime { CompiledModel::~CompiledModel() { _impl = {}; @@ -230,5 +229,5 @@ bool CompiledModel::operator!() const noexcept { CompiledModel::operator bool() const noexcept { return !!_impl; } -} // namespace runtime + } // namespace ov diff --git a/src/inference/src/cpp/ie_infer_request.cpp b/src/inference/src/cpp/ie_infer_request.cpp index ac2afc9be26..cc0048ed61c 100644 --- a/src/inference/src/cpp/ie_infer_request.cpp +++ b/src/inference/src/cpp/ie_infer_request.cpp @@ -52,7 +52,7 @@ namespace InferenceEngine { try { \ __VA_ARGS__; \ } catch (const ::InferenceEngine::RequestBusy& ex) { \ - throw ov::runtime::Busy(ex.what()); \ + throw ov::Busy(ex.what()); \ } catch (const std::exception& ex) { \ throw ov::Exception(ex.what()); \ } catch (...) { \ @@ -243,7 +243,6 @@ std::string get_legacy_name_from_port(const ov::Output& port) { } // namespace namespace ov { -namespace runtime { InferRequest::~InferRequest() { _impl = {}; @@ -521,5 +520,4 @@ bool InferRequest::operator==(const InferRequest& r) const noexcept { return r._impl == _impl; } -} // namespace runtime } // namespace ov diff --git a/src/inference/src/cpp/ie_plugin.hpp b/src/inference/src/cpp/ie_plugin.hpp index 0348fd8c7d8..ae0a40030e7 100644 --- a/src/inference/src/cpp/ie_plugin.hpp +++ b/src/inference/src/cpp/ie_plugin.hpp @@ -65,17 +65,17 @@ struct InferencePlugin { PLUGIN_CALL_STATEMENT(_ptr->SetConfig(config)); } - ov::runtime::SoPtr LoadNetwork(const CNNNetwork& network, const std::map& config) { + ov::SoPtr LoadNetwork(const CNNNetwork& network, const std::map& config) { PLUGIN_CALL_STATEMENT(return {_ptr->LoadNetwork(network, config), _so}); } - ov::runtime::SoPtr LoadNetwork(const CNNNetwork& network, + ov::SoPtr LoadNetwork(const CNNNetwork& network, const std::shared_ptr& context, const std::map& config) { PLUGIN_CALL_STATEMENT(return {_ptr->LoadNetwork(network, config, context), _so}); } - ov::runtime::SoPtr LoadNetwork(const std::string& modelPath, const std::map& config) { + ov::SoPtr LoadNetwork(const std::string& modelPath, const std::map& config) { PLUGIN_CALL_STATEMENT(return {_ptr->LoadNetwork(modelPath, config), _so}); } @@ -87,17 +87,17 @@ struct InferencePlugin { return res; } - ov::runtime::SoPtr ImportNetwork(const std::string& modelFileName, + ov::SoPtr ImportNetwork(const std::string& modelFileName, const std::map& config) { PLUGIN_CALL_STATEMENT(return {_ptr->ImportNetwork(modelFileName, config), _so}); } - ov::runtime::SoPtr ImportNetwork(std::istream& networkModel, + ov::SoPtr ImportNetwork(std::istream& networkModel, const std::map& config) { PLUGIN_CALL_STATEMENT(return {_ptr->ImportNetwork(networkModel, config), _so}); } - ov::runtime::SoPtr ImportNetwork(std::istream& networkModel, + ov::SoPtr ImportNetwork(std::istream& networkModel, const std::shared_ptr& context, const std::map& config) { PLUGIN_CALL_STATEMENT(return {_ptr->ImportNetwork(networkModel, context, config), _so}); @@ -107,11 +107,11 @@ struct InferencePlugin { PLUGIN_CALL_STATEMENT(return {_ptr->GetMetric(name, options), _so}); } - ov::runtime::SoPtr CreateContext(const ParamMap& params) { + ov::SoPtr CreateContext(const ParamMap& params) { PLUGIN_CALL_STATEMENT(return {_ptr->CreateContext(params), _so}); } - ov::runtime::SoPtr GetDefaultContext(const ParamMap& params) { + ov::SoPtr GetDefaultContext(const ParamMap& params) { PLUGIN_CALL_STATEMENT(return {_ptr->GetDefaultContext(params), _so}); } @@ -127,7 +127,6 @@ struct InferencePlugin { #endif namespace ov { -namespace runtime { #define OV_PLUGIN_CALL_STATEMENT(...) \ OPENVINO_ASSERT(_ptr != nullptr, "InferencePlugin was not initialized."); \ @@ -234,7 +233,6 @@ public: } }; -} // namespace runtime } // namespace ov #undef PLUGIN_CALL_STATEMENT diff --git a/src/inference/src/cpp/ie_remote_context.cpp b/src/inference/src/cpp/ie_remote_context.cpp index d9fafc5f7cd..87489d0ed41 100644 --- a/src/inference/src/cpp/ie_remote_context.cpp +++ b/src/inference/src/cpp/ie_remote_context.cpp @@ -23,7 +23,6 @@ } namespace ov { -namespace runtime { void RemoteContext::type_check(const RemoteContext& tensor, const std::map>& type_info) { @@ -92,5 +91,4 @@ ParamMap RemoteContext::get_params() const { return paramMap; } -} // namespace runtime } // namespace ov diff --git a/src/inference/src/cpp/ie_variable_state.cpp b/src/inference/src/cpp/ie_variable_state.cpp index 253701973b6..dbcbe8d6f05 100644 --- a/src/inference/src/cpp/ie_variable_state.cpp +++ b/src/inference/src/cpp/ie_variable_state.cpp @@ -60,7 +60,6 @@ void VariableState::SetState(Blob::Ptr state) { } // namespace InferenceEngine namespace ov { -namespace runtime { VariableState::~VariableState() { _impl = {}; @@ -88,5 +87,4 @@ void VariableState::set_state(const Tensor& state) { OV_VARIABLE_CALL_STATEMENT(_impl->SetState(state._impl)); } -} // namespace runtime } // namespace ov diff --git a/src/inference/src/ie_core.cpp b/src/inference/src/ie_core.cpp index d0db8e2b0be..8f68bb41b4d 100644 --- a/src/inference/src/ie_core.cpp +++ b/src/inference/src/ie_core.cpp @@ -54,8 +54,6 @@ namespace ov { // Specify the default device when no device name is provided. const std::string DEFAULT_DEVICE_NAME = "DEFAULT_DEVICE"; -namespace runtime { - namespace { #ifndef OPENVINO_STATIC_LIBRARY @@ -121,7 +119,7 @@ void allowNotImplemented(F&& f) { } // namespace class CoreImpl : public ie::ICore, public std::enable_shared_from_this { - mutable std::map plugins; + mutable std::map plugins; class CoreConfig final { public: @@ -204,7 +202,7 @@ class CoreImpl : public ie::ICore, public std::enable_shared_from_this supportedMetricKeys = plugin.get_metric(METRIC_KEY(SUPPORTED_METRICS), {}); auto it = std::find(supportedMetricKeys.begin(), supportedMetricKeys.end(), METRIC_KEY(IMPORT_EXPORT_SUPPORT)); auto supported = @@ -212,11 +210,11 @@ class CoreImpl : public ie::ICore, public std::enable_shared_from_this supportedMetricKeys; try { @@ -232,16 +230,15 @@ class CoreImpl : public ie::ICore, public std::enable_shared_from_this compile_model_impl( - const InferenceEngine::CNNNetwork& network, - ov::runtime::InferencePlugin& plugin, - const std::map& parsedConfig, - const ie::RemoteContext::Ptr& context, - const std::string& blobID, - const std::string& modelPath = std::string(), - bool forceDisableCache = false) { + ov::SoPtr compile_model_impl(const InferenceEngine::CNNNetwork& network, + ov::InferencePlugin& plugin, + const std::map& parsedConfig, + const ie::RemoteContext::Ptr& context, + const std::string& blobID, + const std::string& modelPath = std::string(), + bool forceDisableCache = false) { OV_ITT_SCOPED_TASK(ov::itt::domains::IE, "CoreImpl::compile_model_impl"); - ov::runtime::SoPtr execNetwork; + ov::SoPtr execNetwork; execNetwork = context ? plugin.compile_model(network, context, parsedConfig) : plugin.compile_model(network, parsedConfig); auto cacheManager = coreConfig.getCacheConfig()._cacheManager; @@ -263,15 +260,15 @@ class CoreImpl : public ie::ICore, public std::enable_shared_from_this LoadNetworkFromCache( + ov::SoPtr LoadNetworkFromCache( const std::shared_ptr& cacheManager, const std::string& blobId, - ov::runtime::InferencePlugin& plugin, + ov::InferencePlugin& plugin, const std::map& config, const std::shared_ptr& context, bool& networkIsImported, const std::string& modelPath = std::string()) { - ov::runtime::SoPtr execNetwork; + ov::SoPtr execNetwork; struct HeaderException {}; OPENVINO_ASSERT(cacheManager != nullptr); @@ -312,7 +309,7 @@ class CoreImpl : public ie::ICore, public std::enable_shared_from_this CreateCompileConfig(const ov::runtime::InferencePlugin& plugin, + std::map CreateCompileConfig(const ov::InferencePlugin& plugin, const std::string& deviceFamily, const std::map& origConfig) const { std::map getMetricConfig; @@ -349,7 +346,7 @@ class CoreImpl : public ie::ICore, public std::enable_shared_from_this& config) const { auto compileConfig = CreateCompileConfig(plugin, deviceFamily, config); return ie::NetworkCompilationContext::computeHash(network, compileConfig); @@ -357,7 +354,7 @@ class CoreImpl : public ie::ICore, public std::enable_shared_from_this& config) const { auto compileConfig = CreateCompileConfig(plugin, deviceFamily, config); return ie::NetworkCompilationContext::computeHash(modelName, compileConfig); @@ -484,10 +481,9 @@ public: return newAPI; } - ov::runtime::SoPtr LoadNetwork( - const ie::CNNNetwork& network, - const std::shared_ptr& context, - const std::map& config) override { + ov::SoPtr LoadNetwork(const ie::CNNNetwork& network, + const std::shared_ptr& context, + const std::map& config) override { OV_ITT_SCOPE(FIRST_INFERENCE, ie::itt::domains::IE_LT, "Core::LoadNetwork::RemoteContext"); if (context == nullptr) { IE_THROW() << "Remote context is null"; @@ -501,7 +497,7 @@ public: parsed = parseDeviceNameIntoConfig(deviceName, config_with_batch); auto plugin = GetCPPPluginByName(parsed._deviceName); - ov::runtime::SoPtr res; + ov::SoPtr res; auto cacheManager = coreConfig.getCacheConfig()._cacheManager; if (cacheManager && DeviceSupportsImportExport(plugin)) { auto hash = CalculateNetworkHash(network, parsed._deviceName, plugin, parsed._config); @@ -542,7 +538,7 @@ public: return; } // check whether if the Auto-Batching is applicable to the device - auto device = ov::runtime::parseDeviceNameIntoConfig(deviceName); + auto device = ov::parseDeviceNameIntoConfig(deviceName); deviceNameWithoutBatch = deviceName; auto d = device._deviceName; std::vector metrics = GetCPPPluginByName(d).get_metric(METRIC_KEY(SUPPORTED_METRICS), {}); @@ -609,7 +605,7 @@ public: parsed._config.erase(CONFIG_KEY_INTERNAL(FORCE_DISABLE_CACHE)); } auto plugin = GetCPPPluginByName(parsed._deviceName); - ov::runtime::SoPtr res; + ov::SoPtr res; auto cacheManager = coreConfig.getCacheConfig()._cacheManager; if (!forceDisableCache && cacheManager && DeviceSupportsImportExport(plugin)) { auto hash = CalculateNetworkHash(network, parsed._deviceName, plugin, parsed._config); @@ -634,7 +630,7 @@ public: OV_ITT_SCOPE(FIRST_INFERENCE, ie::itt::domains::IE_LT, "Core::LoadNetwork::Path"); auto parsed = parseDeviceNameIntoConfig(deviceName, config); auto plugin = GetCPPPluginByName(parsed._deviceName); - ov::runtime::SoPtr res; + ov::SoPtr res; auto cacheManager = coreConfig.getCacheConfig()._cacheManager; if (cacheManager && DeviceSupportsImportExport(plugin)) { bool loadedFromCache = false; @@ -846,7 +842,7 @@ public: */ InferenceEngine::RemoteContext::Ptr CreateContext(const std::string& deviceName, const InferenceEngine::ParamMap& params) override { - auto parsed = ov::runtime::parseDeviceNameIntoConfig(deviceName, params); + auto parsed = ov::parseDeviceNameIntoConfig(deviceName, params); return GetCPPPluginByName(parsed._deviceName).create_context(parsed._config)._ptr; } @@ -855,7 +851,7 @@ public: * @param deviceName A name of device * @return Reference to a CPP plugin wrapper */ - ov::runtime::InferencePlugin GetCPPPluginByName(const std::string& pluginName) const { + ov::InferencePlugin GetCPPPluginByName(const std::string& pluginName) const { OV_ITT_SCOPE(FIRST_INFERENCE, ie::itt::domains::IE_LT, "CoreImpl::GetCPPPluginByName"); std::lock_guard lock(pluginsMutex); @@ -876,7 +872,7 @@ public: PluginDescriptor desc = it->second; std::shared_ptr so; try { - ov::runtime::InferencePlugin plugin; + ov::InferencePlugin plugin; if (desc.pluginCreateFunc) { // static OpenVINO case std::shared_ptr plugin_impl; @@ -1163,7 +1159,7 @@ public: ie::DeviceIDParser parser(deviceName_); std::string deviceNameLocal = parser.getDeviceName(); - ov::runtime::InferencePlugin cppPlugin = GetCPPPluginByName(deviceNameLocal); + ov::InferencePlugin cppPlugin = GetCPPPluginByName(deviceNameLocal); const ie::Version version = cppPlugin.get_version(); versions[deviceNameLocal] = version; } @@ -1202,7 +1198,6 @@ private: } }; -} // namespace runtime } // namespace ov namespace InferenceEngine { @@ -1288,9 +1283,9 @@ std::string DeviceIDParser::getBatchDevice(std::string device) { return trim_request_info(device); } -class Core::Impl : public ov::runtime::CoreImpl { +class Core::Impl : public ov::CoreImpl { public: - Impl() : ov::runtime::CoreImpl(false) {} + Impl() : ov::CoreImpl(false) {} }; Core::Core(const std::string& xmlConfigFile) { @@ -1299,7 +1294,7 @@ Core::Core(const std::string& xmlConfigFile) { #ifdef OPENVINO_STATIC_LIBRARY _impl->RegisterPluginsInRegistry(::getStaticPluginsRegistry()); #else - RegisterPlugins(ov::runtime::parseXmlConfig(xmlConfigFile)); + RegisterPlugins(ov::parseXmlConfig(xmlConfigFile)); #endif } @@ -1367,7 +1362,7 @@ RemoteContext::Ptr Core::GetDefaultContext(const std::string& deviceName) { IE_THROW() << "AUTO device does not support remote context"; } - auto parsed = ov::runtime::parseDeviceNameIntoConfig(deviceName, ParamMap()); + auto parsed = ov::parseDeviceNameIntoConfig(deviceName, ParamMap()); return _impl->GetCPPPluginByName(parsed._deviceName).get_default_context(parsed._config)._ptr; } @@ -1393,7 +1388,7 @@ ExecutableNetwork Core::ImportNetwork(const std::string& modelFileName, const std::string& deviceName, const std::map& config) { OV_ITT_SCOPED_TASK(ov::itt::domains::IE, "Core::ImportNetwork"); - auto parsed = ov::runtime::parseDeviceNameIntoConfig(deviceName, config); + auto parsed = ov::parseDeviceNameIntoConfig(deviceName, config); auto exec = _impl->GetCPPPluginByName(parsed._deviceName).import_model(modelFileName, parsed._config); return {exec._ptr, exec._so}; } @@ -1441,7 +1436,7 @@ ExecutableNetwork Core::ImportNetwork(std::istream& networkModel, DeviceIDParser device(deviceName_); std::string deviceName = device.getDeviceName(); - auto parsed = ov::runtime::parseDeviceNameIntoConfig(deviceName, config); + auto parsed = ov::parseDeviceNameIntoConfig(deviceName, config); auto exec = _impl->GetCPPPluginByName(deviceName) .import_model(networkModel, std::dynamic_pointer_cast(context), parsed._config); return {exec._ptr, exec._so}; @@ -1502,7 +1497,7 @@ Parameter Core::GetConfig(const std::string& deviceName, const std::string& name } } - auto parsed = ov::runtime::parseDeviceNameIntoConfig(deviceName); + auto parsed = ov::parseDeviceNameIntoConfig(deviceName); return _impl->GetCPPPluginByName(parsed._deviceName).get_config(name, parsed._config); } @@ -1532,7 +1527,6 @@ void Core::UnregisterPlugin(const std::string& deviceName_) { } // namespace InferenceEngine namespace ov { -namespace runtime { #define OV_CORE_CALL_STATEMENT(...) \ try { \ @@ -1545,7 +1539,7 @@ namespace runtime { class Core::Impl : public CoreImpl { public: - Impl() : ov::runtime::CoreImpl(true) {} + Impl() : ov::CoreImpl(true) {} }; Core::Core(const std::string& xmlConfigFile) { @@ -1580,7 +1574,7 @@ std::shared_ptr Core::read_model(const std::string& modelPath, const OV_CORE_CALL_STATEMENT(return _impl->ReadNetwork(modelPath, binPath).getFunction();); } -std::shared_ptr Core::read_model(const std::string& model, const ov::runtime::Tensor& weights) const { +std::shared_ptr Core::read_model(const std::string& model, const ov::Tensor& weights) const { InferenceEngine::Blob::Ptr blob; if (weights) { blob = weights._impl; @@ -1782,5 +1776,4 @@ RemoteContext Core::get_default_context(const std::string& deviceName) { }); } -} // namespace runtime } // namespace ov diff --git a/src/inference/src/ie_network_reader.cpp b/src/inference/src/ie_network_reader.cpp index 81169e7ff5f..763f6bcf1bc 100644 --- a/src/inference/src/ie_network_reader.cpp +++ b/src/inference/src/ie_network_reader.cpp @@ -83,7 +83,7 @@ class Reader : public IReader { # ifdef OPENVINO_STATIC_LIBRARY using ReaderPtr = std::shared_ptr; # else - using ReaderPtr = ov::runtime::SoPtr; + using ReaderPtr = ov::SoPtr; # endif ReaderPtr ptr; std::once_flag readFlag; diff --git a/src/inference/src/remote_tensor.cpp b/src/inference/src/remote_tensor.cpp index 46b858713b2..bd7bb41ede3 100644 --- a/src/inference/src/remote_tensor.cpp +++ b/src/inference/src/remote_tensor.cpp @@ -8,7 +8,6 @@ #include "ie_remote_blob.hpp" namespace ov { -namespace runtime { void RemoteTensor::type_check(const Tensor& tensor, const std::map>& type_info) { OPENVINO_ASSERT(tensor, "Could not check empty tensor type"); @@ -62,5 +61,4 @@ std::string RemoteTensor::get_device_name() const { OPENVINO_ASSERT(false, "Unexpected exception"); } } -} // namespace runtime } // namespace ov diff --git a/src/plugins/intel_cpu/src/nodes/mkldnn_reference_node.cpp b/src/plugins/intel_cpu/src/nodes/mkldnn_reference_node.cpp index bdd15b8dada..cb31a30f70b 100644 --- a/src/plugins/intel_cpu/src/nodes/mkldnn_reference_node.cpp +++ b/src/plugins/intel_cpu/src/nodes/mkldnn_reference_node.cpp @@ -55,17 +55,17 @@ void MKLDNNReferenceNode::initSupportedPrimitiveDescriptors() { void MKLDNNReferenceNode::createPrimitive() {} void MKLDNNReferenceNode::execute(mkldnn::stream strm) { - ov::runtime::TensorVector inputs; + ov::TensorVector inputs; for (size_t i = 0; i < inputShapes.size(); i++) { void *srcDataPtr = getParentEdgesAtPort(i)[0]->getMemory().GetPtr(); - inputs.push_back(ov::runtime::Tensor(ngraphOp->get_input_element_type(i), + inputs.push_back(ov::Tensor(ngraphOp->get_input_element_type(i), getParentEdgesAtPort(i)[0]->getMemory().getStaticDims(), srcDataPtr)); } - ov::runtime::TensorVector outputs; + ov::TensorVector outputs; for (size_t i = 0; i < outputShapes.size(); i++) { void *dstDataPtr = getChildEdgesAtPort(i)[0]->getMemory().GetPtr(); - outputs.push_back(ov::runtime::Tensor(ngraphOp->get_output_element_type(i), + outputs.push_back(ov::Tensor(ngraphOp->get_output_element_type(i), getChildEdgesAtPort(i)[0]->getMemory().getStaticDims(), dstDataPtr)); } diff --git a/src/plugins/intel_gna/ops/softsign.cpp b/src/plugins/intel_gna/ops/softsign.cpp index be9c8249f82..bf33621d3d7 100644 --- a/src/plugins/intel_gna/ops/softsign.cpp +++ b/src/plugins/intel_gna/ops/softsign.cpp @@ -33,14 +33,14 @@ std::shared_ptr SoftSign::clone_with_new_inputs(const ngraph::Outp } template -inline bool evaluate(const ov::runtime::Tensor& arg, ov::runtime::Tensor& out, const size_t count) { +inline bool evaluate(const ov::Tensor& arg, ov::Tensor& out, const size_t count) { using T = typename ngraph::element_type_traits::value_type; softsign(arg.data(), out.data(), count); return true; } namespace { -bool evaluate_softsign(const ov::runtime::Tensor& arg, ov::runtime::Tensor& out) { +bool evaluate_softsign(const ov::Tensor& arg, ov::Tensor& out) { bool rc = true; size_t count = shape_size(arg.get_shape()); @@ -59,8 +59,8 @@ bool evaluate_softsign(const ov::runtime::Tensor& arg, ov::runtime::Tensor& out) } } // namespace -bool SoftSign::evaluate(ov::runtime::TensorVector& outputs, - const ov::runtime::TensorVector& inputs, +bool SoftSign::evaluate(ov::TensorVector& outputs, + const ov::TensorVector& inputs, const ov::EvaluationContext& evaluation_context) const { return evaluate_softsign(inputs[0], outputs[0]); } diff --git a/src/plugins/intel_gna/ops/softsign.hpp b/src/plugins/intel_gna/ops/softsign.hpp index f96bf4b4710..e4da033893c 100644 --- a/src/plugins/intel_gna/ops/softsign.hpp +++ b/src/plugins/intel_gna/ops/softsign.hpp @@ -22,8 +22,8 @@ public: /// \param data Input tensor SoftSign(const ngraph::Output& arg); std::shared_ptr clone_with_new_inputs(const ngraph::OutputVector& new_args) const override; - bool evaluate(ov::runtime::TensorVector& output_values, - const ov::runtime::TensorVector& input_values, + bool evaluate(ov::TensorVector& output_values, + const ov::TensorVector& input_values, const ov::EvaluationContext & evaluation_context) const override; bool has_evaluate() const override; }; diff --git a/src/tests/functional/inference_engine/ir_serialization/custom_ops.cpp b/src/tests/functional/inference_engine/ir_serialization/custom_ops.cpp index 57ed45ba49a..b25b9a3df00 100644 --- a/src/tests/functional/inference_engine/ir_serialization/custom_ops.cpp +++ b/src/tests/functional/inference_engine/ir_serialization/custom_ops.cpp @@ -155,7 +155,7 @@ TEST_F(CustomOpsSerializationTest, CustomOpOVExtensions) { const std::string model = CommonTestUtils::getModelFromTestModelZoo(IR_SERIALIZATION_MODELS_PATH "custom_identity.xml"); - ov::runtime::Core core; + ov::Core core; core.add_extension(get_ov_extension_path()); auto expected = core.read_model(model); ngraph::pass::Manager manager; diff --git a/src/tests/functional/inference_engine/ir_serialization/deterministicity.cpp b/src/tests/functional/inference_engine/ir_serialization/deterministicity.cpp index 89e499fa070..fe5776c2842 100644 --- a/src/tests/functional/inference_engine/ir_serialization/deterministicity.cpp +++ b/src/tests/functional/inference_engine/ir_serialization/deterministicity.cpp @@ -127,7 +127,7 @@ TEST_F(DeterministicityTest, IRInputsOrder) { auto model = std::make_shared(NodeVector{res}, ParameterVector{a, b, c}); - runtime::Core core; + ov::Core core; auto serialize = pass::Serialize(m_out_xml_path, m_out_bin_path); serialize.run_on_function(model); auto serialized_func = core.read_model(m_out_xml_path); @@ -157,7 +157,7 @@ TEST_F(DeterministicityTest, IROutputsOrder) { auto model = std::make_shared(NodeVector{res1, res2, res3}, ParameterVector{a}); - runtime::Core core; + ov::Core core; auto serialize = pass::Serialize(m_out_xml_path, m_out_bin_path); serialize.run_on_function(model); auto serialized_func = core.read_model(m_out_xml_path); diff --git a/src/tests/functional/inference_engine/ir_serialization/rt_info_deserialization.cpp b/src/tests/functional/inference_engine/ir_serialization/rt_info_deserialization.cpp index 77b6f13b6ac..f6269a4d7f2 100644 --- a/src/tests/functional/inference_engine/ir_serialization/rt_info_deserialization.cpp +++ b/src/tests/functional/inference_engine/ir_serialization/rt_info_deserialization.cpp @@ -185,8 +185,8 @@ TEST_F(RTInfoDeserialization, NodeV10) { std::make_shared(ngraph::ResultVector{result}, ngraph::ParameterVector{param}); f_10_ref->set_friendly_name("Network"); - ov::runtime::Core core; - auto f_10_core = core.read_model(model, ov::runtime::Tensor()); + ov::Core core; + auto f_10_core = core.read_model(model, ov::Tensor()); ASSERT_NE(nullptr, f_10_core); check_version(f_10_core, 10); @@ -287,8 +287,8 @@ TEST_F(RTInfoDeserialization, NamesCollisionV10) { // read IR v10 with new API and check that CNNNetwork precision conversions are applied { - ov::runtime::Core core; - EXPECT_THROW(core.read_model(model, ov::runtime::Tensor()), ov::Exception); + ov::Core core; + EXPECT_THROW(core.read_model(model, ov::Tensor()), ov::Exception); } } @@ -430,8 +430,8 @@ TEST_F(RTInfoDeserialization, InputAndOutputV10) { std::make_shared(ngraph::ResultVector{result}, ngraph::ParameterVector{param}); f_10_ref->set_friendly_name("Network"); - ov::runtime::Core core; - auto f_10_core = core.read_model(model, ov::runtime::Tensor()); + ov::Core core; + auto f_10_core = core.read_model(model, ov::Tensor()); ASSERT_NE(nullptr, f_10_core); check_version(f_10_core, 10); @@ -557,8 +557,8 @@ TEST_F(RTInfoDeserialization, NodeV11) { // read IR v11 with new API { - ov::runtime::Core core; - auto f_11 = core.read_model(model, ov::runtime::Tensor()); + ov::Core core; + auto f_11 = core.read_model(model, ov::Tensor()); ASSERT_NE(nullptr, f_11); check_old_api_map_order(f_11->get_parameters()[0]->get_rt_info(), std::vector({0, 2, 3, 1})); diff --git a/src/tests/functional/inference_engine/ngraph_reader/net_reader_test.cpp b/src/tests/functional/inference_engine/ngraph_reader/net_reader_test.cpp index 209846df15e..4f603db4d3d 100644 --- a/src/tests/functional/inference_engine/ngraph_reader/net_reader_test.cpp +++ b/src/tests/functional/inference_engine/ngraph_reader/net_reader_test.cpp @@ -55,7 +55,7 @@ protected: }; TEST_P(NetReaderTest, ReadNetworkTwiceSeparately) { - ov::runtime::Core ie; + ov::Core ie; auto network = ie.read_model(_modelPath, _weightsPath); auto network2 = ie.read_model(_modelPath, _weightsPath); diff --git a/src/tests/functional/inference_engine/ngraph_reader/topK_tests.cpp b/src/tests/functional/inference_engine/ngraph_reader/topK_tests.cpp index ef9e5924c75..4cf29218ae1 100644 --- a/src/tests/functional/inference_engine/ngraph_reader/topK_tests.cpp +++ b/src/tests/functional/inference_engine/ngraph_reader/topK_tests.cpp @@ -317,8 +317,8 @@ TEST_F(NGraphReaderTests, ReadTopKV10Network) { )V0G0N"; - ov::runtime::Core core; - ov::runtime::Tensor t(ov::element::i64, {1}); + ov::Core core; + ov::Tensor t(ov::element::i64, {1}); t.data()[0] = 5; core.read_model(model, t); } diff --git a/src/tests/functional/inference_engine/ov_compiled_model_test.cpp b/src/tests/functional/inference_engine/ov_compiled_model_test.cpp index 099c309fb18..63d31be2345 100644 --- a/src/tests/functional/inference_engine/ov_compiled_model_test.cpp +++ b/src/tests/functional/inference_engine/ov_compiled_model_test.cpp @@ -10,71 +10,71 @@ using namespace ::testing; using namespace std; TEST(ExecutableNetworkOVTests, throwsOnUninitializedExportStream) { - ov::runtime::CompiledModel exec; + ov::CompiledModel exec; ASSERT_THROW(exec.export_model(std::cout), ov::Exception); } TEST(ExecutableNetworkOVTests, throwsOnUninitializedGetFunction) { - ov::runtime::CompiledModel exec; + ov::CompiledModel exec; ASSERT_THROW(exec.get_runtime_model(), ov::Exception); } TEST(ExecutableNetworkOVTests, throwsOnUninitializedOutputs) { - ov::runtime::CompiledModel exec; + ov::CompiledModel exec; ASSERT_THROW(exec.outputs(), ov::Exception); } TEST(ExecutableNetworkOVTests, throwsOnUninitializedOutput) { - ov::runtime::CompiledModel exec; + ov::CompiledModel exec; ASSERT_THROW(exec.output(), ov::Exception); } TEST(ExecutableNetworkOVTests, throwsOnUninitializedOutputTensor) { - ov::runtime::CompiledModel exec; + ov::CompiledModel exec; ASSERT_THROW(exec.output("tensor"), ov::Exception); } TEST(ExecutableNetworkOVTests, throwsOnUninitializedOutputIndex) { - ov::runtime::CompiledModel exec; + ov::CompiledModel exec; ASSERT_THROW(exec.output(1), ov::Exception); } TEST(ExecutableNetworkOVTests, throwsOnUninitializedInputs) { - ov::runtime::CompiledModel exec; + ov::CompiledModel exec; ASSERT_THROW(exec.inputs(), ov::Exception); } TEST(ExecutableNetworkOVTests, throwsOnUninitializedInput) { - ov::runtime::CompiledModel exec; + ov::CompiledModel exec; ASSERT_THROW(exec.input(), ov::Exception); } TEST(ExecutableNetworkOVTests, throwsOnUninitializedInputTensor) { - ov::runtime::CompiledModel exec; + ov::CompiledModel exec; ASSERT_THROW(exec.input("tensor"), ov::Exception); } TEST(ExecutableNetworkOVTests, throwsOnUninitializedInputIndex) { - ov::runtime::CompiledModel exec; + ov::CompiledModel exec; ASSERT_THROW(exec.input(1), ov::Exception); } TEST(ExecutableNetworkOVTests, throwsOnUninitializedSetConfig) { - ov::runtime::CompiledModel exec; + ov::CompiledModel exec; ASSERT_THROW(exec.set_config({{}}), ov::Exception); } TEST(ExecutableNetworkOVTests, throwsOnUninitializedGetConfig) { - ov::runtime::CompiledModel exec; + ov::CompiledModel exec; ASSERT_THROW(exec.get_config({}), ov::Exception); } TEST(ExecutableNetworkOVTests, throwsOnUninitializedGetMetric) { - ov::runtime::CompiledModel exec; + ov::CompiledModel exec; ASSERT_THROW(exec.get_metric({}), ov::Exception); } TEST(ExecutableNetworkOVTests, throwsOnUninitializedGetContext) { - ov::runtime::CompiledModel exec; + ov::CompiledModel exec; ASSERT_THROW(exec.get_context(), ov::Exception); } diff --git a/src/tests/functional/inference_engine/ov_extension_test.cpp b/src/tests/functional/inference_engine/ov_extension_test.cpp index 35f3db12abf..9a96573d1f6 100644 --- a/src/tests/functional/inference_engine/ov_extension_test.cpp +++ b/src/tests/functional/inference_engine/ov_extension_test.cpp @@ -23,7 +23,7 @@ using namespace CommonTestUtils; class OVExtensionTests : public TestsCommon { public: - ov::runtime::Core core; + ov::Core core; void test() { std::string model = R"V0G0N( @@ -75,7 +75,7 @@ public: )V0G0N"; - ov::runtime::Tensor weights; + ov::Tensor weights; ov::PartialShape refBeforeReshape{1, 3, 22, 22}; ov::PartialShape refAfterReshape{8, 9, 33, 66}; @@ -157,7 +157,7 @@ public: )V0G0N"; - ov::runtime::Tensor weights; + ov::Tensor weights; ov::PartialShape refBeforeReshape{1, 3, 22, 22}; ov::PartialShape refAfterReshape{8, 9, 33, 66}; diff --git a/src/tests/functional/inference_engine/ov_infer_request_test.cpp b/src/tests/functional/inference_engine/ov_infer_request_test.cpp index d2a89b18bd2..f76503cc90d 100644 --- a/src/tests/functional/inference_engine/ov_infer_request_test.cpp +++ b/src/tests/functional/inference_engine/ov_infer_request_test.cpp @@ -16,77 +16,77 @@ using namespace InferenceEngine; using namespace InferenceEngine::details; TEST(InferRequestOVTests, throwsOnUninitializedSetTensor) { - ov::runtime::InferRequest req; + ov::InferRequest req; ASSERT_THROW(req.set_tensor("", {}), ov::Exception); } TEST(InferRequestOVTests, throwsOnUninitializedGetTensor) { - ov::runtime::InferRequest req; + ov::InferRequest req; ASSERT_THROW(req.get_tensor(""), ov::Exception); } TEST(InferRequestOVTests, throwsOnUninitializedInfer) { - ov::runtime::InferRequest req; + ov::InferRequest req; ASSERT_THROW(req.infer(), ov::Exception); } TEST(InferRequestOVTests, throwsOnUninitializedGetPerformanceCounts) { - ov::runtime::InferRequest req; + ov::InferRequest req; ASSERT_THROW(req.get_profiling_info(), ov::Exception); } TEST(InferRequestOVTests, throwsOnUninitializedStartAsync) { - ov::runtime::InferRequest req; + ov::InferRequest req; ASSERT_THROW(req.start_async(), ov::Exception); } TEST(InferRequestOVTests, throwsOnUninitializedWait) { - ov::runtime::InferRequest req; + ov::InferRequest req; ASSERT_THROW(req.wait(), ov::Exception); } TEST(InferRequestOVTests, throwsOnUninitializedWaitFor) { - ov::runtime::InferRequest req; + ov::InferRequest req; ASSERT_THROW(req.wait_for({}), ov::Exception); } TEST(InferRequestOVTests, throwsOnUninitializedSetCompletionCallback) { - ov::runtime::InferRequest req; + ov::InferRequest req; std::function f; ASSERT_THROW(req.set_callback(f), ov::Exception); } TEST(InferRequestOVTests, throwsOnUninitializedQueryState) { - ov::runtime::InferRequest req; + ov::InferRequest req; ASSERT_THROW(req.query_state(), ov::Exception); } TEST(InferRequestOVTests, throwsOnUninitializedSetRemoteTensorWithName) { - ov::runtime::InferRequest req; - ov::runtime::RemoteTensor remote_tensor; + ov::InferRequest req; + ov::RemoteTensor remote_tensor; ASSERT_THROW(req.set_tensor("", remote_tensor), ov::Exception); } TEST(InferRequestOVTests, throwsOnUninitializedSetInputRemoteTensor) { - ov::runtime::InferRequest req; - ov::runtime::RemoteTensor remote_tensor; + ov::InferRequest req; + ov::RemoteTensor remote_tensor; ASSERT_THROW(req.set_input_tensor(0, remote_tensor), ov::Exception); } TEST(InferRequestOVTests, throwsOnUninitializedSetOutputRemoteTensor) { - ov::runtime::InferRequest req; - ov::runtime::RemoteTensor remote_tensor; + ov::InferRequest req; + ov::RemoteTensor remote_tensor; ASSERT_THROW(req.set_output_tensor(0, remote_tensor), ov::Exception); } TEST(InferRequestOVTests, throwsOnUninitializedSetRemoteTensor) { - ov::runtime::InferRequest req; - ov::runtime::RemoteTensor remote_tensor; + ov::InferRequest req; + ov::RemoteTensor remote_tensor; ASSERT_THROW(req.set_tensor(ov::Output(), remote_tensor), ov::Exception); } TEST(InferRequestOVTests, throwsOnGetCompiledModel) { - ov::runtime::InferRequest req; + ov::InferRequest req; ASSERT_THROW(req.get_compiled_model(), ov::Exception); } diff --git a/src/tests/functional/inference_engine/ov_remote_context_test.cpp b/src/tests/functional/inference_engine/ov_remote_context_test.cpp index 83d4ee1e577..297cfd0dc50 100644 --- a/src/tests/functional/inference_engine/ov_remote_context_test.cpp +++ b/src/tests/functional/inference_engine/ov_remote_context_test.cpp @@ -11,16 +11,16 @@ using namespace ::testing; using namespace std; TEST(RemoteContextOVTests, throwsOnUninitializedReset) { - ov::runtime::RemoteContext ctx; + ov::RemoteContext ctx; ASSERT_THROW(ctx.get_device_name(), ov::Exception); } TEST(RemoteContextOVTests, throwsOnUninitializedGetname) { - ov::runtime::RemoteContext ctx; + ov::RemoteContext ctx; ASSERT_THROW(ctx.create_tensor({}, {}, {}), ov::Exception); } TEST(RemoteContextOVTests, throwsOnUninitializedGetParams) { - ov::runtime::RemoteContext ctx; + ov::RemoteContext ctx; ASSERT_THROW(ctx.get_params(), ov::Exception); } diff --git a/src/tests/functional/inference_engine/ov_remote_tensor.cpp b/src/tests/functional/inference_engine/ov_remote_tensor.cpp index d28e5c4e839..7256934ca0f 100644 --- a/src/tests/functional/inference_engine/ov_remote_tensor.cpp +++ b/src/tests/functional/inference_engine/ov_remote_tensor.cpp @@ -11,25 +11,25 @@ using namespace ::testing; using namespace std; TEST(RemoteTensorOVTests, throwsOnGetParams) { - ov::runtime::RemoteTensor tensor; + ov::RemoteTensor tensor; ASSERT_THROW(tensor.get_params(), ov::Exception); } TEST(RemoteTensorOVTests, throwsOnGetDeviceName) { - ov::runtime::RemoteTensor tensor; + ov::RemoteTensor tensor; ASSERT_THROW(tensor.get_device_name(), ov::Exception); } TEST(RemoteTensorOVTests, remoteTensorFromEmptyTensorThrow) { - ov::runtime::Tensor empty_tensor; - ov::runtime::RemoteTensor remote_tensor; - ASSERT_FALSE(empty_tensor.is()); - ASSERT_THROW(empty_tensor.as(), ov::Exception); + ov::Tensor empty_tensor; + ov::RemoteTensor remote_tensor; + ASSERT_FALSE(empty_tensor.is()); + ASSERT_THROW(empty_tensor.as(), ov::Exception); } TEST(RemoteTensorOVTests, remoteTensorConvertToRemoteThrow) { - ov::runtime::Tensor tensor{ov::element::f32, {1, 2, 3, 4}}; - ov::runtime::RemoteTensor remote_tensor; - ASSERT_FALSE(tensor.is()); - ASSERT_THROW(tensor.as(), ov::Exception); + ov::Tensor tensor{ov::element::f32, {1, 2, 3, 4}}; + ov::RemoteTensor remote_tensor; + ASSERT_FALSE(tensor.is()); + ASSERT_THROW(tensor.as(), ov::Exception); } diff --git a/src/tests/functional/inference_engine/ov_variable_state_test.cpp b/src/tests/functional/inference_engine/ov_variable_state_test.cpp index 2491b2a4862..7f009c13383 100644 --- a/src/tests/functional/inference_engine/ov_variable_state_test.cpp +++ b/src/tests/functional/inference_engine/ov_variable_state_test.cpp @@ -13,22 +13,22 @@ using namespace std; using VariableStateOVTests = ::testing::Test; TEST_F(VariableStateOVTests, throwsOnUninitializedReset) { - ov::runtime::VariableState state; + ov::VariableState state; ASSERT_THROW(state.reset(), ov::Exception); } TEST_F(VariableStateOVTests, throwsOnUninitializedGetname) { - ov::runtime::VariableState state; + ov::VariableState state; ASSERT_THROW(state.get_name(), ov::Exception); } TEST_F(VariableStateOVTests, throwsOnUninitializedGetState) { - ov::runtime::VariableState state; + ov::VariableState state; ASSERT_THROW(state.get_state(), ov::Exception); } TEST_F(VariableStateOVTests, throwsOnUninitializedSetState) { - ov::runtime::VariableState state; - ov::runtime::Tensor tensor; + ov::VariableState state; + ov::Tensor tensor; ASSERT_THROW(state.set_state(tensor), ov::Exception); } diff --git a/src/tests/functional/plugin/cpu/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp b/src/tests/functional/plugin/cpu/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp index a2cbfe95cf0..7666a60b62d 100644 --- a/src/tests/functional/plugin/cpu/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp +++ b/src/tests/functional/plugin/cpu/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp @@ -11,12 +11,12 @@ TEST_P(OVInferRequestPerfCountersTest, CheckOperationInProfilingInfo) { req = execNet.create_infer_request(); ASSERT_NO_THROW(req.infer()); - std::vector profiling_info; + std::vector profiling_info; ASSERT_NO_THROW(profiling_info = req.get_profiling_info()); for (const auto& op : function->get_ops()) { auto op_is_in_profiling_info = std::any_of(std::begin(profiling_info), std::end(profiling_info), - [&] (const ov::runtime::ProfilingInfo& info) { + [&] (const ov::ProfilingInfo& info) { if (info.node_name.find(op->get_friendly_name() + "_") != std::string::npos || info.node_name == op->get_friendly_name()) { return true; } else { diff --git a/src/tests/functional/plugin/cpu/shared_tests_instances/behavior/ov_plugin/core_integration.cpp b/src/tests/functional/plugin/cpu/shared_tests_instances/behavior/ov_plugin/core_integration.cpp index 31092b7c655..e841d0bb5c9 100644 --- a/src/tests/functional/plugin/cpu/shared_tests_instances/behavior/ov_plugin/core_integration.cpp +++ b/src/tests/functional/plugin/cpu/shared_tests_instances/behavior/ov_plugin/core_integration.cpp @@ -80,7 +80,7 @@ INSTANTIATE_TEST_SUITE_P( ////////////////////////////////////////////////////////////////////////////////////////// TEST(OVClassBasicTest, smoke_SetConfigAfterCreatedThrow) { - ov::runtime::Core ie; + ov::Core ie; std::string value = {}; ASSERT_NO_THROW(ie.set_config({{KEY_CPU_THREADS_NUM, "1"}}, "CPU")); diff --git a/src/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/experimental_detectron_generate_proposals_single_image.cpp b/src/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/experimental_detectron_generate_proposals_single_image.cpp index af4def7074f..47c0e033845 100644 --- a/src/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/experimental_detectron_generate_proposals_single_image.cpp +++ b/src/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/experimental_detectron_generate_proposals_single_image.cpp @@ -16,7 +16,7 @@ const std::vector nms_threshold = { 0.699999988079071 }; const std::vector post_nms_count = { 6 }; const std::vector pre_nms_count = { 1000 }; -const std::vector>> inputTensors = { +const std::vector>> inputTensors = { { "empty", { diff --git a/src/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/experimental_detectron_prior_grid_generator.cpp b/src/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/experimental_detectron_prior_grid_generator.cpp index 206270b6144..5c489249269 100644 --- a/src/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/experimental_detectron_prior_grid_generator.cpp +++ b/src/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/experimental_detectron_prior_grid_generator.cpp @@ -56,7 +56,7 @@ const std::vector>> inputTensors = { +std::vector>> inputTensors = { { "test#1", { diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/activation.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/activation.cpp index 5915733fa1e..2f7bd014ca8 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/activation.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/activation.cpp @@ -81,7 +81,7 @@ public: const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (funcInput.get_element_type().is_real()) { tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), targetInputStaticShapes[i], range, startFrom, resolution); diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/adaptive_pooling.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/adaptive_pooling.cpp index 12f3d893c27..eb8b412282a 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/adaptive_pooling.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/adaptive_pooling.cpp @@ -135,7 +135,7 @@ protected: void validate() override { if (function->get_parameters().size() == 2) { auto pos = std::find_if(inputs.begin(), inputs.end(), - [](const std::pair, ov::runtime::Tensor> ¶ms) { + [](const std::pair, ov::Tensor> ¶ms) { return params.first->get_friendly_name() == "ParamSecondInput"; }); IE_ASSERT(pos != inputs.end()); @@ -149,10 +149,10 @@ protected: const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (i == 1) { - tensor = ov::runtime::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i]); + tensor = ov::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i]); auto *dataPtr = tensor.data(); for (size_t i = 0; i < pooledVector.size(); i++) { dataPtr[i] = pooledVector[i]; diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/broadcast.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/broadcast.cpp index 46b29fe3e2c..1d049f4bd44 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/broadcast.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/broadcast.cpp @@ -158,15 +158,15 @@ protected: const auto& funcInputs = function->inputs(); for (size_t i = 0lu; i < funcInputs.size(); i++) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (funcInput.get_node()->get_friendly_name() == "targetShape") { - tensor = ov::runtime::Tensor{ov::element::i64, targetInputStaticShapes[i]}; + tensor = ov::Tensor{ov::element::i64, targetInputStaticShapes[i]}; auto data = tensor.data::value_type>(); for (size_t i = 0lu; i < targetShape.size(); i++) { data[i] = targetShape[i]; } } else if (funcInput.get_node()->get_friendly_name() == "axesMapping") { - tensor = ov::runtime::Tensor{ov::element::i64, targetInputStaticShapes[i]}; + tensor = ov::Tensor{ov::element::i64, targetInputStaticShapes[i]}; auto data = tensor.data::value_type>(); for (size_t i = 0lu; i < axesMapping.size(); i++) { data[i] = axesMapping[i]; diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/bucketize.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/bucketize.cpp index c8aaa511bd9..af3514bdab8 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/bucketize.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/bucketize.cpp @@ -60,14 +60,14 @@ public: const auto& funcInputs = function->inputs(); auto data_size = shape_size(targetInputStaticShapes[0]); - ov::runtime::Tensor tensorData = ov::test::utils::create_and_fill_tensor(funcInputs[0].get_element_type(), + ov::Tensor tensorData = ov::test::utils::create_and_fill_tensor(funcInputs[0].get_element_type(), targetInputStaticShapes[0], data_size * 5, 0, 10, 7235346); - ov::runtime::Tensor tensorBucket = + ov::Tensor tensorBucket = ov::test::utils::create_and_fill_tensor_unique_sequence(funcInputs[1].get_element_type(), targetInputStaticShapes[1], 0, diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/concat.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/concat.cpp index 666cdc0dc7d..f4787d039c4 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/concat.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/concat.cpp @@ -49,7 +49,7 @@ public: return result.str(); } - void compare(const std::vector &expected, const std::vector &actual) override { + void compare(const std::vector &expected, const std::vector &actual) override { if (actual.front().get_size() == 0) { ASSERT_EQ(0, expected.front().get_size()); for (const auto& shape : targetStaticShapes[inferNum]) { diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/convolution.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/convolution.cpp index fee426a316b..565ca55e41e 100755 --- a/src/tests/functional/plugin/cpu/single_layer_tests/convolution.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/convolution.cpp @@ -89,7 +89,7 @@ public: protected: bool isBias = false; - void checkBiasFusing(ov::runtime::CompiledModel &execNet) const { + void checkBiasFusing(ov::CompiledModel &execNet) const { auto execGraph = execNet.get_runtime_model(); ASSERT_NE(nullptr, execGraph); diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/convolution_backprop_data.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/convolution_backprop_data.cpp index 84c876d8338..3b8e0c9f3b2 100755 --- a/src/tests/functional/plugin/cpu/single_layer_tests/convolution_backprop_data.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/convolution_backprop_data.cpp @@ -96,10 +96,10 @@ public: const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (i == 1) { - tensor = ov::runtime::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i], outShapeData[inferRequestNum].data()); + tensor = ov::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i], outShapeData[inferRequestNum].data()); } else { tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), targetInputStaticShapes[i], 2560, 0, 256); } @@ -124,7 +124,7 @@ public: void validate() override { if (function->get_parameters().size() == 2) { auto pos = std::find_if(inputs.begin(), inputs.end(), - [](const std::pair, ov::runtime::Tensor> ¶ms) { + [](const std::pair, ov::Tensor> ¶ms) { return params.first->get_friendly_name() == "param_1"; }); IE_ASSERT(pos != inputs.end()); diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/ctc_Loss.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/ctc_Loss.cpp index f37f264166a..5efcbe54086 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/ctc_Loss.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/ctc_Loss.cpp @@ -123,7 +123,7 @@ protected: } for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (i == 0) { tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), dataShape, @@ -131,7 +131,7 @@ protected: 0, 10); } else if (i == 1) { - tensor = ov::runtime::Tensor{funcInput.get_element_type(), {shapeN}}; + tensor = ov::Tensor{funcInput.get_element_type(), {shapeN}}; if (funcInput.get_element_type() == ElementType::i32) { auto begin = tensor.data(); std::copy(logitLength.begin(), logitLength.end(), begin); @@ -149,7 +149,7 @@ protected: while ((value = distLabel(genLable)) == blank) {} labels[n] = value; } - tensor = ov::runtime::Tensor{funcInput.get_element_type(), {shapeNT}}; + tensor = ov::Tensor{funcInput.get_element_type(), {shapeNT}}; if (funcInput.get_element_type() == ElementType::i32) { auto begin = tensor.data(); std::copy(labels.begin(), labels.end(), begin); @@ -168,7 +168,7 @@ protected: labelLength[n] = std::min(len, logitLength[n]); } - tensor = ov::runtime::Tensor{funcInput.get_element_type(), {shapeN}}; + tensor = ov::Tensor{funcInput.get_element_type(), {shapeN}}; if (funcInput.get_element_type() == ElementType::i32) { auto begin = tensor.data(); std::copy(labelLength.begin(), labelLength.end(), begin); diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/ctc_greedy_decoder.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/ctc_greedy_decoder.cpp index ddc04e736e1..960c17d663a 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/ctc_greedy_decoder.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/ctc_greedy_decoder.cpp @@ -94,7 +94,7 @@ protected: const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (i == 0) { if (funcInput.get_element_type().is_real()) { tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), @@ -119,7 +119,7 @@ protected: sequenceMaskData[t * B + b] = 1; } } - tensor = ov::runtime::Tensor{funcInput.get_element_type(), targetInputStaticShapes[i]}; + tensor = ov::Tensor{funcInput.get_element_type(), targetInputStaticShapes[i]}; float* begin = tensor.data(); std::copy(sequenceMaskData.begin(), sequenceMaskData.end(), begin); } diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/ctc_greedy_decoder_seq_len.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/ctc_greedy_decoder_seq_len.cpp index e186260b352..09944c1bba8 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/ctc_greedy_decoder_seq_len.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/ctc_greedy_decoder_seq_len.cpp @@ -125,7 +125,7 @@ protected: const auto& dataShape = targetInputStaticShapes[0]; for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (i == 0) { if (funcInput.get_element_type().is_real()) { tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), @@ -148,7 +148,7 @@ protected: const int len = dist(gen); sequenceLenData[b] = len; } - tensor = ov::runtime::Tensor{funcInput.get_element_type(), targetInputStaticShapes[i]}; + tensor = ov::Tensor{funcInput.get_element_type(), targetInputStaticShapes[i]}; if (funcInput.get_element_type() == ElementType::i32) { auto begin = tensor.data(); std::copy(sequenceLenData.begin(), sequenceLenData.end(), begin); diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/deformable_convolution.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/deformable_convolution.cpp index 357599ac734..95b41dae812 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/deformable_convolution.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/deformable_convolution.cpp @@ -104,7 +104,7 @@ protected: for (size_t i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (i == 0) { // "a_data" tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), inShape, 2, -1, 100); } else if (i == 1) { // "b_offset_vals" diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/detection_output.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/detection_output.cpp index d69abccde25..22c34e5730e 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/detection_output.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/detection_output.cpp @@ -137,8 +137,8 @@ public: } void compare( - const std::vector& expectedTensors, - const std::vector& actualTensors) override { + const std::vector& expectedTensors, + const std::vector& actualTensors) override { ASSERT_EQ(expectedTensors.size(), actualTensors.size()); for (auto i = 0; i < expectedTensors.size(); ++i) { diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/eltwise.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/eltwise.cpp index 68922b93d41..b3e0f3d3ca0 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/eltwise.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/eltwise.cpp @@ -42,7 +42,7 @@ protected: const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; bool isReal = funcInput.get_element_type().is_real(); switch (eltwiseType) { case ngraph::helpers::EltwiseTypes::POWER: diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/fake_quantize.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/fake_quantize.cpp index 4c299ae7a7f..8bdd3d0a93a 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/fake_quantize.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/fake_quantize.cpp @@ -134,7 +134,7 @@ protected: const auto& funcInputs = function->inputs(); ASSERT_EQ(funcInputs.size(), 1); const auto& funcInput = funcInputs[0]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), targetInputStaticShapes[0], inDataHighBounds - inDataLowBounds, diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/gather_elements.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/gather_elements.cpp index a1c3fafb621..e733a016240 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/gather_elements.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/gather_elements.cpp @@ -75,7 +75,7 @@ public: const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), targetInputStaticShapes[i], 15, 0, 32768); diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/group_convolution.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/group_convolution.cpp index 7667eda3937..fa0bbc4f6e1 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/group_convolution.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/group_convolution.cpp @@ -90,7 +90,7 @@ public: protected: bool isBias = false; - void checkBiasFusing(ov::runtime::CompiledModel &execNet) const { + void checkBiasFusing(ov::CompiledModel &execNet) const { auto execGraph = execNet.get_runtime_model(); ASSERT_NE(nullptr, execGraph); diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/group_convolution_backprop_data.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/group_convolution_backprop_data.cpp index 984b1f32e67..a2087129784 100755 --- a/src/tests/functional/plugin/cpu/single_layer_tests/group_convolution_backprop_data.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/group_convolution_backprop_data.cpp @@ -97,10 +97,10 @@ public: const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (i == 1) { - tensor = ov::runtime::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i], outShapeData[inferRequestNum].data()); + tensor = ov::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i], outShapeData[inferRequestNum].data()); } else { tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), targetInputStaticShapes[i], 2560, 0, 256); } @@ -125,7 +125,7 @@ public: void validate() override { if (function->get_parameters().size() == 2) { auto pos = std::find_if(inputs.begin(), inputs.end(), - [](const std::pair, ov::runtime::Tensor> ¶ms) { + [](const std::pair, ov::Tensor> ¶ms) { return params.first->get_friendly_name() == "param_1"; }); IE_ASSERT(pos != inputs.end()); diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/interpolate.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/interpolate.cpp index 96d64af1db6..2e64e4bb3c2 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/interpolate.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/interpolate.cpp @@ -110,13 +110,13 @@ public: const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (i == 1) { if (shapeCalcMode == ngraph::op::v4::Interpolate::ShapeCalcMode::SIZES) { - tensor = ov::runtime::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i], sizes[inferRequestNum].data()); + tensor = ov::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i], sizes[inferRequestNum].data()); } else { - tensor = ov::runtime::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i], scales[inferRequestNum].data()); + tensor = ov::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i], scales[inferRequestNum].data()); } } else { tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), targetInputStaticShapes[i], 2560, 0, 256); diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/loop.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/loop.cpp index a22256fe007..cb581b22577 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/loop.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/loop.cpp @@ -65,7 +65,7 @@ protected: int i = 0; if (funcInputs[i].get_node_shared_ptr()->get_friendly_name() == "trip_count") { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), + ov::Tensor tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), funcInput.get_shape(), 10, 1); inputs.insert({funcInput.get_node_shared_ptr(), tensor}); i++; @@ -74,7 +74,7 @@ protected: // parameters for body for (; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), + ov::Tensor tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), targetInputStaticShapes[i], 15, 0, 32768); inputs.insert({funcInput.get_node_shared_ptr(), tensor}); } diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/non_max_suppression.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/non_max_suppression.cpp index b17c0d3ccee..51e1e6f69aa 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/non_max_suppression.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/non_max_suppression.cpp @@ -95,10 +95,10 @@ public: const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (i == 1) { - tensor = ov::runtime::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i]); + tensor = ov::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i]); const size_t range = 1; const size_t startFrom = 0; @@ -113,7 +113,7 @@ public: dataPtr[i] = value / static_cast(k); } } else if (i == 2) { - tensor = ov::runtime::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i], &maxOutBoxesPerClass); + tensor = ov::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i], &maxOutBoxesPerClass); } else { tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), targetInputStaticShapes[i]); } @@ -121,7 +121,7 @@ public: inputs.insert({funcInput.get_node_shared_ptr(), tensor}); } } - void compare(const std::vector &expected, const std::vector &actual) override { + void compare(const std::vector &expected, const std::vector &actual) override { CompareBBoxes(expected, actual); inferRequestNum++; } @@ -222,7 +222,7 @@ private: * [batch_index, class_index, box_score]. * 3: valid_outputs - 1D tensor with 1 element of type T_IND representing the total number of selected boxes. */ - void CompareBBoxes(const std::vector &expectedOutputs, const std::vector &actualOutputs) { + void CompareBBoxes(const std::vector &expectedOutputs, const std::vector &actualOutputs) { size_t numBatches, numBoxes, numClasses; std::tie(numBatches, numBoxes, numClasses) = targetInDims[inferRequestNum]; @@ -252,7 +252,7 @@ private: // Get input bboxes' coords std::vector> coordList(numBatches, std::vector(numBoxes)); { - std::pair, ov::runtime::Tensor> bboxes = *inputs.begin(); + std::pair, ov::Tensor> bboxes = *inputs.begin(); for (const auto &input : inputs) { if (input.first->get_name() < bboxes.first->get_name()) { bboxes = input; diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/nonzero.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/nonzero.cpp index a6df7c9c955..4ed982630aa 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/nonzero.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/nonzero.cpp @@ -59,7 +59,7 @@ public: const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), targetInputStaticShapes[i], range, startFrom); + ov::Tensor tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), targetInputStaticShapes[i], range, startFrom); inputs.insert({funcInput.get_node_shared_ptr(), tensor}); } } diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/normalize.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/normalize.cpp index 08963ba0d17..70787642283 100755 --- a/src/tests/functional/plugin/cpu/single_layer_tests/normalize.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/normalize.cpp @@ -84,7 +84,7 @@ protected: const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (funcInput.get_element_type().is_real()) { tensor = ov::test::utils::create_and_fill_tensor( funcInput.get_element_type(), targetInputStaticShapes[i], 10, -5, 7, 222); diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/one_hot.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/one_hot.cpp index 14ed5d5a715..f35bd76bb5a 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/one_hot.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/one_hot.cpp @@ -63,10 +63,10 @@ public: const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (i == 1) { - tensor = ov::runtime::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i]); + tensor = ov::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i]); auto *dataPtr = tensor.data(); dataPtr[0] = Depth; } else { @@ -112,7 +112,7 @@ protected: void validate() override { if (function->get_parameters().size() == 2) { auto pos = std::find_if(inputs.begin(), inputs.end(), - [](const std::pair, ov::runtime::Tensor> ¶ms) { + [](const std::pair, ov::Tensor> ¶ms) { return params.first->get_friendly_name() == "ParamDepth"; }); IE_ASSERT(pos != inputs.end()); diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/proposal.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/proposal.cpp index df071e37b91..7b0d39ba8a1 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/proposal.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/proposal.cpp @@ -173,10 +173,10 @@ protected: const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (i == 2) { - tensor = ov::runtime::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i]); + tensor = ov::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i]); auto *dataPtr = tensor.data(); dataPtr[0] = dataPtr[1] = 225.0f; diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/reduce_ops.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/reduce_ops.cpp index 010a4970321..6d712302ffb 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/reduce_ops.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/reduce_ops.cpp @@ -151,7 +151,7 @@ protected: const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (reductionType == ngraph::helpers::ReductionType::Prod) { tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), targetInputStaticShapes[i], 10, 5); if (netPrecision == ElementType::f32) { diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/roi_pooling.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/roi_pooling.cpp index abd53907811..51fa791e3db 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/roi_pooling.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/roi_pooling.cpp @@ -118,10 +118,10 @@ protected: for (size_t i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (i == 1) { - tensor = ov::runtime::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i]); + tensor = ov::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i]); if (propMode == ULTIMATE_RIGHT_BORDER) { // because of nonalgebraic character of floating point operation, the following values causes inequity: // ((end_h - start_h) * (input_h - 1) / (pooled_h - 1)) * (pooled_h - 1) > (end_h - start_h) * (input_h - 1) diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/roialign.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/roialign.cpp index fc3f7b94279..099978dc8a3 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/roialign.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/roialign.cpp @@ -83,13 +83,13 @@ protected: inputs.clear(); const auto& funcInputs = function->inputs(); - ov::runtime::Tensor data_tensor; + ov::Tensor data_tensor; const auto& dataPrecision = funcInputs[0].get_element_type(); const auto& dataShape = targetInputStaticShapes.front(); data_tensor = ov::test::utils::create_and_fill_tensor(dataPrecision, dataShape, 10, 0, 1000); const auto& coordsET = funcInputs[1].get_element_type(); - auto coordsTensor = ov::runtime::Tensor{ coordsET, targetInputStaticShapes[1] }; + auto coordsTensor = ov::Tensor{ coordsET, targetInputStaticShapes[1] }; if (coordsET == ElementType::f32) { auto coordsTensorData = static_cast(coordsTensor.data()); for (size_t i = 0; i < coordsTensor.get_size(); i += 4) { @@ -110,7 +110,7 @@ protected: IE_THROW() << "roi align. Unsupported precision: " << coordsET; } - auto roisIdxTensor = ov::runtime::Tensor{ funcInputs[2].get_element_type(), targetInputStaticShapes[2] }; + auto roisIdxTensor = ov::Tensor{ funcInputs[2].get_element_type(), targetInputStaticShapes[2] }; auto roisIdxTensorData = static_cast(roisIdxTensor.data()); std::int32_t batchIdx = 0; for (int i = 0; i < roisIdxTensor.get_size(); i++) { diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/scatter_ND_update.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/scatter_ND_update.cpp index 55a6df9ea22..69e96e07471 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/scatter_ND_update.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/scatter_ND_update.cpp @@ -61,9 +61,9 @@ protected: const auto& funcInput = funcInputs[i]; const auto& inputPrecision = funcInput.get_element_type(); const auto& targetShape = targetInputStaticShapes[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (i == 1) { - tensor = ov::runtime::Tensor{ inputPrecision, targetShape }; + tensor = ov::Tensor{ inputPrecision, targetShape }; const auto indicesVals = std::get<0>(this->GetParam()).indicesValues; if (inputPrecision == ElementType::i32) { auto data = tensor.data(); diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/scatter_elements_update.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/scatter_elements_update.cpp index 323d99a1748..56a098d011a 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/scatter_elements_update.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/scatter_elements_update.cpp @@ -64,9 +64,9 @@ protected: const auto& funcInput = funcInputs[i]; const auto& inputPrecision = funcInput.get_element_type(); const auto& targetShape = targetInputStaticShapes[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (i == 1) { - tensor = ov::runtime::Tensor{ inputPrecision, targetShape }; + tensor = ov::Tensor{ inputPrecision, targetShape }; const auto indicesVals = std::get<0>(this->GetParam()).indicesValues; if (inputPrecision == ElementType::i32) { auto data = tensor.data(); diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/tile.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/tile.cpp index 8273f838050..470a5b2f009 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/tile.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/tile.cpp @@ -115,9 +115,9 @@ protected: const auto& funcInputs = function->inputs(); for (size_t i = 0lu; i < funcInputs.size(); i++) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (funcInput.get_node()->get_friendly_name() == "repeats") { - tensor = ov::runtime::Tensor{ov::element::i64, targetInputStaticShapes[i]}; + tensor = ov::Tensor{ov::element::i64, targetInputStaticShapes[i]}; auto data = tensor.data::value_type>(); for (size_t i = 0lu; i < repeatsData.size(); i++) { data[i] = repeatsData[i]; diff --git a/src/tests/functional/plugin/cpu/single_layer_tests/topk.cpp b/src/tests/functional/plugin/cpu/single_layer_tests/topk.cpp index d0a397540fe..4bccd5655ff 100644 --- a/src/tests/functional/plugin/cpu/single_layer_tests/topk.cpp +++ b/src/tests/functional/plugin/cpu/single_layer_tests/topk.cpp @@ -47,7 +47,7 @@ protected: inputs.clear(); const auto& funcInputs = function->inputs(); - ov::runtime::Tensor data_tensor; + ov::Tensor data_tensor; const auto& dataPrecision = funcInputs[0].get_element_type(); const auto& dataShape = targetInputStaticShapes.front(); if (funcInputs[0].get_element_type().is_real()) { diff --git a/src/tests/functional/plugin/cpu/subgraph_tests/src/eltwise_chain.cpp b/src/tests/functional/plugin/cpu/subgraph_tests/src/eltwise_chain.cpp index d5861c224b9..f094bbf773b 100644 --- a/src/tests/functional/plugin/cpu/subgraph_tests/src/eltwise_chain.cpp +++ b/src/tests/functional/plugin/cpu/subgraph_tests/src/eltwise_chain.cpp @@ -70,7 +70,7 @@ public: const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; tensor = ov::test::utils::create_and_fill_tensor(funcInput.get_element_type(), targetInputStaticShapes[i], 10, 1, 1); inputs.insert({funcInput.get_node_shared_ptr(), tensor}); } diff --git a/src/tests/functional/plugin/cpu/subgraph_tests/src/fuse_transpose_reorder.cpp b/src/tests/functional/plugin/cpu/subgraph_tests/src/fuse_transpose_reorder.cpp index 7dfce03f58b..4135c439ce5 100644 --- a/src/tests/functional/plugin/cpu/subgraph_tests/src/fuse_transpose_reorder.cpp +++ b/src/tests/functional/plugin/cpu/subgraph_tests/src/fuse_transpose_reorder.cpp @@ -246,7 +246,7 @@ TEST(smoke_Basic, FuseDynamicTransposeAndReorderTest) { p.input().model().set_layout("NCHW"); model = p.build(); - auto core = ov::runtime::Core(); + auto core = ov::Core(); ASSERT_NO_THROW(core.compile_model(model, "CPU")); } diff --git a/src/tests/functional/plugin/cpu/subgraph_tests/src/input_tensor_roi.cpp b/src/tests/functional/plugin/cpu/subgraph_tests/src/input_tensor_roi.cpp index 16bf1b3afd4..9c8c16a0f81 100644 --- a/src/tests/functional/plugin/cpu/subgraph_tests/src/input_tensor_roi.cpp +++ b/src/tests/functional/plugin/cpu/subgraph_tests/src/input_tensor_roi.cpp @@ -59,7 +59,7 @@ protected: template void Run() { - std::shared_ptr ie = ov::test::utils::PluginCache::get().core(); + std::shared_ptr ie = ov::test::utils::PluginCache::get().core(); // Compile model auto fn_shape = GetParam().shape; @@ -67,17 +67,17 @@ protected: auto compiled_model = ie->compile_model(model, "CPU"); // Create InferRequest - ov::runtime::InferRequest req = compiled_model.create_infer_request(); + ov::InferRequest req = compiled_model.create_infer_request(); // Create input tensor auto input_shape = Shape{ 1, 4, 4, 4 }; auto input_shape_size = ov::shape_size(input_shape); std::vector data(input_shape_size); std::iota(data.begin(), data.end(), 0); - auto input_tensor = ov::runtime::Tensor(GetParam().type, input_shape, &data[0]); + auto input_tensor = ov::Tensor(GetParam().type, input_shape, &data[0]); // Set ROI - auto roi = ov::runtime::Tensor(input_tensor, { 0, 1, 1, 1 }, { 1, 3, 3, 3 }); + auto roi = ov::Tensor(input_tensor, { 0, 1, 1, 1 }, { 1, 3, 3, 3 }); req.set_tensor("tensor_input_0", roi); // Infer diff --git a/src/tests/functional/plugin/cpu/subgraph_tests/src/static_zero_dims.cpp b/src/tests/functional/plugin/cpu/subgraph_tests/src/static_zero_dims.cpp index 2ebb95b75d1..21912d22aa4 100644 --- a/src/tests/functional/plugin/cpu/subgraph_tests/src/static_zero_dims.cpp +++ b/src/tests/functional/plugin/cpu/subgraph_tests/src/static_zero_dims.cpp @@ -40,7 +40,7 @@ protected: function = std::make_shared(results, inputParams, "StaticZeroDims"); } - void compare(const std::vector &expected, const std::vector &actual) override { + void compare(const std::vector &expected, const std::vector &actual) override { ASSERT_EQ(expected.size(), actual.size()); for (size_t i = 0; i < expected.size(); i++) { // skip second output tensor because it's output ExperimentalDetectronTopKROIs: input dims [0, 4] diff --git a/src/tests/functional/plugin/cpu/test_utils/cpu_test_utils.cpp b/src/tests/functional/plugin/cpu/test_utils/cpu_test_utils.cpp index 92ac97f411a..599de747c99 100644 --- a/src/tests/functional/plugin/cpu/test_utils/cpu_test_utils.cpp +++ b/src/tests/functional/plugin/cpu/test_utils/cpu_test_utils.cpp @@ -123,7 +123,7 @@ void CPUTestsBase::CheckPluginRelatedResults(InferenceEngine::ExecutableNetwork CheckPluginRelatedResultsImpl(function, std::move(nodeType)); } -void CPUTestsBase::CheckPluginRelatedResults(ov::runtime::CompiledModel &execNet, std::string nodeType) const { +void CPUTestsBase::CheckPluginRelatedResults(ov::CompiledModel &execNet, std::string nodeType) const { if (nodeType.empty()) return; ASSERT_TRUE(!selectedType.empty()) << "Node type is not defined."; diff --git a/src/tests/functional/plugin/cpu/test_utils/cpu_test_utils.hpp b/src/tests/functional/plugin/cpu/test_utils/cpu_test_utils.hpp index bf66dfdbe79..06cc8882afc 100644 --- a/src/tests/functional/plugin/cpu/test_utils/cpu_test_utils.hpp +++ b/src/tests/functional/plugin/cpu/test_utils/cpu_test_utils.hpp @@ -137,7 +137,7 @@ public: std::string name); void CheckPluginRelatedResults(InferenceEngine::ExecutableNetwork &execNet, std::string nodeType) const; - void CheckPluginRelatedResults(ov::runtime::CompiledModel &execNet, std::string nodeType) const; + void CheckPluginRelatedResults(ov::CompiledModel &execNet, std::string nodeType) const; protected: virtual void CheckPluginRelatedResultsImpl(std::shared_ptr function, std::string nodeType) const; diff --git a/src/tests/functional/plugin/gna/shared_tests_instances/behavior/ov_executable_network/get_metric.cpp b/src/tests/functional/plugin/gna/shared_tests_instances/behavior/ov_executable_network/get_metric.cpp index 33ec20ec1be..d182b0f8fef 100644 --- a/src/tests/functional/plugin/gna/shared_tests_instances/behavior/ov_executable_network/get_metric.cpp +++ b/src/tests/functional/plugin/gna/shared_tests_instances/behavior/ov_executable_network/get_metric.cpp @@ -79,11 +79,11 @@ INSTANTIATE_TEST_SUITE_P( using OVClassExecutableNetworkSetConfigFromFp32Test = OVClassExecutableNetworkGetMetricTestForSpecificConfig; TEST_P(OVClassExecutableNetworkSetConfigFromFp32Test, SetConfigFromFp32Throws) { -ov::runtime::Core ie; +ov::Core ie; std::map initialConfig; initialConfig[GNA_CONFIG_KEY(DEVICE_MODE)] = InferenceEngine::GNAConfigParams::GNA_SW_FP32; -ov::runtime::CompiledModel exeNetwork = ie.compile_model(simpleNetwork, deviceName, initialConfig); +ov::CompiledModel exeNetwork = ie.compile_model(simpleNetwork, deviceName, initialConfig); ASSERT_THROW(exeNetwork.set_config({{configKey, configValue}}), ov::Exception); } diff --git a/src/tests/functional/plugin/gpu/behavior/infer_request.cpp b/src/tests/functional/plugin/gpu/behavior/infer_request.cpp index aa1e7b925df..6890c095064 100644 --- a/src/tests/functional/plugin/gpu/behavior/infer_request.cpp +++ b/src/tests/functional/plugin/gpu/behavior/infer_request.cpp @@ -18,7 +18,7 @@ using namespace ::testing; TEST(TensorTest, smoke_canSetShapeForPreallocatedTensor) { - auto ie = ov::runtime::Core(); + auto ie = ov::Core(); using namespace ov::preprocess; auto p = PrePostProcessor(ngraph::builder::subgraph::makeSplitMultiConvConcat()); p.input().tensor().set_element_type(ov::element::i8); diff --git a/src/tests/functional/plugin/gpu/concurrency/gpu_concurrency_tests.cpp b/src/tests/functional/plugin/gpu/concurrency/gpu_concurrency_tests.cpp index e56b1853951..0400286e04a 100644 --- a/src/tests/functional/plugin/gpu/concurrency/gpu_concurrency_tests.cpp +++ b/src/tests/functional/plugin/gpu/concurrency/gpu_concurrency_tests.cpp @@ -44,10 +44,10 @@ protected: }; TEST_P(OVConcurrencyTest, canInferTwoExecNets) { - auto ie = ov::runtime::Core(); + auto ie = ov::Core(); ov::ResultVector outputs; - std::vector irs; + std::vector irs; std::vector> ref; std::vector outElementsCount; diff --git a/src/tests/functional/plugin/gpu/dynamic_tests/gpu_dyn_batch_shape_tests.cpp b/src/tests/functional/plugin/gpu/dynamic_tests/gpu_dyn_batch_shape_tests.cpp index 35fe6f62dd8..d0a2ed4dd75 100644 --- a/src/tests/functional/plugin/gpu/dynamic_tests/gpu_dyn_batch_shape_tests.cpp +++ b/src/tests/functional/plugin/gpu/dynamic_tests/gpu_dyn_batch_shape_tests.cpp @@ -80,7 +80,7 @@ protected: TEST_P(OVDynamicBatchShape_Tests, InferDynamicBatchBound) { SKIP_IF_CURRENT_TEST_IS_DISABLED() - core = std::make_shared(); + core = std::make_shared(); run(); } diff --git a/src/tests/functional/plugin/gpu/remote_blob_tests/gpu_remote_tensor_tests.cpp b/src/tests/functional/plugin/gpu/remote_blob_tests/gpu_remote_tensor_tests.cpp index fb474aae651..08a3f7db391 100644 --- a/src/tests/functional/plugin/gpu/remote_blob_tests/gpu_remote_tensor_tests.cpp +++ b/src/tests/functional/plugin/gpu/remote_blob_tests/gpu_remote_tensor_tests.cpp @@ -100,8 +100,8 @@ TEST_P(OVRemoteTensorInputBlob_Test, smoke_cantCreateBlobWithInvalidSize) { sharing_type == RemoteTensorSharingType::PLUGIN_HOST_TENSOR) GTEST_SKIP(); - auto ie = ov::runtime::Core(); - auto cldnn_context = ie.get_default_context(deviceName).as(); + auto ie = ov::Core(); + auto cldnn_context = ie.get_default_context(deviceName).as(); cl_context ctx = cldnn_context; auto ocl_instance = std::make_shared(ctx); cl_int err; @@ -142,7 +142,7 @@ TEST_P(OVRemoteTensorInputBlob_Test, smoke_canInputRemoteTensor) { #if defined(ANDROID) GTEST_SKIP(); #endif - auto ie = ov::runtime::Core(); + auto ie = ov::Core(); using namespace ov::preprocess; auto p = PrePostProcessor(fn_ptr); @@ -175,7 +175,7 @@ TEST_P(OVRemoteTensorInputBlob_Test, smoke_canInputRemoteTensor) { // inference using remote tensor auto inf_req_shared = exec_net.create_infer_request(); - auto cldnn_context = exec_net.get_context().as(); + auto cldnn_context = exec_net.get_context().as(); cl_context ctx = cldnn_context; auto ocl_instance = std::make_shared(ctx); cl_int err; @@ -236,8 +236,8 @@ TEST_P(OVRemoteTensorInputBlob_Test, smoke_canInputRemoteTensor) { } case RemoteTensorSharingType::PLUGIN_CL_TENSOR: { auto cldnn_tensor = cldnn_context.create_tensor(input->get_element_type(), input->get_shape()); - ASSERT_TRUE(cldnn_tensor.is()); - auto cl_tensor = cldnn_tensor.as(); + ASSERT_TRUE(cldnn_tensor.is()); + auto cl_tensor = cldnn_tensor.as(); { cl::Buffer shared_buffer = cl_tensor; void* buffer = fakeImageData.data(); @@ -252,9 +252,9 @@ TEST_P(OVRemoteTensorInputBlob_Test, smoke_canInputRemoteTensor) { GTEST_SKIP(); auto cldnn_tensor = cldnn_context.create_usm_host_tensor(input->get_element_type(), input->get_shape()); - ASSERT_TRUE(cldnn_tensor.is()); + ASSERT_TRUE(cldnn_tensor.is()); { - auto cl_tensor = cldnn_tensor.as(); + auto cl_tensor = cldnn_tensor.as(); void* shared_buffer = cl_tensor.get(); ASSERT_EQ(ocl_instance->get_allocation_type(shared_buffer), CL_MEM_TYPE_HOST_INTEL); void* buffer = fakeImageData.data(); @@ -271,9 +271,9 @@ TEST_P(OVRemoteTensorInputBlob_Test, smoke_canInputRemoteTensor) { GTEST_SKIP(); auto cldnn_tensor = cldnn_context.create_usm_device_tensor(input->get_element_type(), input->get_shape()); - ASSERT_TRUE(cldnn_tensor.is()); + ASSERT_TRUE(cldnn_tensor.is()); { - auto cl_tensor = cldnn_tensor.as(); + auto cl_tensor = cldnn_tensor.as(); void* shared_buffer = cl_tensor.get(); ASSERT_EQ(ocl_instance->get_allocation_type(shared_buffer), CL_MEM_TYPE_DEVICE_INTEL); void* buffer = fakeImageData.data(); @@ -355,7 +355,7 @@ public: }; TEST_P(OVRemoteTensor_TestsWithContext, smoke_canInferOnUserContext) { - auto ie = ov::runtime::Core(); + auto ie = ov::Core(); using namespace ov::preprocess; auto p = PrePostProcessor(fn_ptr); @@ -378,7 +378,7 @@ TEST_P(OVRemoteTensor_TestsWithContext, smoke_canInferOnUserContext) { // inference using remote tensor auto ocl_instance = std::make_shared(); - auto remote_context = ov::runtime::intel_gpu::ocl::ClContext(ie, ocl_instance->_context.get()); + auto remote_context = ov::intel_gpu::ocl::ClContext(ie, ocl_instance->_context.get()); auto exec_net_shared = ie.compile_model(function, remote_context, config); auto inf_req_shared = exec_net_shared.create_infer_request(); inf_req_shared.set_tensor(input, fakeImageData); @@ -398,7 +398,7 @@ TEST_P(OVRemoteTensor_TestsWithContext, smoke_canInferOnUserContext) { } TEST_P(OVRemoteTensor_TestsWithContext, smoke_canInferOnUserContextWithMultipleDevices) { - auto ie = ov::runtime::Core(); + auto ie = ov::Core(); using namespace ov::preprocess; auto p = PrePostProcessor(fn_ptr); @@ -424,7 +424,7 @@ TEST_P(OVRemoteTensor_TestsWithContext, smoke_canInferOnUserContextWithMultipleD cl::Context multi_device_ctx({ocl_instance_tmp->_device, ocl_instance_tmp->_device}); auto ocl_instance = std::make_shared(multi_device_ctx.get()); - auto remote_context = ov::runtime::intel_gpu::ocl::ClContext(ie, ocl_instance->_context.get(), 1); + auto remote_context = ov::intel_gpu::ocl::ClContext(ie, ocl_instance->_context.get(), 1); ASSERT_EQ(remote_context.get_device_name(), "GPU.0"); auto exec_net_shared = ie.compile_model(function, remote_context, config); @@ -446,7 +446,7 @@ TEST_P(OVRemoteTensor_TestsWithContext, smoke_canInferOnUserContextWithMultipleD } TEST_P(OVRemoteTensor_TestsWithContext, smoke_canInferOnUserQueue_out_of_order) { - auto ie = ov::runtime::Core(); + auto ie = ov::Core(); using namespace ov::preprocess; auto p = PrePostProcessor(fn_ptr); @@ -477,9 +477,9 @@ TEST_P(OVRemoteTensor_TestsWithContext, smoke_canInferOnUserQueue_out_of_order) cl::Buffer shared_input_buffer(ocl_instance->_context, CL_MEM_READ_WRITE, in_size, NULL, &err); cl::Buffer shared_output_buffer(ocl_instance->_context, CL_MEM_READ_WRITE, out_size, NULL, &err); - auto remote_context = ov::runtime::intel_gpu::ocl::ClContext(ie, ocl_instance->_queue.get()); + auto remote_context = ov::intel_gpu::ocl::ClContext(ie, ocl_instance->_queue.get()); auto exec_net_shared = ie.compile_model(function, remote_context); - auto gpu_context = exec_net_shared.get_context().as(); + auto gpu_context = exec_net_shared.get_context().as(); auto gpu_in_tensor = gpu_context.create_tensor(input->get_output_element_type(0), input->get_output_shape(0), shared_input_buffer); auto gpu_out_tensor = gpu_context.create_tensor(output->get_output_element_type(0), output->get_output_shape(0), shared_output_buffer); @@ -525,7 +525,7 @@ TEST_P(OVRemoteTensor_TestsWithContext, smoke_canInferOnUserQueue_out_of_order) } TEST_P(OVRemoteTensor_TestsWithContext, smoke_canInferOnUserQueue_in_order) { - auto ie = ov::runtime::Core(); + auto ie = ov::Core(); using namespace ov::preprocess; auto p = PrePostProcessor(fn_ptr); @@ -557,9 +557,9 @@ TEST_P(OVRemoteTensor_TestsWithContext, smoke_canInferOnUserQueue_in_order) { cl::Buffer shared_input_buffer(ocl_instance->_context, CL_MEM_READ_WRITE, in_size, NULL, &err); cl::Buffer shared_output_buffer(ocl_instance->_context, CL_MEM_READ_WRITE, out_size, NULL, &err); - auto remote_context = ov::runtime::intel_gpu::ocl::ClContext(ie, ocl_instance->_queue.get()); + auto remote_context = ov::intel_gpu::ocl::ClContext(ie, ocl_instance->_queue.get()); auto exec_net_shared = ie.compile_model(function, remote_context); - auto gpu_context = exec_net_shared.get_context().as(); + auto gpu_context = exec_net_shared.get_context().as(); auto gpu_in_tensor = gpu_context.create_tensor(input->get_output_element_type(0), input->get_output_shape(0), shared_input_buffer); auto gpu_out_tensor = gpu_context.create_tensor(output->get_output_element_type(0), output->get_output_shape(0), shared_output_buffer); @@ -611,10 +611,10 @@ TEST_F(OVRemoteTensor_Test, NV12toBGR_image) { // ------------------------------------------------------ // Prepare input data - ov::runtime::Tensor fake_image_data_y = FuncTestUtils::create_and_fill_tensor(ov::element::u8, {1, 1, height, width}, 50, 0, 1); - ov::runtime::Tensor fake_image_data_uv = FuncTestUtils::create_and_fill_tensor(ov::element::u8, {1, 2, height / 2, width / 2}, 256, 0, 1); + ov::Tensor fake_image_data_y = FuncTestUtils::create_and_fill_tensor(ov::element::u8, {1, 1, height, width}, 50, 0, 1); + ov::Tensor fake_image_data_uv = FuncTestUtils::create_and_fill_tensor(ov::element::u8, {1, 2, height / 2, width / 2}, 256, 0, 1); - auto ie = ov::runtime::Core(); + auto ie = ov::Core(); // ------------------------------------------------------ // inference using remote tensor @@ -635,7 +635,7 @@ TEST_F(OVRemoteTensor_Test, NV12toBGR_image) { auto exec_net_b = ie.compile_model(function, CommonTestUtils::DEVICE_GPU); auto inf_req_remote = exec_net_b.create_infer_request(); - auto cldnn_context = exec_net_b.get_context().as(); + auto cldnn_context = exec_net_b.get_context().as(); cl_context ctx = cldnn_context.get(); auto ocl_instance = std::make_shared(ctx); cl_int err; @@ -720,10 +720,10 @@ TEST_F(OVRemoteTensor_Test, NV12toBGR_buffer) { // ------------------------------------------------------ // Prepare input data - ov::runtime::Tensor fake_image_data_y = FuncTestUtils::create_and_fill_tensor(ov::element::u8, {1, 1, height, width}, 50, 0, 1); - ov::runtime::Tensor fake_image_data_uv = FuncTestUtils::create_and_fill_tensor(ov::element::u8, {1, 2, height / 2, width / 2}, 256, 0, 1); + ov::Tensor fake_image_data_y = FuncTestUtils::create_and_fill_tensor(ov::element::u8, {1, 1, height, width}, 50, 0, 1); + ov::Tensor fake_image_data_uv = FuncTestUtils::create_and_fill_tensor(ov::element::u8, {1, 2, height / 2, width / 2}, 256, 0, 1); - auto ie = ov::runtime::Core(); + auto ie = ov::Core(); auto fn_ptr_remote = ngraph::builder::subgraph::makeConvPoolRelu({1, 3, height, width}); @@ -754,9 +754,9 @@ TEST_F(OVRemoteTensor_Test, NV12toBGR_buffer) { cl::Buffer shared_input_uv_buffer(ocl_instance->_context, CL_MEM_READ_WRITE, in_size_uv, NULL, &err); cl::Buffer shared_output_buffer(ocl_instance->_context, CL_MEM_READ_WRITE, out_size, NULL, &err); - auto remote_context = ov::runtime::intel_gpu::ocl::ClContext(ie, ocl_instance->_queue.get()); + auto remote_context = ov::intel_gpu::ocl::ClContext(ie, ocl_instance->_queue.get()); auto exec_net_shared = ie.compile_model(function, remote_context); - auto gpu_context = exec_net_shared.get_context().as(); + auto gpu_context = exec_net_shared.get_context().as(); auto gpu_in_y_tensor = gpu_context.create_tensor(param_input_y->get_output_element_type(0), fake_image_data_y.get_shape(), shared_input_y_buffer); auto gpu_in_uv_tensor = gpu_context.create_tensor(param_input_uv->get_output_element_type(0), fake_image_data_uv.get_shape(), shared_input_uv_buffer); @@ -820,13 +820,13 @@ TEST_P(OVRemoteTensorBatched_Test, NV12toBGR_image) { // ------------------------------------------------------ // Prepare input data - std::vector fake_image_data_y, fake_image_data_uv; + std::vector fake_image_data_y, fake_image_data_uv; for (int i = 0; i < num_batch; i++) { fake_image_data_y.push_back(FuncTestUtils::create_and_fill_tensor(ov::element::u8, {1, 1, height, width}, 50, 0, 1, i)); fake_image_data_uv.push_back(FuncTestUtils::create_and_fill_tensor(ov::element::u8, {1, 2, height / 2, width / 2}, 256, 0, 1, i)); } - auto ie = ov::runtime::Core(); + auto ie = ov::Core(); // ------------------------------------------------------ // inference using remote tensor @@ -847,14 +847,14 @@ TEST_P(OVRemoteTensorBatched_Test, NV12toBGR_image) { auto exec_net_b = ie.compile_model(function, CommonTestUtils::DEVICE_GPU); auto inf_req_remote = exec_net_b.create_infer_request(); - auto cldnn_context = exec_net_b.get_context().as(); + auto cldnn_context = exec_net_b.get_context().as(); cl_context ctx = cldnn_context.get(); auto ocl_instance = std::make_shared(ctx); cl_int err; std::vector nv12_image_plane_y, nv12_image_plane_uv; std::vector img_y, img_uv; - std::vector tensor_remote_y, tensor_remote_uv; + std::vector tensor_remote_y, tensor_remote_uv; for (size_t i = 0; i < num_batch; ++i) { cl_image_format image_format; @@ -943,13 +943,13 @@ TEST_P(OVRemoteTensorBatched_Test, NV12toBGR_buffer) { // ------------------------------------------------------ // Prepare input data - std::vector fake_image_data_y, fake_image_data_uv; + std::vector fake_image_data_y, fake_image_data_uv; for (size_t i = 0; i < num_batch * 2; ++i) { fake_image_data_y.push_back(FuncTestUtils::create_and_fill_tensor(ov::element::u8, {1, 1, height, width}, 50, 0, 1, i)); fake_image_data_uv.push_back(FuncTestUtils::create_and_fill_tensor(ov::element::u8, {1, 2, height / 2, width / 2}, 256, 0, 1, i)); } - auto ie = ov::runtime::Core(); + auto ie = ov::Core(); // ------------------------------------------------------ // inference using remote tensor @@ -976,12 +976,12 @@ TEST_P(OVRemoteTensorBatched_Test, NV12toBGR_buffer) { auto in_size_uv = ov::shape_size(param_input_uv->get_output_shape(0)) * param_input_uv->get_output_element_type(0).size(); auto out_size = ov::shape_size(output->get_output_shape(0)) * output->get_output_element_type(0).size(); - auto remote_context = ov::runtime::intel_gpu::ocl::ClContext(ie, ocl_instance->_queue.get()); + auto remote_context = ov::intel_gpu::ocl::ClContext(ie, ocl_instance->_queue.get()); auto exec_net_shared = ie.compile_model(function, remote_context); - auto gpu_context = exec_net_shared.get_context().as(); + auto gpu_context = exec_net_shared.get_context().as(); std::vector shared_input_y_buffer, shared_input_uv_buffer; - std::vector gpu_in_y_tensor, gpu_in_uv_tensor; + std::vector gpu_in_y_tensor, gpu_in_uv_tensor; for (size_t i = 0; i < num_batch; ++i) { shared_input_y_buffer.emplace_back(cl::Buffer(ocl_instance->_context, CL_MEM_READ_WRITE, in_size_y, NULL, &err)); @@ -1021,7 +1021,7 @@ TEST_P(OVRemoteTensorBatched_Test, NV12toBGR_buffer) { inf_req_shared.wait(); std::vector shared_input_y_buffer_new, shared_input_uv_buffer_new; - std::vector gpu_in_y_tensor_new, gpu_in_uv_tensor_new; + std::vector gpu_in_y_tensor_new, gpu_in_uv_tensor_new; for (size_t i = 0; i < num_batch; ++i) { shared_input_y_buffer_new.emplace_back(cl::Buffer(ocl_instance->_context, CL_MEM_READ_WRITE, in_size_y, NULL, &err)); shared_input_uv_buffer_new.emplace_back(cl::Buffer(ocl_instance->_context, CL_MEM_READ_WRITE, in_size_uv, NULL, &err)); diff --git a/src/tests/functional/plugin/gpu/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp b/src/tests/functional/plugin/gpu/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp index 4f75d0b5b54..5c233fdd978 100644 --- a/src/tests/functional/plugin/gpu/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp +++ b/src/tests/functional/plugin/gpu/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp @@ -11,12 +11,12 @@ TEST_P(OVInferRequestPerfCountersTest, CheckOperationInProfilingInfo) { req = execNet.create_infer_request(); ASSERT_NO_THROW(req.infer()); - std::vector profiling_info; + std::vector profiling_info; ASSERT_NO_THROW(profiling_info = req.get_profiling_info()); for (const auto& op : function->get_ops()) { auto op_is_in_profiling_info = std::any_of(std::begin(profiling_info), std::end(profiling_info), - [&] (const ov::runtime::ProfilingInfo& info) { + [&] (const ov::ProfilingInfo& info) { if (info.node_name.find(op->get_friendly_name() + "_") != std::string::npos || info.node_name == op->get_friendly_name()) { return true; } else { diff --git a/src/tests/functional/plugin/gpu/shared_tests_instances/behavior/ov_plugin/core_integration.cpp b/src/tests/functional/plugin/gpu/shared_tests_instances/behavior/ov_plugin/core_integration.cpp index 5d040a0019b..c350621a8e5 100644 --- a/src/tests/functional/plugin/gpu/shared_tests_instances/behavior/ov_plugin/core_integration.cpp +++ b/src/tests/functional/plugin/gpu/shared_tests_instances/behavior/ov_plugin/core_integration.cpp @@ -75,7 +75,7 @@ INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetAvailableDevices, OVClassGetAvailable // using OVClassGetMetricTest_GPU_DEVICE_TOTAL_MEM_SIZE = OVClassBaseTestP; TEST_P(OVClassGetMetricTest_GPU_DEVICE_TOTAL_MEM_SIZE, GetMetricAndPrintNoThrow) { - ov::runtime::Core ie; + ov::Core ie; ov::Any p; ASSERT_NO_THROW(p = ie.get_metric(deviceName, GPU_METRIC_KEY(DEVICE_TOTAL_MEM_SIZE))); @@ -92,7 +92,7 @@ INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest, using OVClassGetMetricTest_GPU_UARCH_VERSION = OVClassBaseTestP; TEST_P(OVClassGetMetricTest_GPU_UARCH_VERSION, GetMetricAndPrintNoThrow) { - ov::runtime::Core ie; + ov::Core ie; ov::Any p; ASSERT_NO_THROW(p = ie.get_metric(deviceName, GPU_METRIC_KEY(UARCH_VERSION))); @@ -108,7 +108,7 @@ INSTANTIATE_TEST_SUITE_P(nightly_OVClassGetMetricTest, using OVClassGetMetricTest_GPU_EXECUTION_UNITS_COUNT = OVClassBaseTestP; TEST_P(OVClassGetMetricTest_GPU_EXECUTION_UNITS_COUNT, GetMetricAndPrintNoThrow) { - ov::runtime::Core ie; + ov::Core ie; ov::Any p; ASSERT_NO_THROW(p = ie.get_metric(deviceName, GPU_METRIC_KEY(EXECUTION_UNITS_COUNT))); diff --git a/src/tests/functional/plugin/gpu/shared_tests_instances/behavior/ov_plugin/remote.cpp b/src/tests/functional/plugin/gpu/shared_tests_instances/behavior/ov_plugin/remote.cpp index a242493a129..1016a77be06 100644 --- a/src/tests/functional/plugin/gpu/shared_tests_instances/behavior/ov_plugin/remote.cpp +++ b/src/tests/functional/plugin/gpu/shared_tests_instances/behavior/ov_plugin/remote.cpp @@ -11,7 +11,7 @@ namespace { const std::vector> configs; -std::vector> generate_remote_params() { +std::vector> generate_remote_params() { return {}; } diff --git a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp index 11d7494d427..c77496b8983 100644 --- a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp +++ b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_infer_request/perf_counters.cpp @@ -12,13 +12,13 @@ namespace { TEST_P(OVInferRequestPerfCountersTest, CheckOperationInProfilingInfo) { req = execNet.create_infer_request(); ASSERT_NO_THROW(req.infer()); - std::vector profiling_info; + std::vector profiling_info; ASSERT_NO_THROW(profiling_info = req.get_profiling_info()); for (const auto& op : function->get_ops()) { if (ov::is_type(op) || ov::is_type(op)) continue; auto op_is_in_profiling_info = std::any_of(std::begin(profiling_info), std::end(profiling_info), - [&] (const ov::runtime::ProfilingInfo& info) { + [&] (const ov::ProfilingInfo& info) { if (info.node_name.find(op->get_friendly_name() + "_") != std::string::npos || info.node_name == op->get_friendly_name()) { return true; } else { diff --git a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_plugin/core_integration.cpp b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_plugin/core_integration.cpp index 2178fd25440..994db394375 100644 --- a/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_plugin/core_integration.cpp +++ b/src/tests/functional/plugin/myriad/shared_tests_instances/behavior/ov_plugin/core_integration.cpp @@ -34,7 +34,7 @@ INSTANTIATE_TEST_SUITE_P(OVClassNetworkTestP_smoke, OVClassNetworkTestP, ::testi using OVClassNetworkTestP_VPU_GetMetric = OVClassNetworkTestP; TEST_P(OVClassNetworkTestP_VPU_GetMetric, smoke_OptimizationCapabilitiesReturnsFP16) { - ov::runtime::Core ie; + ov::Core ie; ASSERT_METRIC_SUPPORTED(METRIC_KEY(OPTIMIZATION_CAPABILITIES)) ov::Any optimizationCapabilitiesParameter; diff --git a/src/tests/functional/plugin/shared/include/base/ov_behavior_test_utils.hpp b/src/tests/functional/plugin/shared/include/base/ov_behavior_test_utils.hpp index b953d836f69..efbcce0644b 100644 --- a/src/tests/functional/plugin/shared/include/base/ov_behavior_test_utils.hpp +++ b/src/tests/functional/plugin/shared/include/base/ov_behavior_test_utils.hpp @@ -59,16 +59,16 @@ public: } protected: - ov::runtime::CompiledModel execNet; - std::shared_ptr core = utils::PluginCache::get().core(); + ov::CompiledModel execNet; + std::shared_ptr core = utils::PluginCache::get().core(); std::string targetDevice; std::map configuration; std::shared_ptr function; }; -inline ov::runtime::Core createCoreWithTemplate() { +inline ov::Core createCoreWithTemplate() { ov::test::utils::PluginCache::get().reset(); - ov::runtime::Core core; + ov::Core core; #ifndef OPENVINO_STATIC_LIBRARY std::string pluginName = "ov_template_plugin"; pluginName += IE_BUILD_POSTFIX; diff --git a/src/tests/functional/plugin/shared/include/behavior/executable_network/exec_network_base.hpp b/src/tests/functional/plugin/shared/include/behavior/executable_network/exec_network_base.hpp index d7eb3ea5350..e8111cd8872 100644 --- a/src/tests/functional/plugin/shared/include/behavior/executable_network/exec_network_base.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/executable_network/exec_network_base.hpp @@ -320,7 +320,7 @@ TEST_P(ExecNetSetPrecision, canSetOutputPrecisionForNetwork) { TEST_P(ExecutableNetworkBaseTest, loadIncorrectV10Model) { // Skip test according to plugin specific disabledTestPatterns() (if any) SKIP_IF_CURRENT_TEST_IS_DISABLED() - ov::runtime::CompiledModel execNet; + ov::CompiledModel execNet; // Create simple function { @@ -343,7 +343,7 @@ TEST_P(ExecutableNetworkBaseTest, loadIncorrectV10Model) { TEST_P(ExecutableNetworkBaseTest, loadIncorrectV11Model) { // Skip test according to plugin specific disabledTestPatterns() (if any) SKIP_IF_CURRENT_TEST_IS_DISABLED() - ov::runtime::CompiledModel execNet; + ov::CompiledModel execNet; // Create simple function { diff --git a/src/tests/functional/plugin/shared/include/behavior/ov_executable_network/exec_graph_info.hpp b/src/tests/functional/plugin/shared/include/behavior/ov_executable_network/exec_graph_info.hpp index d3ec7812c2c..a7c551e46be 100644 --- a/src/tests/functional/plugin/shared/include/behavior/ov_executable_network/exec_graph_info.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/ov_executable_network/exec_graph_info.hpp @@ -58,7 +58,7 @@ class OVExecGraphImportExportTest : public testing::WithParamInterface core = utils::PluginCache::get().core(); + std::shared_ptr core = utils::PluginCache::get().core(); std::string targetDevice; std::map configuration; ov::element::Type_t elementType; @@ -70,7 +70,7 @@ TEST_P(OVExecGraphImportExportTest, importExportedFunction) { GTEST_SKIP() << "MULTI / AUTO does not support import / export" << std::endl; } - ov::runtime::CompiledModel execNet; + ov::CompiledModel execNet; // Create simple function { @@ -99,7 +99,7 @@ TEST_P(OVExecGraphImportExportTest, importExportedFunction) { std::stringstream strm; execNet.export_model(strm); - ov::runtime::CompiledModel importedExecNet = core->import_model(strm, targetDevice, configuration); + ov::CompiledModel importedExecNet = core->import_model(strm, targetDevice, configuration); EXPECT_EQ(function->inputs().size(), 2); EXPECT_EQ(function->inputs().size(), importedExecNet.inputs().size()); EXPECT_THROW(importedExecNet.input(), ov::Exception); @@ -199,13 +199,13 @@ TEST_P(OVExecGraphImportExportTest, readFromV10IR) { )V0G0N"; - function = core->read_model(model, ov::runtime::Tensor()); + function = core->read_model(model, ov::Tensor()); EXPECT_EQ(function->inputs().size(), 1); EXPECT_EQ(function->outputs().size(), 1); EXPECT_NO_THROW(function->input("in1")); // remove if read_model does not change function names EXPECT_NO_THROW(function->output("round")); // remove if read_model does not change function names - ov::runtime::CompiledModel execNet = core->compile_model(function, targetDevice, configuration); + ov::CompiledModel execNet = core->compile_model(function, targetDevice, configuration); EXPECT_EQ(execNet.inputs().size(), 1); EXPECT_EQ(execNet.outputs().size(), 1); EXPECT_NO_THROW(execNet.input("in1")); @@ -218,7 +218,7 @@ TEST_P(OVExecGraphImportExportTest, readFromV10IR) { std::stringstream strm; execNet.export_model(strm); - ov::runtime::CompiledModel importedExecNet = core->import_model(strm, targetDevice, configuration); + ov::CompiledModel importedExecNet = core->import_model(strm, targetDevice, configuration); EXPECT_EQ(importedExecNet.inputs().size(), 1); EXPECT_EQ(importedExecNet.outputs().size(), 1); EXPECT_NO_THROW(importedExecNet.input("in1")); @@ -263,7 +263,7 @@ TEST_P(OVExecGraphImportExportTest, importExportedIENetwork) { std::stringstream strm; execNet.Export(strm); - ov::runtime::CompiledModel importedExecNet = core->import_model(strm, targetDevice, configuration); + ov::CompiledModel importedExecNet = core->import_model(strm, targetDevice, configuration); EXPECT_EQ(function->inputs().size(), 2); EXPECT_EQ(function->inputs().size(), importedExecNet.inputs().size()); EXPECT_THROW(importedExecNet.input(), ov::Exception); @@ -299,7 +299,7 @@ TEST_P(OVExecGraphImportExportTest, ieImportExportedFunction) { } std::shared_ptr ie = ::PluginCache::get().ie(); - ov::runtime::CompiledModel execNet; + ov::CompiledModel execNet; // Create simple function { diff --git a/src/tests/functional/plugin/shared/include/behavior/ov_executable_network/exec_network_base.hpp b/src/tests/functional/plugin/shared/include/behavior/ov_executable_network/exec_network_base.hpp index 039d04b9c9d..4c709531361 100644 --- a/src/tests/functional/plugin/shared/include/behavior/ov_executable_network/exec_network_base.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/ov_executable_network/exec_network_base.hpp @@ -46,7 +46,7 @@ public: } } - bool compareTensors(const ov::runtime::Tensor& t1, const ov::runtime::Tensor& t2) { + bool compareTensors(const ov::Tensor& t1, const ov::Tensor& t2) { void* data1; void* data2; try { @@ -67,7 +67,7 @@ public: } protected: - std::shared_ptr core = utils::PluginCache::get().core(); + std::shared_ptr core = utils::PluginCache::get().core(); std::string targetDevice; std::map configuration; std::shared_ptr function; @@ -79,7 +79,7 @@ TEST_P(OVExecutableNetworkBaseTest, canLoadCorrectNetworkToGetExecutable) { TEST(OVExecutableNetworkBaseTest, smoke_LoadNetworkToDefaultDeviceNoThrow) { SKIP_IF_CURRENT_TEST_IS_DISABLED() - std::shared_ptr core = utils::PluginCache::get().core(); + std::shared_ptr core = utils::PluginCache::get().core(); std::shared_ptr function = ngraph::builder::subgraph::makeConvPoolRelu(); EXPECT_NO_THROW(auto execNet = core->compile_model(function)); } @@ -150,7 +150,7 @@ TEST_P(OVExecutableNetworkBaseTest, CanSetConfigToExecNetAndCheckConfigAndCheck) } TEST_P(OVExecutableNetworkBaseTest, CanCreateTwoExeNetworks) { - std::vector vec; + std::vector vec; for (auto i = 0; i < 2; i++) { EXPECT_NO_THROW(vec.push_back(core->compile_model(function, targetDevice, configuration))); EXPECT_NE(nullptr, function); @@ -158,7 +158,7 @@ TEST_P(OVExecutableNetworkBaseTest, CanCreateTwoExeNetworks) { } TEST_P(OVExecutableNetworkBaseTest, CanCreateTwoExeNetworksAndCheckFunction) { - std::vector vec; + std::vector vec; for (auto i = 0; i < 2; i++) { EXPECT_NO_THROW(vec.push_back(core->compile_model(function, targetDevice, configuration))); EXPECT_NE(nullptr, vec[i].get_runtime_model()); @@ -335,7 +335,7 @@ TEST_P(OVExecutableNetworkBaseTest, pluginDoesNotChangeOriginalNetwork) { TEST_P(OVExecutableNetworkBaseTest, getInputFromFunctionWithSingleInput) { // Skip test according to plugin specific disabledTestPatterns() (if any) SKIP_IF_CURRENT_TEST_IS_DISABLED() - ov::runtime::CompiledModel execNet; + ov::CompiledModel execNet; execNet = core->compile_model(function, targetDevice, configuration); EXPECT_EQ(function->inputs().size(), 1); @@ -345,9 +345,9 @@ TEST_P(OVExecutableNetworkBaseTest, getInputFromFunctionWithSingleInput) { EXPECT_EQ(function->input().get_tensor().get_partial_shape(), execNet.input().get_tensor().get_partial_shape()); EXPECT_EQ(function->input().get_tensor().get_element_type(), execNet.input().get_tensor().get_element_type()); - ov::runtime::InferRequest request = execNet.create_infer_request(); + ov::InferRequest request = execNet.create_infer_request(); - ov::runtime::Tensor tensor1, tensor2; + ov::Tensor tensor1, tensor2; EXPECT_NO_THROW(tensor1 = request.get_tensor(execNet.input())); EXPECT_NO_THROW(tensor2 = request.get_tensor(function->input())); EXPECT_TRUE(compareTensors(tensor1, tensor2)); @@ -362,7 +362,7 @@ TEST_P(OVExecutableNetworkBaseTest, getInputFromFunctionWithSingleInput) { TEST_P(OVExecutableNetworkBaseTest, getOutputFromFunctionWithSingleInput) { // Skip test according to plugin specific disabledTestPatterns() (if any) SKIP_IF_CURRENT_TEST_IS_DISABLED() - ov::runtime::CompiledModel execNet; + ov::CompiledModel execNet; execNet = core->compile_model(function, targetDevice, configuration); EXPECT_EQ(function->outputs().size(), 1); @@ -372,8 +372,8 @@ TEST_P(OVExecutableNetworkBaseTest, getOutputFromFunctionWithSingleInput) { EXPECT_EQ(function->output().get_tensor().get_partial_shape(), execNet.output().get_tensor().get_partial_shape()); EXPECT_EQ(function->output().get_tensor().get_element_type(), execNet.output().get_tensor().get_element_type()); - ov::runtime::InferRequest request = execNet.create_infer_request(); - ov::runtime::Tensor tensor1, tensor2; + ov::InferRequest request = execNet.create_infer_request(); + ov::Tensor tensor1, tensor2; EXPECT_NO_THROW(tensor1 = request.get_tensor(execNet.output())); EXPECT_NO_THROW(tensor2 = request.get_tensor(function->output())); EXPECT_TRUE(compareTensors(tensor1, tensor2)); @@ -388,7 +388,7 @@ TEST_P(OVExecutableNetworkBaseTest, getOutputFromFunctionWithSingleInput) { TEST_P(OVExecutableNetworkBaseTest, getInputsFromFunctionWithSeveralInputs) { // Skip test according to plugin specific disabledTestPatterns() (if any) SKIP_IF_CURRENT_TEST_IS_DISABLED() - ov::runtime::CompiledModel execNet; + ov::CompiledModel execNet; // Create simple function { @@ -427,9 +427,9 @@ TEST_P(OVExecutableNetworkBaseTest, getInputsFromFunctionWithSeveralInputs) { EXPECT_EQ(function->input(1).get_node(), function->input("data2").get_node()); EXPECT_NE(function->input(0).get_node(), function->input("data2").get_node()); - ov::runtime::InferRequest request = execNet.create_infer_request(); + ov::InferRequest request = execNet.create_infer_request(); - ov::runtime::Tensor tensor1, tensor2; + ov::Tensor tensor1, tensor2; EXPECT_NO_THROW(tensor1 = request.get_tensor(execNet.input(0))); EXPECT_NO_THROW(tensor2 = request.get_tensor(function->input(0))); EXPECT_TRUE(compareTensors(tensor1, tensor2)); @@ -459,7 +459,7 @@ TEST_P(OVExecutableNetworkBaseTest, getInputsFromFunctionWithSeveralInputs) { TEST_P(OVExecutableNetworkBaseTest, getOutputsFromFunctionWithSeveralOutputs) { // Skip test according to plugin specific disabledTestPatterns() (if any) SKIP_IF_CURRENT_TEST_IS_DISABLED() - ov::runtime::CompiledModel execNet; + ov::CompiledModel execNet; // Create simple function { @@ -498,9 +498,9 @@ TEST_P(OVExecutableNetworkBaseTest, getOutputsFromFunctionWithSeveralOutputs) { EXPECT_EQ(function->output(1).get_node(), function->output("concat").get_node()); EXPECT_NE(function->output(0).get_node(), function->output("concat").get_node()); - ov::runtime::InferRequest request = execNet.create_infer_request(); + ov::InferRequest request = execNet.create_infer_request(); - ov::runtime::Tensor tensor1, tensor2; + ov::Tensor tensor1, tensor2; EXPECT_NO_THROW(tensor1 = request.get_tensor(execNet.output(0))); EXPECT_NO_THROW(tensor2 = request.get_tensor(function->output(0))); EXPECT_TRUE(compareTensors(tensor1, tensor2)); @@ -530,7 +530,7 @@ TEST_P(OVExecutableNetworkBaseTest, getOutputsFromFunctionWithSeveralOutputs) { TEST_P(OVExecutableNetworkBaseTest, getOutputsFromSplitFunctionWithSeveralOutputs) { // Skip test according to plugin specific disabledTestPatterns() (if any) SKIP_IF_CURRENT_TEST_IS_DISABLED() - ov::runtime::CompiledModel execNet; + ov::CompiledModel execNet; // Create simple function { @@ -565,9 +565,9 @@ TEST_P(OVExecutableNetworkBaseTest, getOutputsFromSplitFunctionWithSeveralOutput EXPECT_EQ(function->output(1).get_node(), function->output("tensor_split_2").get_node()); EXPECT_NE(function->output(0).get_node(), function->output("tensor_split_2").get_node()); - ov::runtime::InferRequest request = execNet.create_infer_request(); + ov::InferRequest request = execNet.create_infer_request(); - ov::runtime::Tensor tensor1, tensor2; + ov::Tensor tensor1, tensor2; EXPECT_NO_THROW(tensor1 = request.get_tensor(execNet.output(0))); EXPECT_NO_THROW(tensor2 = request.get_tensor(function->output(0))); EXPECT_TRUE(compareTensors(tensor1, tensor2)); @@ -596,7 +596,7 @@ TEST_P(OVExecutableNetworkBaseTest, getOutputsFromSplitFunctionWithSeveralOutput // Load correct network to Plugin to get executable network TEST_P(OVExecutableNetworkBaseTest, precisionsAsInOriginalFunction) { - ov::runtime::CompiledModel execNet; + ov::CompiledModel execNet; EXPECT_NO_THROW(execNet = core->compile_model(function, targetDevice, configuration)); EXPECT_EQ(function->get_parameters().size(), execNet.inputs().size()); @@ -620,7 +620,7 @@ TEST_P(OVExecutableNetworkBaseTest, precisionsAsInOriginalIR) { const std::string m_out_bin_path_1 = "precisionsAsInOriginalIR.bin"; ov::pass::Serialize(m_out_xml_path_1, m_out_bin_path_1).run_on_function(function); - ov::runtime::CompiledModel execNet; + ov::CompiledModel execNet; EXPECT_NO_THROW(execNet = core->compile_model(m_out_xml_path_1, targetDevice, configuration)); EXPECT_EQ(function->get_parameters().size(), execNet.inputs().size()); @@ -639,16 +639,16 @@ TEST_P(OVExecutableNetworkBaseTest, precisionsAsInOriginalIR) { } TEST_P(OVExecutableNetworkBaseTest, getCompiledModelFromInferRequest) { - ov::runtime::InferRequest req; + ov::InferRequest req; { - ov::runtime::CompiledModel compiled_model; + ov::CompiledModel compiled_model; ASSERT_NO_THROW(compiled_model = core->compile_model(function, targetDevice, configuration)); ASSERT_NO_THROW(req = compiled_model.create_infer_request()); ASSERT_NO_THROW(req.infer()); } { - ov::runtime::CompiledModel restored_compiled_model; - ov::runtime::InferRequest another_req; + ov::CompiledModel restored_compiled_model; + ov::InferRequest another_req; ASSERT_NO_THROW(restored_compiled_model = req.get_compiled_model()); ASSERT_NO_THROW(another_req = restored_compiled_model.create_infer_request()); ASSERT_NO_THROW(another_req.infer()); @@ -658,7 +658,7 @@ TEST_P(OVExecutableNetworkBaseTest, getCompiledModelFromInferRequest) { TEST_P(OVExecutableNetworkBaseTest, loadIncorrectV10Model) { // Skip test according to plugin specific disabledTestPatterns() (if any) SKIP_IF_CURRENT_TEST_IS_DISABLED() - ov::runtime::CompiledModel execNet; + ov::CompiledModel execNet; // Create simple function { @@ -680,7 +680,7 @@ TEST_P(OVExecutableNetworkBaseTest, loadIncorrectV10Model) { TEST_P(OVExecutableNetworkBaseTest, loadIncorrectV11Model) { // Skip test according to plugin specific disabledTestPatterns() (if any) SKIP_IF_CURRENT_TEST_IS_DISABLED() - ov::runtime::CompiledModel execNet; + ov::CompiledModel execNet; // Create simple function { diff --git a/src/tests/functional/plugin/shared/include/behavior/ov_executable_network/get_metric.hpp b/src/tests/functional/plugin/shared/include/behavior/ov_executable_network/get_metric.hpp index 4ab258ed5ad..6988bc2c8c8 100644 --- a/src/tests/functional/plugin/shared/include/behavior/ov_executable_network/get_metric.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/ov_executable_network/get_metric.hpp @@ -87,9 +87,9 @@ using OVClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK = OVClassHeter // TEST_P(OVClassImportExportTestP, smoke_ImportNetworkNoThrowWithDeviceName) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); std::stringstream strm; - ov::runtime::CompiledModel executableNetwork; + ov::CompiledModel executableNetwork; ASSERT_NO_THROW(executableNetwork = ie.compile_model(actualNetwork, deviceName)); ASSERT_NO_THROW(executableNetwork.export_model(strm)); ASSERT_NO_THROW(executableNetwork = ie.import_model(strm, deviceName)); @@ -100,7 +100,7 @@ TEST_P(OVClassImportExportTestP, smoke_ImportNetworkNoThrowWithDeviceName) { // ExecutableNetwork GetMetric / GetConfig // TEST_P(OVClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS, GetMetricNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; auto exeNetwork = ie.compile_model(simpleNetwork, deviceName); @@ -118,7 +118,7 @@ TEST_P(OVClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS, GetMetricNoT } TEST_P(OVClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS, GetMetricNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; auto exeNetwork = ie.compile_model(simpleNetwork, deviceName); @@ -136,7 +136,7 @@ TEST_P(OVClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS, GetMetricNoThrow } TEST_P(OVClassExecutableNetworkGetMetricTest_NETWORK_NAME, GetMetricNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; auto exeNetwork = ie.compile_model(simpleNetwork, deviceName); @@ -150,7 +150,7 @@ TEST_P(OVClassExecutableNetworkGetMetricTest_NETWORK_NAME, GetMetricNoThrow) { } TEST_P(OVClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS, GetMetricNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; auto exeNetwork = ie.compile_model(simpleNetwork, deviceName); @@ -164,7 +164,7 @@ TEST_P(OVClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS, G } TEST_P(OVClassExecutableNetworkGetMetricTest_ThrowsUnsupported, GetMetricThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; auto exeNetwork = ie.compile_model(simpleNetwork, deviceName); @@ -173,7 +173,7 @@ TEST_P(OVClassExecutableNetworkGetMetricTest_ThrowsUnsupported, GetMetricThrow) } TEST_P(OVClassExecutableNetworkGetConfigTest, GetConfigNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; auto exeNetwork = ie.compile_model(simpleNetwork, deviceName); @@ -189,7 +189,7 @@ TEST_P(OVClassExecutableNetworkGetConfigTest, GetConfigNoThrow) { } TEST_P(OVClassExecutableNetworkGetConfigTest, GetConfigThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; auto exeNetwork = ie.compile_model(simpleNetwork, deviceName); @@ -198,7 +198,7 @@ TEST_P(OVClassExecutableNetworkGetConfigTest, GetConfigThrows) { } TEST_P(OVClassExecutableNetworkSetConfigTest, SetConfigThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; auto exeNetwork = ie.compile_model(simpleNetwork, deviceName); @@ -207,7 +207,7 @@ TEST_P(OVClassExecutableNetworkSetConfigTest, SetConfigThrows) { } TEST_P(OVClassExecutableNetworkSupportedConfigTest, SupportedConfigWorks) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; auto exeNetwork = ie.compile_model(simpleNetwork, deviceName); @@ -218,7 +218,7 @@ TEST_P(OVClassExecutableNetworkSupportedConfigTest, SupportedConfigWorks) { } TEST_P(OVClassExecutableNetworkUnsupportedConfigTest, UnsupportedConfigThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); auto exeNetwork = ie.compile_model(simpleNetwork, deviceName); @@ -226,7 +226,7 @@ TEST_P(OVClassExecutableNetworkUnsupportedConfigTest, UnsupportedConfigThrows) { } TEST_P(OVClassExecutableNetworkGetConfigTest, GetConfigNoEmptyNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_NO_THROW(p = ie.get_metric(deviceName, METRIC_KEY(SUPPORTED_CONFIG_KEYS))); @@ -248,7 +248,7 @@ TEST_P(OVClassExecutableNetworkGetConfigTest, GetConfigNoEmptyNoThrow) { } TEST_P(OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS, GetMetricNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any pHetero, pDevice; auto heteroExeNetwork = ie.compile_model(actualNetwork, heteroDeviceName); @@ -281,7 +281,7 @@ TEST_P(OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS, GetMet } TEST_P(OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS, GetMetricNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any pHetero, pDevice; auto heteroExeNetwork = ie.compile_model(actualNetwork, heteroDeviceName); @@ -317,7 +317,7 @@ TEST_P(OVClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS, GetMetricN } TEST_P(OVClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME, GetMetricNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; auto exeNetwork = ie.compile_model(actualNetwork, heteroDeviceName); @@ -329,7 +329,7 @@ TEST_P(OVClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME, GetMetricNoThro } TEST_P(OVClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK, GetMetricNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; setHeteroNetworkAffinity(deviceName); diff --git a/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/batched_tensors.hpp b/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/batched_tensors.hpp index 0c9e27fba18..e2e96c4c1c9 100644 --- a/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/batched_tensors.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/batched_tensors.hpp @@ -27,7 +27,7 @@ protected: static std::shared_ptr create_n_inputs(size_t num, element::Type type, const PartialShape& shape, const ov::Layout& layout); - std::shared_ptr ie = utils::PluginCache::get().core(); + std::shared_ptr ie = utils::PluginCache::get().core(); std::string targetDevice; std::string m_cache_dir; // internal member bool m_need_reset_core = false; diff --git a/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/infer_request_dynamic.hpp b/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/infer_request_dynamic.hpp index 88d3035f7ff..ecfed10b807 100644 --- a/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/infer_request_dynamic.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/infer_request_dynamic.hpp @@ -51,7 +51,7 @@ protected: void TearDown() override; - std::shared_ptr ie = utils::PluginCache::get().core(); + std::shared_ptr ie = utils::PluginCache::get().core(); std::shared_ptr function; std::string targetDevice; std::map configuration; diff --git a/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/inference_chaining.hpp b/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/inference_chaining.hpp index c01492b9b02..4c926a2953e 100644 --- a/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/inference_chaining.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/inference_chaining.hpp @@ -37,9 +37,9 @@ protected: static std::shared_ptr getThirdStaticFunction(const ov::PartialShape &shape = {3}); template - ov::runtime::Tensor tensor(const std::vector &v) { + ov::Tensor tensor(const std::vector &v) { auto type = ov::element::from(); - ov::runtime::Tensor tensor(type, {v.size()}); + ov::Tensor tensor(type, {v.size()}); std::memcpy(tensor.data(), v.data(), v.size() * type.size()); return tensor; diff --git a/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/io_tensor.hpp b/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/io_tensor.hpp index b17b9c46a03..2dd01988d1d 100644 --- a/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/io_tensor.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/io_tensor.hpp @@ -18,7 +18,7 @@ struct OVInferRequestIOTensorTest : public OVInferRequestTests { static std::string getTestCaseName(const testing::TestParamInfo& obj); void SetUp() override; void TearDown() override; - runtime::InferRequest req; + ov::InferRequest req; ov::Output input; ov::Output output; }; @@ -33,10 +33,10 @@ struct OVInferRequestIOTensorSetPrecisionTest : public testing::WithParamInterfa static std::string getTestCaseName(const testing::TestParamInfo& obj); void SetUp() override; void TearDown() override; - std::shared_ptr core = utils::PluginCache::get().core(); + std::shared_ptr core = utils::PluginCache::get().core(); std::shared_ptr function; - runtime::CompiledModel execNet; - runtime::InferRequest req; + ov::CompiledModel execNet; + ov::InferRequest req; std::string target_device; runtime::ConfigMap config; element::Type element_type; @@ -50,10 +50,10 @@ struct OVInferRequestCheckTensorPrecision : public testing::WithParamInterface core = utils::PluginCache::get().core(); + std::shared_ptr core = utils::PluginCache::get().core(); std::shared_ptr model; - runtime::CompiledModel compModel; - runtime::InferRequest req; + ov::CompiledModel compModel; + ov::InferRequest req; runtime::ConfigMap config; std::string target_device; element::Type element_type; diff --git a/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/perf_counters.hpp b/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/perf_counters.hpp index 21cd5e60785..232a7b48446 100644 --- a/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/perf_counters.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/perf_counters.hpp @@ -12,7 +12,7 @@ namespace behavior { struct OVInferRequestPerfCountersTest : public OVInferRequestTests { static std::string getTestCaseName(const testing::TestParamInfo& obj); void SetUp() override; - runtime::InferRequest req; + ov::InferRequest req; }; } // namespace behavior } // namespace test diff --git a/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/wait.hpp b/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/wait.hpp index 3f43426a3a4..e5adf8bf2b1 100644 --- a/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/wait.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/ov_infer_request/wait.hpp @@ -13,7 +13,7 @@ struct OVInferRequestWaitTests : public OVInferRequestTests { static std::string getTestCaseName(const testing::TestParamInfo& obj); void SetUp() override; void TearDown() override; - runtime::InferRequest req; + ov::InferRequest req; ov::Output input; ov::Output output; }; diff --git a/src/tests/functional/plugin/shared/include/behavior/ov_plugin/core_integration.hpp b/src/tests/functional/plugin/shared/include/behavior/ov_plugin/core_integration.hpp index 02436ae27a9..2a4014be694 100644 --- a/src/tests/functional/plugin/shared/include/behavior/ov_plugin/core_integration.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/ov_plugin/core_integration.hpp @@ -90,13 +90,13 @@ using OVClassSeveralDevicesTestLoadNetwork = OVClassSeveralDevicesTest; using OVClassSeveralDevicesTestQueryNetwork = OVClassSeveralDevicesTest; using OVClassSeveralDevicesTestDefaultCore = OVClassSeveralDevicesTest; -inline bool supportsAvaliableDevices(ov::runtime::Core& ie, const std::string& deviceName) { +inline bool supportsAvaliableDevices(ov::Core& ie, const std::string& deviceName) { auto supportedMetricKeys = ie.get_metric(deviceName, METRIC_KEY(SUPPORTED_METRICS)).as>(); return supportedMetricKeys.end() != std::find(std::begin(supportedMetricKeys), std::end(supportedMetricKeys), METRIC_KEY(AVAILABLE_DEVICES)); } -bool supportsDeviceID(ov::runtime::Core& ie, const std::string& deviceName) { +bool supportsDeviceID(ov::Core& ie, const std::string& deviceName) { auto supportedConfigKeys = ie.get_metric(deviceName, METRIC_KEY(SUPPORTED_CONFIG_KEYS)).as>(); return supportedConfigKeys.end() != @@ -104,11 +104,11 @@ bool supportsDeviceID(ov::runtime::Core& ie, const std::string& deviceName) { } TEST(OVClassBasicTest, smoke_createDefault) { - ASSERT_NO_THROW(ov::runtime::Core ie); + ASSERT_NO_THROW(ov::Core ie); } TEST_P(OVClassBasicTestP, registerExistingPluginThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_THROW(ie.register_plugin(pluginName, deviceName), ov::Exception); } @@ -116,19 +116,19 @@ TEST_P(OVClassBasicTestP, registerExistingPluginThrows) { #ifndef OPENVINO_STATIC_LIBRARY TEST_P(OVClassBasicTestP, registerNewPluginNoThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_NO_THROW(ie.register_plugin(pluginName, "NEW_DEVICE_NAME")); ASSERT_NO_THROW(ie.get_metric("NEW_DEVICE_NAME", METRIC_KEY(SUPPORTED_CONFIG_KEYS))); } TEST(OVClassBasicTest, smoke_registerExistingPluginFileThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_THROW(ie.register_plugins("nonExistPlugins.xml"), ov::Exception); ASSERT_THROW(ie.register_plugins("nonExistPlugins.xml"), ov::Exception); } TEST(OVClassBasicTest, smoke_createNonExistingConfigThrows) { - ASSERT_THROW(ov::runtime::Core ie("nonExistPlugins.xml"), ov::Exception); + ASSERT_THROW(ov::Core ie("nonExistPlugins.xml"), ov::Exception); } #ifdef __linux__ @@ -137,7 +137,7 @@ TEST(OVClassBasicTest, smoke_createMockEngineConfigNoThrows) { std::string filename{"mock_engine_valid.xml"}; std::string content{""}; CommonTestUtils::createFile(filename, content); - ASSERT_NO_THROW(ov::runtime::Core ie(filename)); + ASSERT_NO_THROW(ov::Core ie(filename)); CommonTestUtils::removeFile(filename.c_str()); } @@ -145,7 +145,7 @@ TEST(OVClassBasicTest, smoke_createMockEngineConfigThrows) { std::string filename{"mock_engine.xml"}; std::string content{""}; CommonTestUtils::createFile(filename, content); - ASSERT_THROW(ov::runtime::Core ie(filename), ov::Exception); + ASSERT_THROW(ov::Core ie(filename), ov::Exception); CommonTestUtils::removeFile(filename.c_str()); } @@ -173,7 +173,7 @@ TEST_P(OVClassBasicTestP, smoke_registerPluginsXMLUnicodePath) { GTEST_COUT << "Test " << testIndex << std::endl; - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); GTEST_COUT << "Core created " << testIndex << std::endl; ASSERT_NO_THROW(ie.register_plugins(::ov::util::wstring_to_string(pluginsXmlW))); CommonTestUtils::removeFile(pluginsXmlW); @@ -205,17 +205,17 @@ TEST_P(OVClassBasicTestP, smoke_registerPluginsXMLUnicodePath) { // TEST_P(OVClassBasicTestP, getVersionsByExactDeviceNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_NO_THROW(ie.get_versions(deviceName + ".0")); } TEST_P(OVClassBasicTestP, getVersionsByDeviceClassNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_NO_THROW(ie.get_versions(deviceName)); } TEST_P(OVClassBasicTestP, getVersionsNonEmpty) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_EQ(2, ie.get_versions(CommonTestUtils::DEVICE_HETERO + std::string(":") + deviceName).size()); } @@ -224,7 +224,7 @@ TEST_P(OVClassBasicTestP, getVersionsNonEmpty) { // TEST_P(OVClassBasicTestP, unregisterExistingPluginNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); // device instance is not created yet ASSERT_THROW(ie.unload_plugin(deviceName), ov::Exception); @@ -235,7 +235,7 @@ TEST_P(OVClassBasicTestP, unregisterExistingPluginNoThrow) { } TEST_P(OVClassBasicTestP, accessToUnregisteredPluginThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_THROW(ie.unload_plugin(deviceName), ov::Exception); ASSERT_NO_THROW(ie.get_versions(deviceName)); ASSERT_NO_THROW(ie.unload_plugin(deviceName)); @@ -245,7 +245,7 @@ TEST_P(OVClassBasicTestP, accessToUnregisteredPluginThrows) { } TEST(OVClassBasicTest, smoke_unregisterNonExistingPluginThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_THROW(ie.unload_plugin("unkown_device"), ov::Exception); } @@ -254,41 +254,41 @@ TEST(OVClassBasicTest, smoke_unregisterNonExistingPluginThrows) { // TEST_P(OVClassBasicTestP, SetConfigAllThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_NO_THROW(ie.set_config({{"unsupported_key", "4"}})); ASSERT_ANY_THROW(ie.get_versions(deviceName)); } TEST_P(OVClassBasicTestP, SetConfigForUnRegisteredDeviceThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_THROW(ie.set_config({{"unsupported_key", "4"}}, "unregistered_device"), ov::Exception); } TEST_P(OVClassBasicTestP, SetConfigNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_NO_THROW(ie.set_config({{InferenceEngine::PluginConfigParams::KEY_PERF_COUNT, InferenceEngine::PluginConfigParams::YES}}, deviceName)); } TEST_P(OVClassBasicTestP, SetConfigAllNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_NO_THROW(ie.set_config({{InferenceEngine::PluginConfigParams::KEY_PERF_COUNT, InferenceEngine::PluginConfigParams::YES}})); ASSERT_NO_THROW(ie.get_versions(deviceName)); } TEST(OVClassBasicTest, smoke_SetConfigHeteroThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_NO_THROW(ie.set_config({{InferenceEngine::PluginConfigParams::KEY_PERF_COUNT, InferenceEngine::PluginConfigParams::YES}}, CommonTestUtils::DEVICE_HETERO)); } TEST_P(OVClassBasicTestP, SetConfigHeteroTargetFallbackThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_NO_THROW(ie.set_config({{"TARGET_FALLBACK", deviceName}}, CommonTestUtils::DEVICE_HETERO)); } TEST(OVClassBasicTest, smoke_SetConfigHeteroNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); bool value = false; ASSERT_NO_THROW(ie.set_config({{HETERO_CONFIG_KEY(DUMP_GRAPH_DOT), InferenceEngine::PluginConfigParams::YES}}, @@ -303,7 +303,7 @@ TEST(OVClassBasicTest, smoke_SetConfigHeteroNoThrow) { } TEST_P(OVClassSpecificDeviceTestSetConfig, SetConfigSpecificDeviceNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); std::string deviceID, clearDeviceName; auto pos = deviceName.find('.'); @@ -330,12 +330,12 @@ TEST_P(OVClassSpecificDeviceTestSetConfig, SetConfigSpecificDeviceNoThrow) { // TEST_P(OVClassNetworkTestP, QueryNetworkActualThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_NO_THROW(ie.query_model(actualNetwork, CommonTestUtils::DEVICE_HETERO + std::string(":") + deviceName)); } TEST_P(OVClassNetworkTestP, QueryNetworkActualNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); try { ie.query_model(actualNetwork, deviceName); @@ -346,7 +346,7 @@ TEST_P(OVClassNetworkTestP, QueryNetworkActualNoThrow) { } TEST_P(OVClassNetworkTestP, QueryNetworkWithKSO) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); try { auto rl_map = ie.query_model(ksoNetwork, deviceName); @@ -363,7 +363,7 @@ TEST_P(OVClassNetworkTestP, QueryNetworkWithKSO) { } TEST_P(OVClassSeveralDevicesTestQueryNetwork, QueryNetworkActualSeveralDevicesNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); std::string clearDeviceName; auto pos = deviceNames.begin()->find('.'); @@ -388,7 +388,7 @@ TEST_P(OVClassSeveralDevicesTestQueryNetwork, QueryNetworkActualSeveralDevicesNo } TEST_P(OVClassNetworkTestP, SetAffinityWithConstantBranches) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); try { std::shared_ptr func; @@ -434,7 +434,7 @@ TEST_P(OVClassNetworkTestP, SetAffinityWithConstantBranches) { } TEST_P(OVClassNetworkTestP, SetAffinityWithKSO) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); try { auto rl_map = ie.query_model(ksoNetwork, deviceName); @@ -456,20 +456,20 @@ TEST_P(OVClassNetworkTestP, SetAffinityWithKSO) { } TEST_P(OVClassNetworkTestP, QueryNetworkHeteroActualNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); - ov::runtime::SupportedOpsMap res; + ov::Core ie = createCoreWithTemplate(); + ov::SupportedOpsMap res; ASSERT_NO_THROW( res = ie.query_model(actualNetwork, CommonTestUtils::DEVICE_HETERO, {{"TARGET_FALLBACK", deviceName}})); ASSERT_LT(0, res.size()); } TEST_P(OVClassNetworkTestP, QueryNetworkMultiThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_THROW(ie.query_model(actualNetwork, CommonTestUtils::DEVICE_MULTI), ov::Exception); } TEST(OVClassBasicTest, smoke_GetMetricSupportedMetricsHeteroNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; std::string deviceName = CommonTestUtils::DEVICE_HETERO; @@ -485,7 +485,7 @@ TEST(OVClassBasicTest, smoke_GetMetricSupportedMetricsHeteroNoThrow) { } TEST(OVClassBasicTest, smoke_GetMetricSupportedConfigKeysHeteroNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; std::string deviceName = CommonTestUtils::DEVICE_HETERO; @@ -501,14 +501,14 @@ TEST(OVClassBasicTest, smoke_GetMetricSupportedConfigKeysHeteroNoThrow) { } TEST(OVClassBasicTest, smoke_GetMetricSupportedConfigKeysHeteroThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); // TODO: check std::string targetDevice = CommonTestUtils::DEVICE_HETERO + std::string(":") + CommonTestUtils::DEVICE_CPU; ASSERT_THROW(ie.get_metric(targetDevice, METRIC_KEY(SUPPORTED_CONFIG_KEYS)), ov::Exception); } TEST_P(OVClassGetMetricTest_SUPPORTED_METRICS, GetMetricAndPrintNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_NO_THROW(p = ie.get_metric(deviceName, METRIC_KEY(SUPPORTED_METRICS))); @@ -523,7 +523,7 @@ TEST_P(OVClassGetMetricTest_SUPPORTED_METRICS, GetMetricAndPrintNoThrow) { } TEST_P(OVClassGetMetricTest_SUPPORTED_CONFIG_KEYS, GetMetricAndPrintNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_NO_THROW(p = ie.get_metric(deviceName, METRIC_KEY(SUPPORTED_CONFIG_KEYS))); @@ -538,7 +538,7 @@ TEST_P(OVClassGetMetricTest_SUPPORTED_CONFIG_KEYS, GetMetricAndPrintNoThrow) { } TEST_P(OVClassGetMetricTest_AVAILABLE_DEVICES, GetMetricAndPrintNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_NO_THROW(p = ie.get_metric(deviceName, METRIC_KEY(AVAILABLE_DEVICES))); @@ -553,7 +553,7 @@ TEST_P(OVClassGetMetricTest_AVAILABLE_DEVICES, GetMetricAndPrintNoThrow) { } TEST_P(OVClassGetMetricTest_FULL_DEVICE_NAME, GetMetricAndPrintNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_NO_THROW(p = ie.get_metric(deviceName, METRIC_KEY(FULL_DEVICE_NAME))); @@ -564,7 +564,7 @@ TEST_P(OVClassGetMetricTest_FULL_DEVICE_NAME, GetMetricAndPrintNoThrow) { } TEST_P(OVClassGetMetricTest_OPTIMIZATION_CAPABILITIES, GetMetricAndPrintNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_NO_THROW(p = ie.get_metric(deviceName, METRIC_KEY(OPTIMIZATION_CAPABILITIES))); @@ -579,7 +579,7 @@ TEST_P(OVClassGetMetricTest_OPTIMIZATION_CAPABILITIES, GetMetricAndPrintNoThrow) } TEST_P(OVClassGetMetricTest_DEVICE_GOPS, GetMetricAndPrintNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_NO_THROW(p = ie.get_metric(deviceName, METRIC_KEY(DEVICE_GOPS))); @@ -594,7 +594,7 @@ TEST_P(OVClassGetMetricTest_DEVICE_GOPS, GetMetricAndPrintNoThrow) { } TEST_P(OVClassGetMetricTest_DEVICE_TYPE, GetMetricAndPrintNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_NO_THROW(p = ie.get_metric(deviceName, METRIC_KEY(DEVICE_TYPE))); @@ -606,7 +606,7 @@ TEST_P(OVClassGetMetricTest_DEVICE_TYPE, GetMetricAndPrintNoThrow) { } TEST_P(OVClassGetMetricTest_NUMBER_OF_WAITING_INFER_REQUESTS, GetMetricAndPrintNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_NO_THROW(p = ie.get_metric(deviceName, METRIC_KEY(NUMBER_OF_WAITING_INFER_REQUESTS))); @@ -618,7 +618,7 @@ TEST_P(OVClassGetMetricTest_NUMBER_OF_WAITING_INFER_REQUESTS, GetMetricAndPrintN } TEST_P(OVClassGetMetricTest_NUMBER_OF_EXEC_INFER_REQUESTS, GetMetricAndPrintNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_NO_THROW(p = ie.get_metric(deviceName, METRIC_KEY(NUMBER_OF_EXEC_INFER_REQUESTS))); @@ -630,7 +630,7 @@ TEST_P(OVClassGetMetricTest_NUMBER_OF_EXEC_INFER_REQUESTS, GetMetricAndPrintNoTh } TEST_P(OVClassGetMetricTest_RANGE_FOR_ASYNC_INFER_REQUESTS, GetMetricAndPrintNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_NO_THROW(p = ie.get_metric(deviceName, METRIC_KEY(RANGE_FOR_ASYNC_INFER_REQUESTS))); @@ -652,7 +652,7 @@ TEST_P(OVClassGetMetricTest_RANGE_FOR_ASYNC_INFER_REQUESTS, GetMetricAndPrintNoT } TEST_P(OVClassGetMetricTest_RANGE_FOR_STREAMS, GetMetricAndPrintNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_NO_THROW(p = ie.get_metric(deviceName, METRIC_KEY(RANGE_FOR_STREAMS))); @@ -671,14 +671,14 @@ TEST_P(OVClassGetMetricTest_RANGE_FOR_STREAMS, GetMetricAndPrintNoThrow) { } TEST_P(OVClassGetMetricTest_ThrowUnsupported, GetMetricThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_THROW(p = ie.get_metric(deviceName, "unsupported_metric"), ov::Exception); } TEST_P(OVClassGetConfigTest, GetConfigNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_NO_THROW(p = ie.get_metric(deviceName, METRIC_KEY(SUPPORTED_CONFIG_KEYS))); @@ -692,7 +692,7 @@ TEST_P(OVClassGetConfigTest, GetConfigNoThrow) { } TEST_P(OVClassGetConfigTest, GetConfigHeteroNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_NO_THROW(p = ie.get_metric(deviceName, METRIC_KEY(SUPPORTED_CONFIG_KEYS))); @@ -704,14 +704,14 @@ TEST_P(OVClassGetConfigTest, GetConfigHeteroNoThrow) { } TEST_P(OVClassGetConfigTest_ThrowUnsupported, GetConfigHeteroThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_THROW(p = ie.get_config(CommonTestUtils::DEVICE_HETERO, "unsupported_config"), ov::Exception); } TEST_P(OVClassGetConfigTest_ThrowUnsupported, GetConfigHeteroWithDeviceThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_THROW(p = ie.get_config(CommonTestUtils::DEVICE_HETERO + std::string(":") + deviceName, @@ -720,14 +720,14 @@ TEST_P(OVClassGetConfigTest_ThrowUnsupported, GetConfigHeteroWithDeviceThrow) { } TEST_P(OVClassGetConfigTest_ThrowUnsupported, GetConfigThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; ASSERT_THROW(p = ie.get_config(deviceName, "unsupported_config"), ov::Exception); } TEST_P(OVClassSpecificDeviceTestGetConfig, GetConfigSpecificDeviceNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ov::Any p; std::string deviceID, clearDeviceName; @@ -755,7 +755,7 @@ TEST_P(OVClassSpecificDeviceTestGetConfig, GetConfigSpecificDeviceNoThrow) { } TEST_P(OVClassGetAvailableDevices, GetAvailableDevicesNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); std::vector devices; ASSERT_NO_THROW(devices = ie.get_available_devices()); @@ -779,7 +779,7 @@ TEST_P(OVClassGetAvailableDevices, GetAvailableDevicesNoThrow) { // TEST_P(OVClassQueryNetworkTest, QueryNetworkHETEROWithDeviceIDNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); if (supportsDeviceID(ie, deviceName)) { auto deviceIDs = ie.get_metric(deviceName, METRIC_KEY(AVAILABLE_DEVICES)).as>(); @@ -794,7 +794,7 @@ TEST_P(OVClassQueryNetworkTest, QueryNetworkHETEROWithDeviceIDNoThrow) { } TEST_P(OVClassQueryNetworkTest, QueryNetworkWithDeviceID) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); if (supportsDeviceID(ie, deviceName)) { try { @@ -809,7 +809,7 @@ TEST_P(OVClassQueryNetworkTest, QueryNetworkWithDeviceID) { } TEST_P(OVClassQueryNetworkTest, QueryNetworkWithBigDeviceIDThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); if (supportsDeviceID(ie, deviceName)) { ASSERT_THROW(ie.query_model(actualNetwork, deviceName + ".110"), ov::Exception); @@ -819,7 +819,7 @@ TEST_P(OVClassQueryNetworkTest, QueryNetworkWithBigDeviceIDThrows) { } TEST_P(OVClassQueryNetworkTest, QueryNetworkWithInvalidDeviceIDThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); if (supportsDeviceID(ie, deviceName)) { ASSERT_THROW(ie.query_model(actualNetwork, deviceName + ".l0"), ov::Exception); @@ -829,7 +829,7 @@ TEST_P(OVClassQueryNetworkTest, QueryNetworkWithInvalidDeviceIDThrows) { } TEST_P(OVClassQueryNetworkTest, QueryNetworkHETEROWithBigDeviceIDThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); if (supportsDeviceID(ie, deviceName)) { ASSERT_THROW(ie.query_model(actualNetwork, @@ -848,17 +848,17 @@ using OVClassNetworkTestP = OVClassBaseTestP; // TEST_P(OVClassNetworkTestP, LoadNetworkActualNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_NO_THROW(ie.compile_model(actualNetwork, deviceName)); } TEST_P(OVClassNetworkTestP, LoadNetworkActualHeteroDeviceNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_NO_THROW(ie.compile_model(actualNetwork, CommonTestUtils::DEVICE_HETERO + std::string(":") + deviceName)); } TEST_P(OVClassNetworkTestP, LoadNetworkActualHeteroDevice2NoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); ASSERT_NO_THROW(ie.compile_model(actualNetwork, CommonTestUtils::DEVICE_HETERO, {{"TARGET_FALLBACK", deviceName}})); } @@ -892,7 +892,7 @@ TEST_P(OVClassNetworkTestP, LoadNetworkCreateDefaultExecGraphResult) { } TEST_P(OVClassSeveralDevicesTestLoadNetwork, LoadNetworkActualSeveralDevicesNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); std::string clearDeviceName; auto pos = deviceNames.begin()->find('.'); @@ -920,7 +920,7 @@ TEST_P(OVClassSeveralDevicesTestLoadNetwork, LoadNetworkActualSeveralDevicesNoTh // LoadNetwork with HETERO on particular device // TEST_P(OVClassLoadNetworkTest, LoadNetworkHETEROWithDeviceIDNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); if (supportsDeviceID(ie, deviceName)) { auto deviceIDs = ie.get_metric(deviceName, METRIC_KEY(AVAILABLE_DEVICES)).as>(); @@ -935,7 +935,7 @@ TEST_P(OVClassLoadNetworkTest, LoadNetworkHETEROWithDeviceIDNoThrow) { } TEST_P(OVClassLoadNetworkTest, LoadNetworkWithDeviceIDNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); if (supportsDeviceID(ie, deviceName)) { auto deviceIDs = ie.get_metric(deviceName, METRIC_KEY(AVAILABLE_DEVICES)).as>(); @@ -948,7 +948,7 @@ TEST_P(OVClassLoadNetworkTest, LoadNetworkWithDeviceIDNoThrow) { } TEST_P(OVClassLoadNetworkTest, LoadNetworkWithBigDeviceIDThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); if (supportsDeviceID(ie, deviceName)) { ASSERT_THROW(ie.compile_model(actualNetwork, deviceName + ".10"), ov::Exception); @@ -958,7 +958,7 @@ TEST_P(OVClassLoadNetworkTest, LoadNetworkWithBigDeviceIDThrows) { } TEST_P(OVClassLoadNetworkTest, LoadNetworkWithInvalidDeviceIDThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); if (supportsDeviceID(ie, deviceName)) { ASSERT_THROW(ie.compile_model(actualNetwork, deviceName + ".l0"), ov::Exception); @@ -968,7 +968,7 @@ TEST_P(OVClassLoadNetworkTest, LoadNetworkWithInvalidDeviceIDThrows) { } TEST_P(OVClassLoadNetworkTest, LoadNetworkHETEROWithBigDeviceIDThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); if (supportsDeviceID(ie, deviceName)) { ASSERT_THROW(ie.compile_model(actualNetwork, @@ -981,7 +981,7 @@ TEST_P(OVClassLoadNetworkTest, LoadNetworkHETEROWithBigDeviceIDThrows) { } TEST_P(OVClassLoadNetworkTest, LoadNetworkHETEROAndDeviceIDThrows) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); if (supportsDeviceID(ie, deviceName)) { ASSERT_THROW(ie.compile_model(actualNetwork, @@ -999,7 +999,7 @@ TEST_P(OVClassLoadNetworkTest, LoadNetworkHETEROAndDeviceIDThrows) { // TEST_P(OVClassLoadNetworkTest, LoadNetworkHETEROwithMULTINoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); if (supportsDeviceID(ie, deviceName) && supportsAvaliableDevices(ie, deviceName)) { std::string devices; auto availableDevices = ie.get_metric(deviceName, METRIC_KEY(AVAILABLE_DEVICES)).as>(); @@ -1020,7 +1020,7 @@ TEST_P(OVClassLoadNetworkTest, LoadNetworkHETEROwithMULTINoThrow) { } TEST_P(OVClassLoadNetworkTest, LoadNetworkMULTIwithHETERONoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); if (supportsDeviceID(ie, deviceName) && supportsAvaliableDevices(ie, deviceName)) { std::string devices; @@ -1045,7 +1045,7 @@ TEST_P(OVClassLoadNetworkTest, LoadNetworkMULTIwithHETERONoThrow) { // TEST_P(OVClassLoadNetworkTest, QueryNetworkHETEROWithMULTINoThrow_V10) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); if (supportsDeviceID(ie, deviceName) && supportsAvaliableDevices(ie, deviceName)) { std::string devices; @@ -1062,7 +1062,7 @@ TEST_P(OVClassLoadNetworkTest, QueryNetworkHETEROWithMULTINoThrow_V10) { for (auto&& node : function->get_ops()) { expectedLayers.emplace(node->get_friendly_name()); } - ov::runtime::SupportedOpsMap result; + ov::SupportedOpsMap result; std::string targetFallback(CommonTestUtils::DEVICE_MULTI + std::string(",") + deviceName); ASSERT_NO_THROW(result = ie.query_model( multinputNetwork, @@ -1080,7 +1080,7 @@ TEST_P(OVClassLoadNetworkTest, QueryNetworkHETEROWithMULTINoThrow_V10) { } TEST_P(OVClassLoadNetworkTest, QueryNetworkMULTIWithHETERONoThrow_V10) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); if (supportsDeviceID(ie, deviceName) && supportsAvaliableDevices(ie, deviceName)) { std::string devices; @@ -1097,7 +1097,7 @@ TEST_P(OVClassLoadNetworkTest, QueryNetworkMULTIWithHETERONoThrow_V10) { for (auto&& node : function->get_ops()) { expectedLayers.emplace(node->get_friendly_name()); } - ov::runtime::SupportedOpsMap result; + ov::SupportedOpsMap result; ASSERT_NO_THROW(result = ie.query_model(multinputNetwork, CommonTestUtils::DEVICE_MULTI, {{MULTI_CONFIG_KEY(DEVICE_PRIORITIES), devices}, @@ -1115,7 +1115,7 @@ TEST_P(OVClassLoadNetworkTest, QueryNetworkMULTIWithHETERONoThrow_V10) { // TODO: Enable this test with pre-processing TEST_P(OVClassLoadNetworkAfterCoreRecreateTest, LoadAfterRecreateCoresAndPlugins) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); { auto versions = ie.get_versions(std::string(CommonTestUtils::DEVICE_MULTI) + ":" + deviceName + "," + CommonTestUtils::DEVICE_CPU); @@ -1126,7 +1126,7 @@ TEST_P(OVClassLoadNetworkAfterCoreRecreateTest, LoadAfterRecreateCoresAndPlugins config.insert({"CPU_THREADS_NUM", "3"}); } // ASSERT_NO_THROW({ - // ov::runtime::Core ie = createCoreWithTemplate(); + // ov::Core ie = createCoreWithTemplate(); // std::string name = actualNetwork.getInputsInfo().begin()->first; // actualNetwork.getInputsInfo().at(name)->setPrecision(Precision::U8); // auto executableNetwork = ie.compile_model(actualNetwork, deviceName, config); @@ -1134,7 +1134,7 @@ TEST_P(OVClassLoadNetworkAfterCoreRecreateTest, LoadAfterRecreateCoresAndPlugins }; TEST_P(OVClassSetDefaultDeviceIDTest, SetDefaultDeviceIDNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); std::vector deviceIDs = ie.get_metric(deviceName, METRIC_KEY(AVAILABLE_DEVICES)); if (std::find(deviceIDs.begin(), deviceIDs.end(), deviceID) == deviceIDs.end()) { @@ -1149,7 +1149,7 @@ TEST_P(OVClassSetDefaultDeviceIDTest, SetDefaultDeviceIDNoThrow) { } TEST_P(OVClassSetGlobalConfigTest, SetGlobalConfigNoThrow) { - ov::runtime::Core ie = createCoreWithTemplate(); + ov::Core ie = createCoreWithTemplate(); std::vector deviceIDs = ie.get_metric(deviceName, METRIC_KEY(AVAILABLE_DEVICES)); ov::Any ref, src; @@ -1167,7 +1167,7 @@ TEST_P(OVClassSetGlobalConfigTest, SetGlobalConfigNoThrow) { } TEST_P(OVClassSeveralDevicesTestDefaultCore, DefaultCoreSeveralDevicesNoThrow) { - ov::runtime::Core ie; + ov::Core ie; std::string clearDeviceName; auto pos = deviceNames.begin()->find('.'); diff --git a/src/tests/functional/plugin/shared/include/behavior/ov_plugin/remote.hpp b/src/tests/functional/plugin/shared/include/behavior/ov_plugin/remote.hpp index f93e150bdc6..ff4a3f03b0f 100644 --- a/src/tests/functional/plugin/shared/include/behavior/ov_plugin/remote.hpp +++ b/src/tests/functional/plugin/shared/include/behavior/ov_plugin/remote.hpp @@ -35,9 +35,9 @@ protected: runtime::ParamMap context_parameters; runtime::ParamMap tensor_parameters; std::shared_ptr function; - runtime::Core core = *ov::test::utils::PluginCache::get().core(); - runtime::CompiledModel exec_network; - runtime::InferRequest infer_request; + ov::Core core = *ov::test::utils::PluginCache::get().core(); + ov::CompiledModel exec_network; + ov::InferRequest infer_request; std::shared_ptr input; }; } // namespace test diff --git a/src/tests/functional/plugin/shared/include/single_layer_tests/op_impl_check/op_impl_check.hpp b/src/tests/functional/plugin/shared/include/single_layer_tests/op_impl_check/op_impl_check.hpp index 0c6449736ac..4c912c57112 100644 --- a/src/tests/functional/plugin/shared/include/single_layer_tests/op_impl_check/op_impl_check.hpp +++ b/src/tests/functional/plugin/shared/include/single_layer_tests/op_impl_check/op_impl_check.hpp @@ -25,7 +25,7 @@ class OpImplCheckTest : public testing::WithParamInterface, public CommonTestUtils::TestsCommon { protected: LayerTestsUtils::Summary& summary = LayerTestsUtils::Summary::getInstance(); - std::shared_ptr core = ov::test::utils::PluginCache::get().core(); + std::shared_ptr core = ov::test::utils::PluginCache::get().core(); std::shared_ptr function; std::string targetDevice; std::map configuration; diff --git a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/batched_tensors.cpp b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/batched_tensors.cpp index c9e23da25ce..e1234aa8f7d 100644 --- a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/batched_tensors.cpp +++ b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/batched_tensors.cpp @@ -76,13 +76,13 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensorsBase) { std::vector buffer(one_shape_size * batch * 2, 0); auto execNet = ie->compile_model(model, targetDevice); // Create InferRequest - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors; - auto exp_tensor = ov::runtime::Tensor(element::f32, batch_shape); + std::vector tensors; + auto exp_tensor = ov::Tensor(element::f32, batch_shape); for (auto i = 0; i < batch; ++i) { // non contiguous memory (i*2) - auto tensor = runtime::Tensor(element::f32, one_shape, &buffer[(i * 2) * one_shape_size]); + auto tensor = ov::Tensor(element::f32, one_shape, &buffer[(i * 2) * one_shape_size]); tensors.push_back(std::move(tensor)); } req.set_tensors("tensor_input0", tensors); @@ -110,13 +110,13 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensorsAsync) { std::vector buffer(one_shape_size * batch * 2, 0); auto execNet = ie->compile_model(model, targetDevice); // Create InferRequest - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors; - auto exp_tensor = ov::runtime::Tensor(element::f32, batch_shape); + std::vector tensors; + auto exp_tensor = ov::Tensor(element::f32, batch_shape); for (auto i = 0; i < batch; ++i) { // non contiguous memory (i*2) - auto tensor = runtime::Tensor(element::f32, one_shape, &buffer[(i * 2) * one_shape_size]); + auto tensor = ov::Tensor(element::f32, one_shape, &buffer[(i * 2) * one_shape_size]); tensors.push_back(std::move(tensor)); } req.set_tensors("tensor_input0", tensors); @@ -145,15 +145,15 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_override_with_set) { std::vector buffer2(one_shape_size * batch, 5); auto execNet = ie->compile_model(model, targetDevice); // Create InferRequest - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors; - auto exp_tensor = ov::runtime::Tensor(element::f32, batch_shape); + std::vector tensors; + auto exp_tensor = ov::Tensor(element::f32, batch_shape); for (auto i = 0; i < batch; ++i) { - auto tensor = runtime::Tensor(element::f32, one_shape, &buffer[i * one_shape_size]); + auto tensor = ov::Tensor(element::f32, one_shape, &buffer[i * one_shape_size]); tensors.push_back(std::move(tensor)); } - auto plain_tensor = runtime::Tensor(element::f32, batch_shape, &buffer2[0]); + auto plain_tensor = ov::Tensor(element::f32, batch_shape, &buffer2[0]); req.set_tensors("tensor_input0", tensors); req.set_tensor("tensor_input0", plain_tensor); auto actual_tensor = req.get_tensor("tensor_output0"); @@ -185,12 +185,12 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensorsBase_Caching) { std::vector buffer(one_shape_size * batch * 2, 0); // Create InferRequest - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet_cache.create_infer_request(); - std::vector tensors; + std::vector tensors; for (auto i = 0; i < batch; ++i) { // non contiguous memory (i*2) - auto tensor = runtime::Tensor(element::f32, one_shape, &buffer[(i * 2) * one_shape_size]); + auto tensor = ov::Tensor(element::f32, one_shape, &buffer[(i * 2) * one_shape_size]); tensors.push_back(std::move(tensor)); } req.set_input_tensors(tensors); @@ -221,12 +221,12 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_Multiple_Infer) { std::vector buffer(one_shape_size * batch * 2, 0); auto execNet = ie->compile_model(model, targetDevice); // Create InferRequest - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors; + std::vector tensors; for (auto i = 0; i < batch; ++i) { // non contiguous memory (i*2) - auto tensor = runtime::Tensor(element::f32, one_shape, &buffer[(i * 2) * one_shape_size]); + auto tensor = ov::Tensor(element::f32, one_shape, &buffer[(i * 2) * one_shape_size]); tensors.push_back(std::move(tensor)); } req.set_tensors("tensor_input0", tensors); @@ -258,12 +258,12 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_Can_Infer_Dynamic) { std::vector buffer(one_shape_size * batch * 2, 0); auto execNet = ie->compile_model(model, targetDevice); // Create InferRequest - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors; + std::vector tensors; for (size_t i = 0; i < batch; ++i) { // non contiguous memory (i*2) - auto tensor = runtime::Tensor(element::f32, one_shape, &buffer[(i * 2) * one_shape_size]); + auto tensor = ov::Tensor(element::f32, one_shape, &buffer[(i * 2) * one_shape_size]); tensors.push_back(std::move(tensor)); } req.set_tensors("tensor_input0", tensors); @@ -294,12 +294,12 @@ TEST_P(OVInferRequestBatchedTests, SetTensors_Batch1) { auto model = OVInferRequestBatchedTests::create_n_inputs(1, element::f32, one_shape, "N..."); auto execNet = ie->compile_model(model, targetDevice); // Create InferRequest - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors; - auto exp_tensor = ov::runtime::Tensor(element::f32, one_shape); + std::vector tensors; + auto exp_tensor = ov::Tensor(element::f32, one_shape); auto* exp = exp_tensor.data(); - auto tensor = runtime::Tensor(element::f32, one_shape); + auto tensor = ov::Tensor(element::f32, one_shape); auto* f = tensor.data(); for (size_t j = 0; j < one_shape_size; ++j) { f[j] = static_cast(j); @@ -324,9 +324,9 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_Batch_Incorrect) { auto model = OVInferRequestBatchedTests::create_n_inputs(1, element::f32, batch_shape, "DCHWN"); const std::string tensor_name = "tensor_input0"; auto execNet = ie->compile_model(model, targetDevice); - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors(batch, runtime::Tensor(element::f32, one_shape)); + std::vector tensors(batch, ov::Tensor(element::f32, one_shape)); ASSERT_THROW(req.set_tensors(tensor_name, tensors), ov::Exception); } @@ -337,9 +337,9 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_Get_Tensor_Not_Allowed) { auto model = OVInferRequestBatchedTests::create_n_inputs(1, element::f32, batch_shape, "NCHW"); const std::string tensor_name = "tensor_input0"; auto execNet = ie->compile_model(model, targetDevice); - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors(batch, runtime::Tensor(element::f32, one_shape)); + std::vector tensors(batch, ov::Tensor(element::f32, one_shape)); req.set_tensors(tensor_name, tensors); ASSERT_THROW(req.get_tensor(tensor_name), ov::Exception); } @@ -351,9 +351,9 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_Batch_No_Batch) { auto model = OVInferRequestBatchedTests::create_n_inputs(1, element::f32, batch_shape, "DCHW"); const std::string tensor_name = "tensor_input0"; auto execNet = ie->compile_model(model, targetDevice); - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors(batch, runtime::Tensor(element::f32, one_shape)); + std::vector tensors(batch, ov::Tensor(element::f32, one_shape)); ASSERT_THROW(req.set_tensors(tensor_name, tensors), ov::Exception); } @@ -364,9 +364,9 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_No_Name) { auto model = OVInferRequestBatchedTests::create_n_inputs(1, element::f32, batch_shape, "NCHW"); const std::string tensor_name = "undefined"; auto execNet = ie->compile_model(model, targetDevice); - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors(batch, runtime::Tensor(element::f32, one_shape)); + std::vector tensors(batch, ov::Tensor(element::f32, one_shape)); ASSERT_THROW(req.set_tensors(tensor_name, tensors), ov::Exception); } @@ -377,9 +377,9 @@ TEST_P(OVInferRequestBatchedTests, SetTensors_No_Name) { auto model = OVInferRequestBatchedTests::create_n_inputs(1, element::f32, batch_shape, "NCHW"); const std::string tensor_name = "undefined"; auto execNet = ie->compile_model(model, targetDevice); - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors(batch, runtime::Tensor(element::f32, one_shape)); + std::vector tensors(batch, ov::Tensor(element::f32, one_shape)); ASSERT_THROW(req.set_tensors(tensor_name, tensors), ov::Exception); } @@ -390,9 +390,9 @@ TEST_P(OVInferRequestBatchedTests, SetTensors_Friendly_Name) { auto model = OVInferRequestBatchedTests::create_n_inputs(1, element::f32, batch_shape, "NCHW"); const std::string tensor_name = "input0"; auto execNet = ie->compile_model(model, targetDevice); - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors(batch, runtime::Tensor(element::f32, one_shape)); + std::vector tensors(batch, ov::Tensor(element::f32, one_shape)); ASSERT_THROW(req.set_tensors(tensor_name, tensors), ov::Exception); } @@ -402,9 +402,9 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_No_index) { auto batch_shape = Shape{batch, 3, 3, 3}; auto model = OVInferRequestBatchedTests::create_n_inputs(1, element::f32, batch_shape, "NCHW"); auto execNet = ie->compile_model(model, targetDevice); - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors(batch, runtime::Tensor(element::f32, one_shape)); + std::vector tensors(batch, ov::Tensor(element::f32, one_shape)); ASSERT_THROW(req.set_input_tensors(10, tensors), ov::Exception); } @@ -414,9 +414,9 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_no_name_multiple_inputs) { auto batch_shape = Shape{batch, 3, 3, 3}; auto model = OVInferRequestBatchedTests::create_n_inputs(2, element::f32, batch_shape, "NCHW"); auto execNet = ie->compile_model(model, targetDevice); - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors(batch, runtime::Tensor(element::f32, one_shape)); + std::vector tensors(batch, ov::Tensor(element::f32, one_shape)); ASSERT_THROW(req.set_input_tensors(tensors), ov::Exception); } @@ -427,9 +427,9 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_Incorrect_count) { auto model = OVInferRequestBatchedTests::create_n_inputs(1, element::f32, batch_shape, "NCHW"); const std::string tensor_name = "tensor_input0"; auto execNet = ie->compile_model(model, targetDevice); - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors(batch + 1, runtime::Tensor(element::f32, one_shape)); + std::vector tensors(batch + 1, ov::Tensor(element::f32, one_shape)); ASSERT_THROW(req.set_tensors(tensor_name, tensors), ov::Exception); } @@ -439,9 +439,9 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_Empty_Array) { auto model = OVInferRequestBatchedTests::create_n_inputs(1, element::f32, batch_shape, "NCHW"); const std::string tensor_name = "tensor_input0"; auto execNet = ie->compile_model(model, targetDevice); - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors; + std::vector tensors; ASSERT_THROW(req.set_tensors(tensor_name, tensors), ov::Exception); } @@ -450,9 +450,9 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_diff_batches) { auto model = OVInferRequestBatchedTests::create_n_inputs(1, element::f32, batch_shape, "NCHW"); const std::string tensor_name = "tensor_input0"; auto execNet = ie->compile_model(model, targetDevice); - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors; + std::vector tensors; tensors.emplace_back(element::f32, Shape{2, 3, 3, 3}); tensors.emplace_back(element::f32, Shape{1, 3, 3, 3}); // This expectation can be updated if non-equal sizes of tensors is supported in future @@ -465,9 +465,9 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_Correct_all) { std::vector buffer(ov::shape_size(batch_shape), 1); auto model = OVInferRequestBatchedTests::create_n_inputs(1, element::f32, batch_shape, "NCHW"); auto execNet = ie->compile_model(model, targetDevice); - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors; + std::vector tensors; tensors.emplace_back(element::f32, one_shape, buffer.data()); tensors.emplace_back(element::f32, one_shape, buffer.data() + ov::shape_size(one_shape)); ASSERT_NO_THROW(req.set_input_tensors(tensors)); @@ -483,15 +483,15 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_Cache_CheckDeepCopy) { ie->set_config({{CONFIG_KEY(CACHE_DIR), m_cache_dir}}); auto execNet_no_cache = ie->compile_model(model, targetDevice); auto execNet = ie->compile_model(model, targetDevice); - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); model->input(0).set_names({"updated_input0"}); // Change param name of original model model->get_parameters()[0]->set_layout("????"); model->output(0).set_names({"updated_output0"}); // Change result name of original model - std::vector tensors; + std::vector tensors; tensors.emplace_back(element::f32, one_shape, buffer.data()); tensors.emplace_back(element::f32, one_shape, buffer.data() + ov::shape_size(one_shape)); - auto out_tensor = ov::runtime::Tensor(element::f32, batch_shape, buffer_out.data()); + auto out_tensor = ov::Tensor(element::f32, batch_shape, buffer_out.data()); // Verify that infer request still has its own copy of input/output, user can use old names ASSERT_NO_THROW(req.set_tensors("tensor_input0", tensors)); ASSERT_NO_THROW(req.set_tensor("tensor_output0", out_tensor)); @@ -504,9 +504,9 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_Incorrect_tensor_element_type auto model = OVInferRequestBatchedTests::create_n_inputs(1, element::f32, batch_shape, "NCHW"); const std::string tensor_name = "tensor_input0"; auto execNet = ie->compile_model(model, targetDevice); - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors(batch - 1, runtime::Tensor(element::f32, one_shape)); + std::vector tensors(batch - 1, ov::Tensor(element::f32, one_shape)); tensors.emplace_back(element::u8, one_shape); ASSERT_THROW(req.set_tensors(tensor_name, tensors), ov::Exception); } @@ -518,9 +518,9 @@ TEST_P(OVInferRequestBatchedTests, SetInputTensors_Incorrect_tensor_shape) { auto model = OVInferRequestBatchedTests::create_n_inputs(1, element::f32, batch_shape, "NCHW"); const std::string tensor_name = "tensor_input0"; auto execNet = ie->compile_model(model, targetDevice); - ov::runtime::InferRequest req; + ov::InferRequest req; req = execNet.create_infer_request(); - std::vector tensors(batch - 1, runtime::Tensor(element::f32, one_shape)); + std::vector tensors(batch - 1, ov::Tensor(element::f32, one_shape)); tensors.emplace_back(element::f32, Shape{1, 4, 2, 8}); ASSERT_THROW(req.set_tensors(tensor_name, tensors), ov::Exception); } diff --git a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/callback.cpp b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/callback.cpp index 485eb520a32..acddd1365ab 100644 --- a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/callback.cpp +++ b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/callback.cpp @@ -16,7 +16,7 @@ std::string OVInferRequestCallbackTests::getTestCaseName(const testing::TestPara } TEST_P(OVInferRequestCallbackTests, canCallAsyncWithCompletionCallback) { - runtime::InferRequest req; + ov::InferRequest req; OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); bool is_called = false; OV_ASSERT_NO_THROW(req.set_callback([&] (std::exception_ptr exception_ptr) { @@ -30,7 +30,7 @@ TEST_P(OVInferRequestCallbackTests, canCallAsyncWithCompletionCallback) { } TEST_P(OVInferRequestCallbackTests, syncInferDoesNotCallCompletionCallback) { - runtime::InferRequest req; + ov::InferRequest req; OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); bool is_called = false; req.set_callback([&] (std::exception_ptr exception_ptr) { @@ -50,7 +50,7 @@ TEST_P(OVInferRequestCallbackTests, canStartSeveralAsyncInsideCompletionCallback }; TestUserData data; - runtime::InferRequest req; + ov::InferRequest req; OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); OV_ASSERT_NO_THROW(req.set_callback([&] (std::exception_ptr exception_ptr) { if (exception_ptr) { @@ -74,7 +74,7 @@ TEST_P(OVInferRequestCallbackTests, canStartSeveralAsyncInsideCompletionCallback } TEST_P(OVInferRequestCallbackTests, returnGeneralErrorIfCallbackThrowException) { - runtime::InferRequest req; + ov::InferRequest req; OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); OV_ASSERT_NO_THROW(req.set_callback([] (std::exception_ptr) { OPENVINO_UNREACHABLE("Throw"); @@ -88,7 +88,7 @@ TEST_P(OVInferRequestCallbackTests, ReturnResultNotReadyFromWaitInAsyncModeForTo // so increases chances for getting RESULT_NOT_READY OV_ASSERT_NO_THROW(execNet = core->compile_model( SubgraphTestsDefinitions::Basic_LSTM_S::GetNetwork(300, 38), targetDevice, configuration)); - runtime::InferRequest req; + ov::InferRequest req; OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); std::promise callbackTimeStamp; auto callbackTimeStampFuture = callbackTimeStamp.get_future(); @@ -114,7 +114,7 @@ TEST_P(OVInferRequestCallbackTests, ReturnResultNotReadyFromWaitInAsyncModeForTo } TEST_P(OVInferRequestCallbackTests, ImplDoesNotCopyCallback) { - runtime::InferRequest req; + ov::InferRequest req; OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); { auto somePtr = std::make_shared(42); diff --git a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/cancellation.cpp b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/cancellation.cpp index 6fd1bfab5b9..da29df8558a 100644 --- a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/cancellation.cpp +++ b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/cancellation.cpp @@ -16,25 +16,25 @@ std::string OVInferRequestCancellationTests::getTestCaseName(const testing::Test } TEST_P(OVInferRequestCancellationTests, canCancelAsyncRequest) { - runtime::InferRequest req; + ov::InferRequest req; OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); OV_ASSERT_NO_THROW(req.start_async()); OV_ASSERT_NO_THROW(req.cancel()); try { req.wait(); - } catch (const ov::runtime::Cancelled&) { + } catch (const ov::Cancelled&) { SUCCEED(); } } TEST_P(OVInferRequestCancellationTests, CanResetAfterCancelAsyncRequest) { - runtime::InferRequest req; + ov::InferRequest req; OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); OV_ASSERT_NO_THROW(req.start_async()); OV_ASSERT_NO_THROW(req.cancel()); try { req.wait(); - } catch (const ov::runtime::Cancelled&) { + } catch (const ov::Cancelled&) { SUCCEED(); } OV_ASSERT_NO_THROW(req.start_async()); @@ -42,13 +42,13 @@ TEST_P(OVInferRequestCancellationTests, CanResetAfterCancelAsyncRequest) { } TEST_P(OVInferRequestCancellationTests, canCancelBeforeAsyncRequest) { - runtime::InferRequest req; + ov::InferRequest req; OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); OV_ASSERT_NO_THROW(req.cancel()); } TEST_P(OVInferRequestCancellationTests, canCancelInferRequest) { - runtime::InferRequest req; + ov::InferRequest req; OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); auto infer = std::async(std::launch::async, [&req]{req.infer();}); while (!req.wait_for({})) { @@ -56,7 +56,7 @@ TEST_P(OVInferRequestCancellationTests, canCancelInferRequest) { OV_ASSERT_NO_THROW(req.cancel()); try { infer.get(); - } catch (const ov::runtime::Cancelled&) { + } catch (const ov::Cancelled&) { SUCCEED(); } } diff --git a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/infer_request_dynamic.cpp b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/infer_request_dynamic.cpp index dbd611cebfd..4c5e7164c7d 100644 --- a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/infer_request_dynamic.cpp +++ b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/infer_request_dynamic.cpp @@ -74,8 +74,8 @@ TEST_P(OVInferRequestDynamicTests, InferDynamicNetworkWithoutSetShape) { // Load ov::Model to target plugins auto execNet = ie->compile_model(function, targetDevice, configuration); // Create InferRequest - ov::runtime::InferRequest req; - ov::runtime::Tensor tensor; + ov::InferRequest req; + ov::Tensor tensor; OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); OV_ASSERT_NO_THROW(tensor = req.get_tensor(function->inputs().back().get_any_name())); } @@ -88,8 +88,8 @@ TEST_P(OVInferRequestDynamicTests, InferDynamicNetworkBoundWithoutSetShape) { // Load ov::Model to target plugins auto execNet = ie->compile_model(function, targetDevice, configuration); // Create InferRequest - ov::runtime::InferRequest req; - ov::runtime::Tensor tensor; + ov::InferRequest req; + ov::Tensor tensor; OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); OV_ASSERT_NO_THROW(tensor = req.get_tensor(function->inputs().back().get_any_name())); } @@ -105,8 +105,8 @@ TEST_P(OVInferRequestDynamicTests, InferDynamicNetworkWithGetTensor) { // Load ov::Model to target plugins auto execNet = ie->compile_model(function, targetDevice, configuration); // Create InferRequest - ov::runtime::InferRequest req; - ov::runtime::Tensor tensor, otensor; + ov::InferRequest req; + ov::Tensor tensor, otensor; const std::string outputname = function->outputs().back().get_any_name(); OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); //OV_ASSERT_NO_THROW(req.SetShape(tensor_name, {1, 4, 20, 20})); @@ -134,8 +134,8 @@ TEST_P(OVInferRequestDynamicTests, InferUpperBoundNetworkWithGetTensor) { // Load ov::Model to target plugins auto execNet = ie->compile_model(function, targetDevice, configuration); // Create InferRequest - ov::runtime::InferRequest req; - ov::runtime::Tensor tensor, otensor; + ov::InferRequest req; + ov::Tensor tensor, otensor; const std::string outputname = function->outputs().back().get_any_name(); OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); //OV_ASSERT_NO_THROW(req.SetShape(tensor_name, {1, 4, 20, 20})); @@ -161,8 +161,8 @@ TEST_P(OVInferRequestDynamicTests, InferFullyDynamicNetworkWithGetTensor) { // Load ov::Model to target plugins auto execNet = ie->compile_model(function, targetDevice, configuration); // Create InferRequest - ov::runtime::InferRequest req; - ov::runtime::Tensor tensor, otensor; + ov::InferRequest req; + ov::Tensor tensor, otensor; const std::string outputName = function->outputs().back().get_any_name(); OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); //OV_ASSERT_NO_THROW(req.SetShape(tensor_name, {1, 4, 20, 20})); @@ -189,8 +189,8 @@ TEST_P(OVInferRequestDynamicTests, InferOutOfRangeShapeNetworkWithGetTensorLower // Load ov::Model to target plugins auto execNet = ie->compile_model(function, targetDevice, configuration); // Create InferRequest - ov::runtime::InferRequest req; - ov::runtime::Tensor tensor; + ov::InferRequest req; + ov::Tensor tensor; OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); OV_ASSERT_NO_THROW(tensor = req.get_tensor(function->inputs().back().get_any_name())); OV_ASSERT_NO_THROW(tensor.set_shape({1, 4, 20, 20})); @@ -208,8 +208,8 @@ TEST_P(OVInferRequestDynamicTests, InferOutOfRangeShapeNetworkWithGetTensorUpper // Load ov::Model to target plugins auto execNet = ie->compile_model(function, targetDevice, configuration); // Create InferRequest - ov::runtime::InferRequest req; - ov::runtime::Tensor tensor; + ov::InferRequest req; + ov::Tensor tensor; OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); OV_ASSERT_NO_THROW(tensor = req.get_tensor(function->inputs().back().get_any_name())); OV_ASSERT_NO_THROW(tensor.set_shape({3, 4, 20, 20})); @@ -229,8 +229,8 @@ TEST_P(OVInferRequestDynamicTests, InferDynamicNetworkWithGetTensor2times) { // Load ov::Model to target plugins auto execNet = ie->compile_model(function, targetDevice, configuration); // Create InferRequest - ov::runtime::InferRequest req; - ov::runtime::Tensor tensor; + ov::InferRequest req; + ov::Tensor tensor; OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); OV_ASSERT_NO_THROW(tensor = req.get_tensor(function->inputs().back().get_any_name())); OV_ASSERT_NO_THROW(tensor.set_shape(refShape)); @@ -262,8 +262,8 @@ TEST_P(OVInferRequestDynamicTests, GetSameTensor2times) { // Load ov::Model to target plugins auto execNet = ie->compile_model(function, targetDevice, configuration); // Create InferRequest - ov::runtime::InferRequest req; - ov::runtime::Tensor tensor; + ov::InferRequest req; + ov::Tensor tensor; OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); OV_ASSERT_NO_THROW(tensor = req.get_tensor(function->inputs().back().get_any_name())); OV_ASSERT_NO_THROW(tensor.set_shape(refShape)); @@ -282,8 +282,8 @@ TEST_P(OVInferRequestDynamicTests, InferDynamicNetworkWithSetTensor) { // Load ov::Model to target plugins auto execNet = ie->compile_model(function, targetDevice, configuration); // Create InferRequest - ov::runtime::InferRequest req; - ov::runtime::Tensor tensor(ov::element::f32, refShape); + ov::InferRequest req; + ov::Tensor tensor(ov::element::f32, refShape); OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); OV_ASSERT_NO_THROW(req.set_tensor(function->inputs().back().get_any_name(), tensor)); ASSERT_EQ(tensor.get_shape(), refShape); @@ -305,8 +305,8 @@ TEST_P(OVInferRequestDynamicTests, InferFullyDynamicNetworkWithSetTensor) { // Load ov::Model to target plugins auto execNet = ie->compile_model(function, targetDevice, configuration); // Create InferRequest - ov::runtime::InferRequest req; - ov::runtime::Tensor tensor(ov::element::f32, refShape), otensor; + ov::InferRequest req; + ov::Tensor tensor(ov::element::f32, refShape), otensor; const std::string outputName = function->outputs().back().get_any_name(); OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); OV_ASSERT_NO_THROW(req.set_tensor(function->inputs().back().get_any_name(), tensor)); @@ -337,8 +337,8 @@ TEST_P(OVInferRequestDynamicTests, InferDynamicNetworkWithSetTensor2times) { // Load ov::Model to target plugins auto execNet = ie->compile_model(function, targetDevice, configuration); // Create InferRequest - ov::runtime::InferRequest req; - ov::runtime::Tensor tensor(ov::element::f32, refShape); + ov::InferRequest req; + ov::Tensor tensor(ov::element::f32, refShape); OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); OV_ASSERT_NO_THROW(req.set_tensor(function->inputs().back().get_any_name(), tensor)); @@ -349,7 +349,7 @@ TEST_P(OVInferRequestDynamicTests, InferDynamicNetworkWithSetTensor2times) { OV_ASSERT_NO_THROW(tensor = req.get_tensor(outputName)); ASSERT_EQ(tensor.get_shape(), refOutShape); - tensor = ov::runtime::Tensor(ov::element::f32, refShape2); + tensor = ov::Tensor(ov::element::f32, refShape2); OV_ASSERT_NO_THROW(req.set_tensor(function->inputs().back().get_any_name(), tensor)); ASSERT_EQ(tensor.get_shape(), refShape2); OV_ASSERT_NO_THROW(req.infer()); @@ -370,7 +370,7 @@ TEST_P(OVNotSupportRequestDynamicTests, InferDynamicNotSupported) { OV_ASSERT_NO_THROW(function->reshape(shapes)); const std::string outputName = function->outputs().back().get_any_name(); // Load ov::Function to target plugins - ov::runtime::CompiledModel execNet; + ov::CompiledModel execNet; ASSERT_THROW((execNet = ie->compile_model(function, targetDevice, configuration)), ov::Exception); } } // namespace behavior diff --git a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/inference_chaining.cpp b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/inference_chaining.cpp index 46247716122..955ee1b10c6 100644 --- a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/inference_chaining.cpp +++ b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/inference_chaining.cpp @@ -82,12 +82,12 @@ std::shared_ptr OVInferenceChaining::getThirdStaticFunction(const ov: } void OVInferenceChaining::Run() { - ov::runtime::CompiledModel execNet0, execNet1, execNet2; + ov::CompiledModel execNet0, execNet1, execNet2; OV_ASSERT_NO_THROW(execNet0 = core->compile_model(function0, targetDevice, configuration)); OV_ASSERT_NO_THROW(execNet1 = core->compile_model(function1, targetDevice, configuration)); OV_ASSERT_NO_THROW(execNet2 = core->compile_model(function2, targetDevice, configuration)); - ov::runtime::InferRequest r0, r1, r2; + ov::InferRequest r0, r1, r2; OV_ASSERT_NO_THROW(r0 = execNet0.create_infer_request()); OV_ASSERT_NO_THROW(r1 = execNet1.create_infer_request()); OV_ASSERT_NO_THROW(r2 = execNet2.create_infer_request()); @@ -100,10 +100,10 @@ void OVInferenceChaining::Run() { } // create input tensors - ov::runtime::Tensor t0 = tensor(std::vector{1.0f, 2.0f, 3.0f}); - ov::runtime::Tensor t1 = tensor(std::vector{4.0f, 5.0f, 6.0f}); - ov::runtime::Tensor t2 = tensor(std::vector{7.0f, 8.0f, 9.0f}); - ov::runtime::Tensor t3 = tensor(std::vector{2.0f, 3.0f, 2.0f}); + ov::Tensor t0 = tensor(std::vector{1.0f, 2.0f, 3.0f}); + ov::Tensor t1 = tensor(std::vector{4.0f, 5.0f, 6.0f}); + ov::Tensor t2 = tensor(std::vector{7.0f, 8.0f, 9.0f}); + ov::Tensor t3 = tensor(std::vector{2.0f, 3.0f, 2.0f}); OV_ASSERT_NO_THROW(r0.set_tensor("input_tensor_0", t0)); OV_ASSERT_NO_THROW(r0.set_tensor("input_tensor_1", t1)); diff --git a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/io_tensor.cpp b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/io_tensor.cpp index 1545aaacf3b..79028590ef3 100644 --- a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/io_tensor.cpp +++ b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/io_tensor.cpp @@ -37,7 +37,7 @@ void OVInferRequestIOTensorTest::TearDown() { } TEST_P(OVInferRequestIOTensorTest, Cancreate_infer_request) { - runtime::InferRequest req; + ov::InferRequest req; OV_ASSERT_NO_THROW(req = execNet.create_infer_request()); } @@ -53,7 +53,7 @@ TEST_P(OVInferRequestIOTensorTest, failToSetNullptrForOutput) { TEST_P(OVInferRequestIOTensorTest, getAfterSetInputDoNotChangeInput) { auto tensor = utils::create_and_fill_tensor(input.get_element_type(), input.get_shape()); OV_ASSERT_NO_THROW(req.set_tensor(input, tensor)); - runtime::Tensor actual_tensor; + ov::Tensor actual_tensor; OV_ASSERT_NO_THROW(actual_tensor = req.get_tensor(input)); ASSERT_TRUE(actual_tensor); @@ -104,14 +104,14 @@ TEST_P(OVInferRequestIOTensorTest, canInferWithoutSetAndGetInOutAsync) { } TEST_P(OVInferRequestIOTensorTest, secondCallGetInputDoNotReAllocateData) { - runtime::Tensor tensor1, tensor2; + ov::Tensor tensor1, tensor2; OV_ASSERT_NO_THROW(tensor1 = req.get_tensor(input)); OV_ASSERT_NO_THROW(tensor2 = req.get_tensor(input)); ASSERT_EQ(tensor1.data(), tensor2.data()); } TEST_P(OVInferRequestIOTensorTest, secondCallGetOutputDoNotReAllocateData) { - runtime::Tensor tensor1, tensor2; + ov::Tensor tensor1, tensor2; OV_ASSERT_NO_THROW(tensor1 = req.get_tensor(output)); OV_ASSERT_NO_THROW(tensor2 = req.get_tensor(output)); ASSERT_EQ(tensor1.data(), tensor2.data()); @@ -121,7 +121,7 @@ TEST_P(OVInferRequestIOTensorTest, secondCallGetInputAfterInferSync) { OV_ASSERT_NO_THROW(req.infer()); OV_ASSERT_NO_THROW(req.start_async()); OV_ASSERT_NO_THROW(req.wait()); - runtime::Tensor tensor1, tensor2; + ov::Tensor tensor1, tensor2; OV_ASSERT_NO_THROW(tensor1 = req.get_tensor(input)); OV_ASSERT_NO_THROW(tensor2 = req.get_tensor(input)); ASSERT_EQ(tensor1.data(), tensor2.data()); @@ -131,7 +131,7 @@ TEST_P(OVInferRequestIOTensorTest, secondCallGetOutputAfterInferSync) { OV_ASSERT_NO_THROW(req.infer()); OV_ASSERT_NO_THROW(req.start_async()); OV_ASSERT_NO_THROW(req.wait()); - runtime::Tensor tensor1, tensor2; + ov::Tensor tensor1, tensor2; OV_ASSERT_NO_THROW(tensor1 = req.get_tensor(output)); OV_ASSERT_NO_THROW(tensor2 = req.get_tensor(output)); ASSERT_EQ(tensor1.data(), tensor2.data()); @@ -140,7 +140,7 @@ TEST_P(OVInferRequestIOTensorTest, secondCallGetOutputAfterInferSync) { TEST_P(OVInferRequestIOTensorTest, canSetInputTensorForInferRequest) { auto input_tensor = utils::create_and_fill_tensor(input.get_element_type(), input.get_shape()); OV_ASSERT_NO_THROW(req.set_tensor(input, input_tensor)); - runtime::Tensor actual_tensor; + ov::Tensor actual_tensor; OV_ASSERT_NO_THROW(actual_tensor = req.get_tensor(input)); ASSERT_EQ(input_tensor.data(), actual_tensor.data()); } @@ -148,7 +148,7 @@ TEST_P(OVInferRequestIOTensorTest, canSetInputTensorForInferRequest) { TEST_P(OVInferRequestIOTensorTest, canSetOutputBlobForInferRequest) { auto output_tensor = utils::create_and_fill_tensor(output.get_element_type(), output.get_shape()); OV_ASSERT_NO_THROW(req.set_tensor(output, output_tensor)); - runtime::Tensor actual_tensor; + ov::Tensor actual_tensor; OV_ASSERT_NO_THROW(actual_tensor = req.get_tensor(output)); ASSERT_EQ(output_tensor.data(), actual_tensor.data()); } @@ -162,7 +162,7 @@ TEST_P(OVInferRequestIOTensorTest, canInferWithSetInOutBlobs) { } TEST_P(OVInferRequestIOTensorTest, canInferWithGetIn) { - runtime::Tensor input_tensor; + ov::Tensor input_tensor; OV_ASSERT_NO_THROW(input_tensor = req.get_tensor(input)); OV_ASSERT_NO_THROW(req.infer()); OV_ASSERT_NO_THROW(req.start_async()); @@ -171,7 +171,7 @@ TEST_P(OVInferRequestIOTensorTest, canInferWithGetIn) { } TEST_P(OVInferRequestIOTensorTest, canInferWithGetOut) { - runtime::Tensor output_tensor; + ov::Tensor output_tensor; OV_ASSERT_NO_THROW(output_tensor = req.get_tensor(output)); OV_ASSERT_NO_THROW(req.infer()); OV_ASSERT_NO_THROW(req.start_async()); diff --git a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/multithreading.cpp b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/multithreading.cpp index 27df544a3df..61c5d95ce84 100644 --- a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/multithreading.cpp +++ b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/multithreading.cpp @@ -15,7 +15,7 @@ std::string OVInferRequestMultithreadingTests::getTestCaseName(const testing::Te } TEST_P(OVInferRequestMultithreadingTests, canRun3SyncRequestsConsistentlyFromThreads) { - runtime::InferRequest req1, req2, req3; + ov::InferRequest req1, req2, req3; OV_ASSERT_NO_THROW(req1 = execNet.create_infer_request()); OV_ASSERT_NO_THROW(req2 = execNet.create_infer_request()); OV_ASSERT_NO_THROW(req3 = execNet.create_infer_request()); @@ -34,7 +34,7 @@ TEST_P(OVInferRequestMultithreadingTests, canRun3SyncRequestsConsistentlyFromThr } TEST_P(OVInferRequestMultithreadingTests, canRun3AsyncRequestsConsistentlyFromThreadsWithoutWait) { - runtime::InferRequest req1, req2, req3; + ov::InferRequest req1, req2, req3; OV_ASSERT_NO_THROW(req1 = execNet.create_infer_request()); OV_ASSERT_NO_THROW(req2 = execNet.create_infer_request()); OV_ASSERT_NO_THROW(req3 = execNet.create_infer_request()); @@ -57,7 +57,7 @@ TEST_P(OVInferRequestMultithreadingTests, canRun3AsyncRequestsConsistentlyFromTh } TEST_P(OVInferRequestMultithreadingTests, canRun3AsyncRequestsConsistentlyWithWait) { - runtime::InferRequest req1, req2, req3; + ov::InferRequest req1, req2, req3; OV_ASSERT_NO_THROW(req1 = execNet.create_infer_request()); OV_ASSERT_NO_THROW(req2 = execNet.create_infer_request()); OV_ASSERT_NO_THROW(req3 = execNet.create_infer_request()); @@ -73,7 +73,7 @@ TEST_P(OVInferRequestMultithreadingTests, canRun3AsyncRequestsConsistentlyWithWa } TEST_P(OVInferRequestMultithreadingTests, canRun3AsyncRequestsParallelWithWait) { - runtime::InferRequest req1, req2, req3; + ov::InferRequest req1, req2, req3; OV_ASSERT_NO_THROW(req1 = execNet.create_infer_request()); OV_ASSERT_NO_THROW(req2 = execNet.create_infer_request()); OV_ASSERT_NO_THROW(req3 = execNet.create_infer_request()); diff --git a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/wait.cpp b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/wait.cpp index 3d1628bff78..8be24cf4bdc 100644 --- a/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/wait.cpp +++ b/src/tests/functional/plugin/shared/src/behavior/ov_infer_request/wait.cpp @@ -30,7 +30,7 @@ void OVInferRequestWaitTests::TearDown() { } TEST_P(OVInferRequestWaitTests, CorrectOneAsyncInferWithGetInOutWithInfWait) { - runtime::Tensor tensor; + ov::Tensor tensor; OV_ASSERT_NO_THROW(tensor = req.get_tensor(input)); OV_ASSERT_NO_THROW(req.infer()); OV_ASSERT_NO_THROW(req.start_async()); @@ -40,7 +40,7 @@ TEST_P(OVInferRequestWaitTests, CorrectOneAsyncInferWithGetInOutWithInfWait) { // Plugin correct infer request with allocating input and result BlobMaps inside plugin TEST_P(OVInferRequestWaitTests, canstart_asyncInferWithGetInOutWithStatusOnlyWait) { - runtime::Tensor tensor; + ov::Tensor tensor; OV_ASSERT_NO_THROW(tensor = req.get_tensor(input)); OV_ASSERT_NO_THROW(req.infer()); OV_ASSERT_NO_THROW(req.start_async()); @@ -68,7 +68,7 @@ TEST_P(OVInferRequestWaitTests, throwExceptionOnSetTensorAfterAsyncInfer) { OV_ASSERT_NO_THROW(req.start_async()); OV_ASSERT_NO_THROW(try { req.set_tensor(input, output_tensor); - } catch (const ov::runtime::Busy&) {}); + } catch (const ov::Busy&) {}); OV_ASSERT_NO_THROW(req.wait_for({})); OV_ASSERT_NO_THROW(req.wait()); } @@ -77,7 +77,7 @@ TEST_P(OVInferRequestWaitTests, throwExceptionOnGetTensorAfterAsyncInfer) { OV_ASSERT_NO_THROW(req.start_async()); OV_ASSERT_NO_THROW(try { req.get_tensor(input); - } catch (const ov::runtime::Busy&) {}); + } catch (const ov::Busy&) {}); OV_ASSERT_NO_THROW(req.wait()); } diff --git a/src/tests/functional/plugin/shared/src/behavior/ov_plugin/life_time.cpp b/src/tests/functional/plugin/shared/src/behavior/ov_plugin/life_time.cpp index cdee29f0f60..6fceaee9a75 100644 --- a/src/tests/functional/plugin/shared/src/behavior/ov_plugin/life_time.cpp +++ b/src/tests/functional/plugin/shared/src/behavior/ov_plugin/life_time.cpp @@ -36,7 +36,7 @@ static void release_order_test(std::vector order, const std::string std::shared_ptr function) { ov::AnyVector objects; { - runtime::Core core = createCoreWithTemplate(); + ov::Core core = createCoreWithTemplate(); auto compiled_model = core.compile_model(function, deviceName); auto request = compiled_model.create_infer_request(); @@ -63,7 +63,7 @@ TEST_P(OVHoldersTest, Orders) { TEST_P(OVHoldersTest, LoadedState) { std::vector states; { - runtime::Core core = createCoreWithTemplate(); + ov::Core core = createCoreWithTemplate(); auto compiled_model = core.compile_model(function, targetDevice); auto request = compiled_model.create_infer_request(); try { @@ -73,9 +73,9 @@ TEST_P(OVHoldersTest, LoadedState) { } TEST_P(OVHoldersTest, LoadedTensor) { - runtime::Tensor tensor; + ov::Tensor tensor; { - runtime::Core core = createCoreWithTemplate(); + ov::Core core = createCoreWithTemplate(); auto compiled_model = core.compile_model(function, targetDevice); auto request = compiled_model.create_infer_request(); tensor = request.get_input_tensor(); @@ -85,7 +85,7 @@ TEST_P(OVHoldersTest, LoadedTensor) { TEST_P(OVHoldersTest, LoadedAny) { ov::Any any; { - runtime::Core core = createCoreWithTemplate(); + ov::Core core = createCoreWithTemplate(); auto compiled_model = core.compile_model(function, targetDevice); any = compiled_model.get_metric(METRIC_KEY(SUPPORTED_METRICS)); } @@ -94,7 +94,7 @@ TEST_P(OVHoldersTest, LoadedAny) { TEST_P(OVHoldersTest, LoadedRemoteContext) { runtime::RemoteContext ctx; { - runtime::Core core = createCoreWithTemplate(); + ov::Core core = createCoreWithTemplate(); auto compiled_model = core.compile_model(function, targetDevice); try { ctx = compiled_model.get_context(); @@ -122,14 +122,14 @@ void OVHoldersTestOnImportedNetwork::TearDown() { } TEST_P(OVHoldersTestOnImportedNetwork, CreateRequestWithCoreRemoved) { - runtime::Core core = createCoreWithTemplate(); + ov::Core core = createCoreWithTemplate(); std::stringstream stream; { auto compiled_model = core.compile_model(function, targetDevice); compiled_model.export_model(stream); } auto compiled_model = core.import_model(stream, targetDevice); - core = runtime::Core{}; + core = ov::Core{}; auto request = compiled_model.create_infer_request(); } } // namespace behavior diff --git a/src/tests/functional/plugin/shared/src/behavior/ov_plugin/remote.cpp b/src/tests/functional/plugin/shared/src/behavior/ov_plugin/remote.cpp index 9cdb00cbcfe..d0d5c364b1a 100644 --- a/src/tests/functional/plugin/shared/src/behavior/ov_plugin/remote.cpp +++ b/src/tests/functional/plugin/shared/src/behavior/ov_plugin/remote.cpp @@ -86,7 +86,7 @@ TEST_P(OVRemoteTest, remoteTensorAsTensor) { auto remote_tensor = context.create_tensor(input->get_element_type(), input->get_shape(), tensor_parameters); - runtime::Tensor tensor; + ov::Tensor tensor; ASSERT_NO_THROW(tensor = remote_tensor); ASSERT_THROW(tensor.data(), ov::Exception); ASSERT_NO_THROW(tensor.get_element_type()); @@ -107,7 +107,7 @@ TEST_P(OVRemoteTest, inferWithRemoteNoThrow) { } auto output = function->get_results().front(); {// Host accessable output if input is remote by default - runtime::Tensor tensor; + ov::Tensor tensor; ASSERT_NO_THROW(tensor = infer_request.get_tensor( ngraph::op::util::create_ie_output_name(output->input_value(0)))); ASSERT_NO_THROW(tensor.data()); diff --git a/src/tests/functional/shared_test_classes/include/shared_test_classes/base/ov_subgraph.hpp b/src/tests/functional/shared_test_classes/include/shared_test_classes/base/ov_subgraph.hpp index bc20dd30f37..5449db69175 100644 --- a/src/tests/functional/shared_test_classes/include/shared_test_classes/base/ov_subgraph.hpp +++ b/src/tests/functional/shared_test_classes/include/shared_test_classes/base/ov_subgraph.hpp @@ -33,8 +33,8 @@ public: } protected: - virtual void compare(const std::vector &expected, - const std::vector &actual); + virtual void compare(const std::vector &expected, + const std::vector &actual); virtual void configure_model(); virtual void compile_model(); @@ -45,26 +45,26 @@ protected: void init_input_shapes(const std::vector& shapes); - std::shared_ptr core = ov::test::utils::PluginCache::get().core(); + std::shared_ptr core = ov::test::utils::PluginCache::get().core(); std::string targetDevice; Config configuration; std::shared_ptr function, functionRefs = nullptr; - std::map, ov::runtime::Tensor> inputs; + std::map, ov::Tensor> inputs; std::vector inputDynamicShapes; std::vector> targetStaticShapes; ElementType inType = ov::element::undefined, outType = ov::element::undefined; - ov::runtime::CompiledModel executableNetwork; - ov::runtime::InferRequest inferRequest; + ov::CompiledModel executableNetwork; + ov::InferRequest inferRequest; constexpr static const double disable_threshold = std::numeric_limits::max(); double abs_threshold = disable_threshold, rel_threshold = disable_threshold; LayerTestsUtils::Summary& summary = LayerTestsUtils::Summary::getInstance(); - virtual std::vector calculate_refs(); - virtual std::vector get_plugin_outputs(); + virtual std::vector calculate_refs(); + virtual std::vector get_plugin_outputs(); }; inline std::vector> static_shapes_to_test_representation(const std::vector>& shapes) { diff --git a/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/experimental_detectron_generate_proposals_single_image.hpp b/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/experimental_detectron_generate_proposals_single_image.hpp index 9d5fcc9fba0..a330c764875 100644 --- a/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/experimental_detectron_generate_proposals_single_image.hpp +++ b/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/experimental_detectron_generate_proposals_single_image.hpp @@ -16,7 +16,7 @@ typedef std::tuple< float, // nms_threshold: specifies NMS threshold int64_t, // post_nms_count: number of top-n proposals after NMS int64_t, // pre_nms_count: number of top-n proposals after NMS - std::pair>, // input tensors + std::pair>, // input tensors ElementType, // Network precision std::string // Device name>; > ExperimentalDetectronGenerateProposalsSingleImageTestParams; diff --git a/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/experimental_detectron_prior_grid_generator.hpp b/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/experimental_detectron_prior_grid_generator.hpp index ab7266edf20..29471a6846c 100644 --- a/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/experimental_detectron_prior_grid_generator.hpp +++ b/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/experimental_detectron_prior_grid_generator.hpp @@ -18,7 +18,7 @@ public: typedef std::tuple< ExperimentalDetectronPriorGridGeneratorTestParam, - std::pair>, + std::pair>, ElementType, // Network precision std::string // Device name>; > ExperimentalDetectronPriorGridGeneratorTestParams; diff --git a/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/matrix_nms.hpp b/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/matrix_nms.hpp index f3f3f757622..a8dfaf10b50 100644 --- a/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/matrix_nms.hpp +++ b/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/matrix_nms.hpp @@ -43,7 +43,7 @@ class MatrixNmsLayerTest : public testing::WithParamInterface, public: static std::string getTestCaseName(const testing::TestParamInfo& obj); void generate_inputs(const std::vector& targetInputStaticShapes) override; - void compare(const std::vector &expected, const std::vector &actual) override; + void compare(const std::vector &expected, const std::vector &actual) override; protected: void SetUp() override; diff --git a/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/multiclass_nms.hpp b/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/multiclass_nms.hpp index ce78d06fceb..b956483ee0b 100644 --- a/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/multiclass_nms.hpp +++ b/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/multiclass_nms.hpp @@ -44,7 +44,7 @@ class MulticlassNmsLayerTest : public testing::WithParamInterface& obj); void generate_inputs(const std::vector& targetInputStaticShapes) override; - void compare(const std::vector &expected, const std::vector &actual) override; + void compare(const std::vector &expected, const std::vector &actual) override; protected: void SetUp() override; diff --git a/src/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/simple_if.hpp b/src/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/simple_if.hpp index 448ff5a01e4..eac5d0589b4 100644 --- a/src/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/simple_if.hpp +++ b/src/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/simple_if.hpp @@ -27,7 +27,7 @@ public: static std::string getTestCaseName(const testing::TestParamInfo &obj); protected: void SetUp() override; - void compare(const std::vector &expected, const std::vector &actual) override; + void compare(const std::vector &expected, const std::vector &actual) override; size_t inferNum = 0; }; @@ -55,7 +55,7 @@ protected: class SimpleIfNotConstConditionAndDimsIncreaseTest : public SimpleIfNotConstConditionTest { protected: void SetUp() override; - void compare(const std::vector &expected, const std::vector &actual) override; + void compare(const std::vector &expected, const std::vector &actual) override; }; class SimpleIfNotConstConditionUnusedOutputPortsTest : public SimpleIfNotConstConditionTest { diff --git a/src/tests/functional/shared_test_classes/src/base/ov_subgraph.cpp b/src/tests/functional/shared_test_classes/src/base/ov_subgraph.cpp index 4859e56e7b5..30fde535595 100644 --- a/src/tests/functional/shared_test_classes/src/base/ov_subgraph.cpp +++ b/src/tests/functional/shared_test_classes/src/base/ov_subgraph.cpp @@ -127,8 +127,8 @@ void SubgraphBaseTest::query_model() { ASSERT_EQ(expected, actual); } -void SubgraphBaseTest::compare(const std::vector& expected, - const std::vector& actual) { +void SubgraphBaseTest::compare(const std::vector& expected, + const std::vector& actual) { ASSERT_EQ(expected.size(), actual.size()); for (size_t i = 0; i < expected.size(); i++) { ov::test::utils::compare(expected[i], actual[i], abs_threshold, rel_threshold); @@ -176,7 +176,7 @@ void SubgraphBaseTest::generate_inputs(const std::vector& targetInput const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (funcInput.get_element_type().is_real()) { tensor = ov::test::utils::create_and_fill_tensor( funcInput.get_element_type(), targetInputStaticShapes[i], 2560, 0, 256); @@ -195,8 +195,8 @@ void SubgraphBaseTest::infer() { inferRequest.infer(); } -std::vector SubgraphBaseTest::calculate_refs() { - using InputsMap = std::map, ov::runtime::Tensor>; +std::vector SubgraphBaseTest::calculate_refs() { + using InputsMap = std::map, ov::Tensor>; auto functionToProcess = ov::clone_model(*functionRefs); //TODO: remove this conversions as soon as function interpreter fully support bf16 and f16 @@ -242,8 +242,8 @@ std::vector SubgraphBaseTest::calculate_refs() { return ngraph::helpers::interpretFunction(functionToProcess, inputs); } -std::vector SubgraphBaseTest::get_plugin_outputs() { - auto outputs = std::vector{}; +std::vector SubgraphBaseTest::get_plugin_outputs() { + auto outputs = std::vector{}; for (const auto& output : function->outputs()) { outputs.push_back(inferRequest.get_tensor(output)); } diff --git a/src/tests/functional/shared_test_classes/src/single_layer/eltwise.cpp b/src/tests/functional/shared_test_classes/src/single_layer/eltwise.cpp index b4aa7cb7f3c..8fb0f8dd7a2 100644 --- a/src/tests/functional/shared_test_classes/src/single_layer/eltwise.cpp +++ b/src/tests/functional/shared_test_classes/src/single_layer/eltwise.cpp @@ -52,7 +52,7 @@ void EltwiseLayerTest::generate_inputs(const std::vector& targetI const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; bool isReal = funcInput.get_element_type().is_real(); switch (opType) { case ngraph::helpers::EltwiseTypes::POWER: diff --git a/src/tests/functional/shared_test_classes/src/single_layer/experimental_detectron_detection_output.cpp b/src/tests/functional/shared_test_classes/src/single_layer/experimental_detectron_detection_output.cpp index 14a56e6fd43..7af9540eda8 100644 --- a/src/tests/functional/shared_test_classes/src/single_layer/experimental_detectron_detection_output.cpp +++ b/src/tests/functional/shared_test_classes/src/single_layer/experimental_detectron_detection_output.cpp @@ -97,7 +97,7 @@ void ExperimentalDetectronDetectionOutputLayerTest::SetUp() { } void ExperimentalDetectronDetectionOutputLayerTest::generate_inputs(const std::vector& targetInputStaticShapes) { - static const std::vector inputTensors = { + static const std::vector inputTensors = { // 16 x 4 = 64 CommonTestUtils::create_tensor(ov::element::f32, Shape{16, 4}, { 1.0f, 1.0f, 10.0f, 10.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, diff --git a/src/tests/functional/shared_test_classes/src/single_layer/experimental_detectron_generate_proposals_single_image.cpp b/src/tests/functional/shared_test_classes/src/single_layer/experimental_detectron_generate_proposals_single_image.cpp index 586539b602d..2e9a8114e67 100644 --- a/src/tests/functional/shared_test_classes/src/single_layer/experimental_detectron_generate_proposals_single_image.cpp +++ b/src/tests/functional/shared_test_classes/src/single_layer/experimental_detectron_generate_proposals_single_image.cpp @@ -26,7 +26,7 @@ std::string ExperimentalDetectronGenerateProposalsSingleImageLayerTest::getTestC const testing::TestParamInfo& obj) { std::vector inputShapes; ov::op::v6::ExperimentalDetectronGenerateProposalsSingleImage::Attributes attributes; - std::pair> inputTensors; + std::pair> inputTensors; ElementType netPrecision; std::string targetName; std::tie( @@ -57,7 +57,7 @@ std::string ExperimentalDetectronGenerateProposalsSingleImageLayerTest::getTestC void ExperimentalDetectronGenerateProposalsSingleImageLayerTest::SetUp() { std::vector inputShapes; ov::op::v6::ExperimentalDetectronGenerateProposalsSingleImage::Attributes attributes; - std::pair> inputTensors; + std::pair> inputTensors; ElementType netPrecision; std::string targetName; std::tie( diff --git a/src/tests/functional/shared_test_classes/src/single_layer/experimental_detectron_prior_grid_generator.cpp b/src/tests/functional/shared_test_classes/src/single_layer/experimental_detectron_prior_grid_generator.cpp index ae1df2f9e7e..8915ebc0cfb 100644 --- a/src/tests/functional/shared_test_classes/src/single_layer/experimental_detectron_prior_grid_generator.cpp +++ b/src/tests/functional/shared_test_classes/src/single_layer/experimental_detectron_prior_grid_generator.cpp @@ -27,7 +27,7 @@ std::ostream& operator <<( std::string ExperimentalDetectronPriorGridGeneratorLayerTest::getTestCaseName( const testing::TestParamInfo& obj) { ExperimentalDetectronPriorGridGeneratorTestParam param; - std::pair> inputTensors; + std::pair> inputTensors; ElementType netPrecision; std::string targetName; std::tie(param, inputTensors, netPrecision, targetName) = obj.param; @@ -48,7 +48,7 @@ std::string ExperimentalDetectronPriorGridGeneratorLayerTest::getTestCaseName( void ExperimentalDetectronPriorGridGeneratorLayerTest::SetUp() { ExperimentalDetectronPriorGridGeneratorTestParam param; - std::pair> inputTensors; + std::pair> inputTensors; ElementType netPrecision; std::string targetName; std::tie(param, inputTensors, netPrecision, targetName) = this->GetParam(); @@ -86,7 +86,7 @@ void ExperimentalDetectronPriorGridGeneratorLayerTest::generate_inputs(const std } for (auto j = i; j < funcInputs.size(); ++j) { - ov::runtime::Tensor inputTensor = CommonTestUtils::create_tensor( + ov::Tensor inputTensor = CommonTestUtils::create_tensor( ov::element::f32, targetInputStaticShapes[j], std::vector(0.f, shape_size(targetInputStaticShapes[j]))); diff --git a/src/tests/functional/shared_test_classes/src/single_layer/matrix_nms.cpp b/src/tests/functional/shared_test_classes/src/single_layer/matrix_nms.cpp index 3a1f8f2e94d..f7a93a34613 100644 --- a/src/tests/functional/shared_test_classes/src/single_layer/matrix_nms.cpp +++ b/src/tests/functional/shared_test_classes/src/single_layer/matrix_nms.cpp @@ -67,10 +67,10 @@ void MatrixNmsLayerTest::generate_inputs(const std::vector& targe const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (i == 1) { - tensor = ov::runtime::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i]); + tensor = ov::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i]); const size_t range = 1; const size_t startFrom = 0; @@ -129,8 +129,8 @@ void MatrixNmsLayerTest::GetOutputParams(size_t& numBatches, size_t& maxOutputBo std::min(maxOutputBoxesPerBatch, static_cast(m_attrs.keep_top_k)); } -void MatrixNmsLayerTest::compare(const std::vector &expectedOutputs, - const std::vector &actualOutputs) { +void MatrixNmsLayerTest::compare(const std::vector &expectedOutputs, + const std::vector &actualOutputs) { auto batchIndex = -1; size_t numBatches(0), maxOutputBoxesPerBatch(0); GetOutputParams(numBatches, maxOutputBoxesPerBatch); diff --git a/src/tests/functional/shared_test_classes/src/single_layer/multiclass_nms.cpp b/src/tests/functional/shared_test_classes/src/single_layer/multiclass_nms.cpp index 8d2f6226abd..82a0ddc6662 100644 --- a/src/tests/functional/shared_test_classes/src/single_layer/multiclass_nms.cpp +++ b/src/tests/functional/shared_test_classes/src/single_layer/multiclass_nms.cpp @@ -68,10 +68,10 @@ void MulticlassNmsLayerTest::generate_inputs(const std::vector& t const auto& funcInputs = function->inputs(); for (int i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (i == 1) { - tensor = ov::runtime::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i]); + tensor = ov::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i]); const size_t range = 1; const size_t startFrom = 0; @@ -130,8 +130,8 @@ void MulticlassNmsLayerTest::GetOutputParams(size_t& numBatches, size_t& maxOutp std::min(maxOutputBoxesPerBatch, static_cast(m_attrs.keep_top_k)); } -void MulticlassNmsLayerTest::compare(const std::vector &expectedOutputs, - const std::vector &actualOutputs) { +void MulticlassNmsLayerTest::compare(const std::vector &expectedOutputs, + const std::vector &actualOutputs) { auto batchIndex = -1; size_t numBatches(0), maxOutputBoxesPerBatch(0); GetOutputParams(numBatches, maxOutputBoxesPerBatch); diff --git a/src/tests/functional/shared_test_classes/src/subgraph/simple_if.cpp b/src/tests/functional/shared_test_classes/src/subgraph/simple_if.cpp index 654bac2339a..cbe9a6bc227 100644 --- a/src/tests/functional/shared_test_classes/src/subgraph/simple_if.cpp +++ b/src/tests/functional/shared_test_classes/src/subgraph/simple_if.cpp @@ -29,7 +29,7 @@ std::string SimpleIfTest::getTestCaseName(const testing::TestParamInfo &expected, const std::vector &actual) { +void SimpleIfTest::compare(const std::vector &expected, const std::vector &actual) { // in bodies there aren't nodes that work with dimension 0. So we shouldn't call SubgraphBaseTest::compare bool hasZero = false; for (auto shape : targetStaticShapes[inferNum]) { @@ -152,10 +152,10 @@ void SimpleIfNotConstConditionTest::generate_inputs(const std::vectorinputs(); for (size_t i = 0; i < funcInputs.size(); ++i) { const auto& funcInput = funcInputs[i]; - ov::runtime::Tensor tensor; + ov::Tensor tensor; if (i + 1 == funcInputs.size()) { - tensor = ov::runtime::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i]); + tensor = ov::Tensor(funcInput.get_element_type(), targetInputStaticShapes[i]); auto *dataPtr = tensor.data(); dataPtr[0] = condition; } else { @@ -241,7 +241,7 @@ void SimpleIfNotConstConditionAndDimsIncreaseTest::SetUp() { params, "SimpleIfNotConstConditionAndDimsIncreaseTest"); } -void SimpleIfNotConstConditionAndDimsIncreaseTest::compare(const std::vector &expected, const std::vector &actual) { +void SimpleIfNotConstConditionAndDimsIncreaseTest::compare(const std::vector &expected, const std::vector &actual) { const auto shape = targetStaticShapes[inferNum++].front(); if (!condition && std::any_of(shape.begin(), shape.end(), [](size_t dim) { return dim == 0; })) { return; diff --git a/src/tests/ie_test_utils/common_test_utils/data_utils.hpp b/src/tests/ie_test_utils/common_test_utils/data_utils.hpp index b47eec796e2..db159cc1f87 100644 --- a/src/tests/ie_test_utils/common_test_utils/data_utils.hpp +++ b/src/tests/ie_test_utils/common_test_utils/data_utils.hpp @@ -142,7 +142,7 @@ fill_data_roi(InferenceEngine::Blob::Ptr &blob, const uint32_t range, const int template inline void -fill_data_roi(ov::runtime::Tensor& tensor, const uint32_t range, const int height, const int width, const float omega, +fill_data_roi(ov::Tensor& tensor, const uint32_t range, const int height, const int width, const float omega, const bool is_roi_max_mode, const int seed = 1) { using dataType = typename InferenceEngine::PrecisionTrait::value_type; auto* data = static_cast(tensor.data()); @@ -424,13 +424,13 @@ void inline fill_data_random(InferenceEngine:: } template -static ov::runtime::Tensor create_tensor( +static ov::Tensor create_tensor( const ov::element::Type& element_type, const ov::Shape& shape, const std::vector& values, const size_t size = 0) { const size_t real_size = size ? size : values.size() * sizeof(T) / element_type.size(); - ov::runtime::Tensor tensor { element_type, shape }; + ov::Tensor tensor { element_type, shape }; std::memcpy(tensor.data(), values.data(), std::min(real_size * element_type.size(), sizeof(T) * values.size())); return tensor; } diff --git a/src/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/blob_utils.hpp b/src/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/blob_utils.hpp index e1d39c2388f..7f7cf96df7e 100644 --- a/src/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/blob_utils.hpp +++ b/src/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/blob_utils.hpp @@ -263,7 +263,7 @@ compareBlobData(const std::vector &res, const std::v } inline void -compare_tensor(const ov::runtime::Tensor& res_tensor, const ov::runtime::Tensor& ref_tensor, float max_diff = 0.01, +compare_tensor(const ov::Tensor& res_tensor, const ov::Tensor& ref_tensor, float max_diff = 0.01, const std::string& assertDetails = "", bool printData = false) { ASSERT_EQ(res_tensor.get_byte_size(), ref_tensor.get_byte_size()) << "Tensors have different byteSize(): " << res_tensor.get_byte_size() << " and " << ref_tensor.get_byte_size(); @@ -535,14 +535,14 @@ inline InferenceEngine::Blob::Ptr createAndFillBlob(const InferenceEngine::Tenso return blob; } -inline ov::runtime::Tensor create_and_fill_tensor( +inline ov::Tensor create_and_fill_tensor( const ov::element::Type element_type, const ov::Shape& shape, const uint32_t range = 10, const int32_t start_from = 0, const int32_t resolution = 1, const int seed = 1) { - auto tensor = ov::runtime::Tensor{element_type, shape}; + auto tensor = ov::Tensor{element_type, shape}; InferenceEngine::Blob::Ptr blob = make_blob_with_precision( {ov::ie::details::convertPrecision(element_type), {shape.begin(), shape.end()}, diff --git a/src/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/ov_plugin_cache.hpp b/src/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/ov_plugin_cache.hpp index 0716ecb8401..bf3f982d518 100644 --- a/src/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/ov_plugin_cache.hpp +++ b/src/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/ov_plugin_cache.hpp @@ -16,7 +16,7 @@ namespace utils { class PluginCache { public: - std::shared_ptr core(const std::string &deviceToCheck = std::string()); + std::shared_ptr core(const std::string &deviceToCheck = std::string()); static PluginCache &get(); @@ -32,7 +32,7 @@ private: ~PluginCache() = default; std::mutex g_mtx; - std::shared_ptr ov_core; + std::shared_ptr ov_core; }; } // namespace utils } // namespace test diff --git a/src/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/ov_tensor_utils.hpp b/src/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/ov_tensor_utils.hpp index 2f8f03a74b4..ce3ea45d188 100644 --- a/src/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/ov_tensor_utils.hpp +++ b/src/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/ov_tensor_utils.hpp @@ -9,7 +9,7 @@ namespace ov { namespace test { namespace utils { -ov::runtime::Tensor create_and_fill_tensor( +ov::Tensor create_and_fill_tensor( const ov::element::Type element_type, const ov::Shape &shape, const uint32_t range = 10, @@ -17,7 +17,7 @@ ov::runtime::Tensor create_and_fill_tensor( const int32_t resolution = 1, const int seed = 1); -ov::runtime::Tensor create_and_fill_tensor_unique_sequence( +ov::Tensor create_and_fill_tensor_unique_sequence( const ov::element::Type element_type, const ov::Shape& shape, const int32_t start_from = 0, @@ -25,8 +25,8 @@ ov::runtime::Tensor create_and_fill_tensor_unique_sequence( const int seed = 1); void compare( - const ov::runtime::Tensor &expected, - const ov::runtime::Tensor &actual, + const ov::Tensor &expected, + const ov::Tensor &actual, const double abs_threshold, const double rel_threshold); } // namespace utils diff --git a/src/tests/ie_test_utils/functional_test_utils/src/ov_plugin_cache.cpp b/src/tests/ie_test_utils/functional_test_utils/src/ov_plugin_cache.cpp index 99860daf769..74da7cd9b45 100644 --- a/src/tests/ie_test_utils/functional_test_utils/src/ov_plugin_cache.cpp +++ b/src/tests/ie_test_utils/functional_test_utils/src/ov_plugin_cache.cpp @@ -31,14 +31,14 @@ PluginCache &PluginCache::get() { return instance; } -std::shared_ptr PluginCache::core(const std::string &deviceToCheck) { +std::shared_ptr PluginCache::core(const std::string &deviceToCheck) { std::lock_guard lock(g_mtx); if (std::getenv("DISABLE_PLUGIN_CACHE") != nullptr) { #ifndef NDEBUG std::cout << "'DISABLE_PLUGIN_CACHE' environment variable is set. New Core object will be created!" << std::endl; #endif - return std::make_shared(); + return std::make_shared(); } #ifndef NDEBUG std::cout << "Access PluginCache ov core. OV Core use count: " << ov_core.use_count() << std::endl; @@ -48,7 +48,7 @@ std::shared_ptr PluginCache::core(const std::string &deviceTo #ifndef NDEBUG std::cout << "Created ov core." << std::endl; #endif - ov_core = std::make_shared(); + ov_core = std::make_shared(); } assert(0 != ov_core.use_count()); diff --git a/src/tests/ie_test_utils/functional_test_utils/src/ov_tensor_utils.cpp b/src/tests/ie_test_utils/functional_test_utils/src/ov_tensor_utils.cpp index 6def4c521ce..d59b13a2a43 100644 --- a/src/tests/ie_test_utils/functional_test_utils/src/ov_tensor_utils.cpp +++ b/src/tests/ie_test_utils/functional_test_utils/src/ov_tensor_utils.cpp @@ -13,14 +13,14 @@ namespace ov { namespace test { namespace utils { -ov::runtime::Tensor create_and_fill_tensor( +ov::Tensor create_and_fill_tensor( const ov::element::Type element_type, const ov::Shape& shape, const uint32_t range, const int32_t start_from, const int32_t resolution, const int seed) { - auto tensor = ov::runtime::Tensor{element_type, shape}; + auto tensor = ov::Tensor{element_type, shape}; #define CASE(X) case X: ::CommonTestUtils::fill_data_random( \ tensor.data::value_type>(), \ shape_size(shape), \ @@ -52,12 +52,12 @@ ov::runtime::Tensor create_and_fill_tensor( return tensor; } -ov::runtime::Tensor create_and_fill_tensor_unique_sequence(const ov::element::Type element_type, +ov::Tensor create_and_fill_tensor_unique_sequence(const ov::element::Type element_type, const ov::Shape& shape, const int32_t start_from, const int32_t resolution, const int seed) { - auto tensor = ov::runtime::Tensor{element_type, shape}; + auto tensor = ov::Tensor{element_type, shape}; auto range = shape_size(shape) * 2; #define CASE(X) \ case X: \ @@ -101,8 +101,8 @@ ov::runtime::Tensor create_and_fill_tensor_unique_sequence(const ov::element::Ty } template -void compare(const ov::runtime::Tensor& expected, - const ov::runtime::Tensor& actual, +void compare(const ov::Tensor& expected, + const ov::Tensor& actual, const double abs_threshold_ = std::numeric_limits::max(), const double rel_threshold_ = std::numeric_limits::max()) { auto expected_shape = expected.get_shape(); @@ -184,8 +184,8 @@ void compare(const ov::runtime::Tensor& expected, } void compare( - const ov::runtime::Tensor& expected, - const ov::runtime::Tensor& actual, + const ov::Tensor& expected, + const ov::Tensor& actual, const double abs_threshold, const double rel_threshold) { #define CASE0(X, Y) case Y : compare< \ diff --git a/src/tests/ngraph_helpers/ngraph_functions/include/ngraph_functions/utils/ngraph_helpers.hpp b/src/tests/ngraph_helpers/ngraph_functions/include/ngraph_functions/utils/ngraph_helpers.hpp index 9197ada994a..f4908721f64 100644 --- a/src/tests/ngraph_helpers/ngraph_functions/include/ngraph_functions/utils/ngraph_helpers.hpp +++ b/src/tests/ngraph_helpers/ngraph_functions/include/ngraph_functions/utils/ngraph_helpers.hpp @@ -267,9 +267,9 @@ std::vector>> const std::vector> &inputs, const std::vector &inputTypes = {}); -std::vector +std::vector interpretFunction(const std::shared_ptr &function, - const std::map, ov::runtime::Tensor>& inputs); + const std::map, ov::Tensor>& inputs); // // This function compares two nGraph functions and requires them to have exactly one output diff --git a/src/tests/ngraph_helpers/ngraph_functions/src/utils/ngraph_helpers.cpp b/src/tests/ngraph_helpers/ngraph_functions/src/utils/ngraph_helpers.cpp index 4f2c23bc971..1eb815c60ba 100644 --- a/src/tests/ngraph_helpers/ngraph_functions/src/utils/ngraph_helpers.cpp +++ b/src/tests/ngraph_helpers/ngraph_functions/src/utils/ngraph_helpers.cpp @@ -144,8 +144,8 @@ std::vector>> return outputs; } -std::vector interpretFunction(const std::shared_ptr &function, - const std::map, ov::runtime::Tensor>& inputs) { +std::vector interpretFunction(const std::shared_ptr &function, + const std::map, ov::Tensor>& inputs) { auto backend = runtime::Backend::create(); const auto &funcInputs = function->inputs(); @@ -163,7 +163,7 @@ std::vector interpretFunction(const std::shared_ptr, ov::runtime::Tensor> elem) { + [&input](std::pair, ov::Tensor> elem) { return elem.first->get_friendly_name() == input.get_node_shared_ptr()->get_friendly_name(); }); if (inputIt == inputs.end()) { @@ -190,9 +190,9 @@ std::vector interpretFunction(const std::shared_ptrcompile(function); handle->call_with_validate(outputTensors, inputTensors); - std::vector outputs; + std::vector outputs; for (const auto& outTensor : outputTensors) { - ov::runtime::Tensor tmpBuffer(outTensor->get_element_type(), outTensor->get_shape()); + ov::Tensor tmpBuffer(outTensor->get_element_type(), outTensor->get_shape()); outTensor->read(tmpBuffer.data(), tmpBuffer.get_byte_size()); outputs.push_back(tmpBuffer); } diff --git a/src/tests/unit/auto/auto_release_helper_test.cpp b/src/tests/unit/auto/auto_release_helper_test.cpp index 141f26ff09a..fee972400af 100644 --- a/src/tests/unit/auto/auto_release_helper_test.cpp +++ b/src/tests/unit/auto/auto_release_helper_test.cpp @@ -48,9 +48,9 @@ public: std::shared_ptr> plugin; //mock exeNetwork helper - ov::runtime::SoPtr mockExeNetwork; + ov::SoPtr mockExeNetwork; //mock exeNetwork actual - ov::runtime::SoPtr mockExeNetworkActual; + ov::SoPtr mockExeNetworkActual; // config for Auto device std::map config; std::vector metaDevices; diff --git a/src/tests/unit/auto/auto_select_device_failed_test.cpp b/src/tests/unit/auto/auto_select_device_failed_test.cpp index 7f4ac663501..74f8516c141 100644 --- a/src/tests/unit/auto/auto_select_device_failed_test.cpp +++ b/src/tests/unit/auto/auto_select_device_failed_test.cpp @@ -60,7 +60,7 @@ public: //mock exeNetwork std::shared_ptr mockIExeNet; - ov::runtime::SoPtr mockExeNetwork; + ov::SoPtr mockExeNetwork; MockIInferencePlugin* mockIPlugin; InferenceEngine::InferencePlugin mockPlugin; // config for Auto device diff --git a/src/tests/unit/auto/exec_network_get_metrics.cpp b/src/tests/unit/auto/exec_network_get_metrics.cpp index 52b14600519..0f8095a8ed7 100644 --- a/src/tests/unit/auto/exec_network_get_metrics.cpp +++ b/src/tests/unit/auto/exec_network_get_metrics.cpp @@ -56,12 +56,12 @@ public: //mock cpu exeNetwork std::shared_ptr cpuMockIExeNet; - ov::runtime::SoPtr cpuMockExeNetwork; + ov::SoPtr cpuMockExeNetwork; MockIInferencePlugin* cpuMockIPlugin; InferenceEngine::InferencePlugin cpuMockPlugin; //mock gpu exeNetwork std::shared_ptr gpuMockIExeNet; - ov::runtime::SoPtr gpuMockExeNetwork; + ov::SoPtr gpuMockExeNetwork; MockIInferencePlugin* gpuMockIPlugin; InferenceEngine::InferencePlugin gpuMockPlugin; // config for Auto device diff --git a/src/tests/unit/gna/ngraph/op_eval/softsign.cpp b/src/tests/unit/gna/ngraph/op_eval/softsign.cpp index 57650a56b3a..a92f4694a30 100644 --- a/src/tests/unit/gna/ngraph/op_eval/softsign.cpp +++ b/src/tests/unit/gna/ngraph/op_eval/softsign.cpp @@ -23,10 +23,10 @@ TEST(op_eval, softsign) { float inputs[] = {-1.0, 0.0, 1.0, 20.0}; std::vector expected_result{0.5, 1.0, 0.5, 0.047619}; - ov::runtime::TensorVector result(1); - ov::runtime::Tensor input{ov::element::f32, ov::Shape{4}, inputs}; + ov::TensorVector result(1); + ov::Tensor input{ov::element::f32, ov::Shape{4}, inputs}; - ASSERT_TRUE(fun->evaluate(result, ov::runtime::TensorVector{input})); + ASSERT_TRUE(fun->evaluate(result, ov::TensorVector{input})); EXPECT_EQ(result.size(), 1); EXPECT_EQ(result[0].get_element_type(), ngraph::element::f32); diff --git a/src/tests/unit/inference_engine/cpp_interfaces/ie_memory_state_internal_test.cpp b/src/tests/unit/inference_engine/cpp_interfaces/ie_memory_state_internal_test.cpp index 20b4d7f381b..f439f776f60 100644 --- a/src/tests/unit/inference_engine/cpp_interfaces/ie_memory_state_internal_test.cpp +++ b/src/tests/unit/inference_engine/cpp_interfaces/ie_memory_state_internal_test.cpp @@ -27,7 +27,7 @@ class InferRequestVariableStateTests : public ::testing::Test { shared_ptr mockVariableStateInternal; MockIInferencePlugin* mockIPlugin; InferencePlugin plugin; - ov::runtime::SoPtr net; + ov::SoPtr net; IInferRequestInternal::Ptr req; void SetUp() override { diff --git a/src/tests/unit/inference_engine/ie_executable_network_test.cpp b/src/tests/unit/inference_engine/ie_executable_network_test.cpp index a006078211e..01e77a29835 100644 --- a/src/tests/unit/inference_engine/ie_executable_network_test.cpp +++ b/src/tests/unit/inference_engine/ie_executable_network_test.cpp @@ -38,7 +38,7 @@ using testing::SetArgReferee; class ExecutableNetworkTests : public ::testing::Test { protected: std::shared_ptr mockIExeNet; - ov::runtime::SoPtr exeNetwork; + ov::SoPtr exeNetwork; MockIInferencePlugin* mockIPlugin; InferencePlugin plugin; diff --git a/tests/fuzz/src/read_model-fuzzer.cc b/tests/fuzz/src/read_model-fuzzer.cc index d7c6f793417..21085706160 100644 --- a/tests/fuzz/src/read_model-fuzzer.cc +++ b/tests/fuzz/src/read_model-fuzzer.cc @@ -25,11 +25,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { data += net_size + sizeof(kSplitSequence); // isolate weights data - ov::runtime::Tensor weights(ov::element::u8, {static_cast(size)}, (void*)data); + ov::Tensor weights(ov::element::u8, {static_cast(size)}, (void*)data); // read xml and set weights try { - ov::runtime::Core core; + ov::Core core; auto model = core.read_model(net, weights); } catch (const std::exception&) { return 0; // fail gracefully on expected exceptions diff --git a/tools/compile_tool/README.md b/tools/compile_tool/README.md index 23142f22368..787a25a5648 100644 --- a/tools/compile_tool/README.md +++ b/tools/compile_tool/README.md @@ -80,10 +80,10 @@ For example, to compile a blob for inference on an IntelĀ® Neural Compute Stick ### Import a Compiled Blob File to Your Application To import a blob with the network from a generated file into your application, use the -`ov::runtime::Core::import_model` method: +`ov::Core::import_model` method: ```cpp -ov::runtime::Core ie; +ov::Core ie; std::ifstream file{"model_name.blob"}; -ov::runtime::CompiledModel compiled_model = ie.import_model(file, "MYRIAD", {}); +ov::CompiledModel compiled_model = ie.import_model(file, "MYRIAD", {}); ``` diff --git a/tools/compile_tool/main.cpp b/tools/compile_tool/main.cpp index cf439903690..e2421301f5f 100644 --- a/tools/compile_tool/main.cpp +++ b/tools/compile_tool/main.cpp @@ -744,7 +744,7 @@ int main(int argc, char* argv[]) { executableNetwork.Export(outputFile); } } else { - ov::runtime::Core core; + ov::Core core; if (!FLAGS_log_level.empty()) { core.set_config({{CONFIG_KEY(LOG_LEVEL), FLAGS_log_level}}, FLAGS_d); }