From 51df17912b896c75df18da8204e7927fe297640b Mon Sep 17 00:00:00 2001 From: Tomasz Jankowski Date: Mon, 4 Sep 2023 06:07:06 +0200 Subject: [PATCH] [Ref_Impl] Change namespace from nG to OV (#19363) * Use quotes for openvino includes * Drop runtime from openvino::reference * Drop runtime::reference * Replace ngraph::reference with ov::reference - defs * Replace ngraph::reference with ov::reference - uses * Drop redundant nesting * Fix non arch64 builds * Move coordinate*pp files under openvino * Move Coordinate... helpers under ov:: namespace * Revert not needed changes * Fix missing namespace scope * Fix compilation * Fix code style * Use ov suppress deprecated macro instead of ngraph --------- Co-authored-by: Raasz, Pawel --- .../src/pruning/init_const_mask.cpp | 4 +- .../src/pruning/propagate_masks.cpp | 10 +- .../snippets/src/pass/fq_decomposition.cpp | 55 ++-- .../compress_float_constants.cpp | 4 +- .../src/transformations/convert_precision.cpp | 4 +- .../offline_transformations/pruning_test.cpp | 6 +- .../include/openvino/reference/abs.hpp | 6 +- .../openvino/reference/adaptive_avg_pool.hpp | 6 +- .../openvino/reference/adaptive_max_pool.hpp | 6 +- .../include/openvino/reference/add.hpp | 8 +- .../include/openvino/reference/and.hpp | 8 +- .../include/openvino/reference/atan2.hpp | 6 +- .../reference/autobroadcast_binop.hpp | 11 +- .../include/openvino/reference/avg_pool.hpp | 8 +- .../include/openvino/reference/batch_norm.hpp | 8 +- .../openvino/reference/binary_convolution.hpp | 6 +- .../include/openvino/reference/broadcast.hpp | 6 +- .../include/openvino/reference/bucketize.hpp | 8 +- .../include/openvino/reference/ceiling.hpp | 6 +- .../include/openvino/reference/clamp.hpp | 6 +- .../include/openvino/reference/concat.hpp | 6 +- .../include/openvino/reference/constant.hpp | 6 +- .../include/openvino/reference/convert.hpp | 6 +- .../openvino/reference/convert_color_nv12.hpp | 6 +- .../openvino/reference/convolution.hpp | 6 +- .../reference/convolution_backprop_data.hpp | 6 +- .../include/openvino/reference/copy.hpp | 6 +- .../openvino/reference/ctc_greedy_decoder.hpp | 13 +- .../reference/ctc_greedy_decoder_seq_len.hpp | 8 +- .../include/openvino/reference/ctc_loss.hpp | 6 +- .../include/openvino/reference/cum_sum.hpp | 6 +- .../reference/deformable_convolution.hpp | 6 +- .../reference/deformable_psroi_pooling.hpp | 6 +- .../openvino/reference/depth_to_space.hpp | 8 +- .../openvino/reference/detection_output.hpp | 6 +- .../include/openvino/reference/divide.hpp | 8 +- .../include/openvino/reference/einsum.hpp | 6 +- .../include/openvino/reference/elu.hpp | 6 +- .../reference/embedding_bag_offsets_sum.hpp | 6 +- .../reference/embedding_bag_packed_sum.hpp | 6 +- .../reference/embedding_segments_sum.hpp | 6 +- .../include/openvino/reference/equal.hpp | 8 +- .../include/openvino/reference/erf.hpp | 6 +- .../include/openvino/reference/exp.hpp | 6 +- ...xperimental_detectron_detection_output.hpp | 6 +- ...imental_detectron_prior_grid_generator.hpp | 6 +- ...mental_detectron_proposal_single_image.hpp | 6 +- ...mental_detectron_roi_feature_extractor.hpp | 6 +- .../experimental_detectron_topk_rois.hpp | 6 +- .../reference/extract_image_patches.hpp | 8 +- .../include/openvino/reference/eye.hpp | 6 +- .../openvino/reference/fake_quantize.hpp | 18 +- .../include/openvino/reference/fft.hpp | 6 +- .../include/openvino/reference/floor.hpp | 6 +- .../include/openvino/reference/floor_mod.hpp | 8 +- .../include/openvino/reference/function.hpp | 10 +- .../include/openvino/reference/gather.hpp | 6 +- .../openvino/reference/gather_elements.hpp | 9 +- .../include/openvino/reference/gather_nd.hpp | 8 +- .../openvino/reference/gather_tree.hpp | 6 +- .../include/openvino/reference/gelu.hpp | 6 +- .../openvino/reference/generate_proposal.hpp | 6 +- .../include/openvino/reference/greater.hpp | 8 +- .../include/openvino/reference/greater_eq.hpp | 8 +- .../openvino/reference/grid_sample.hpp | 6 +- .../include/openvino/reference/grn.hpp | 6 +- .../openvino/reference/group_convolution.hpp | 26 +- .../group_convolution_backprop_data.hpp | 30 +- .../reference/group_normalization.hpp | 1 - .../include/openvino/reference/gru_cell.hpp | 6 +- .../openvino/reference/hard_sigmoid.hpp | 6 +- .../include/openvino/reference/helpers.hpp | 6 +- .../include/openvino/reference/hsigmoid.hpp | 6 +- .../include/openvino/reference/hswish.hpp | 6 +- .../include/openvino/reference/if.hpp | 14 +- .../openvino/reference/interpolate.hpp | 8 +- .../openvino/reference/interpolate_pil.hpp | 6 +- .../include/openvino/reference/irdft.hpp | 6 +- .../include/openvino/reference/is_finite.hpp | 6 +- .../include/openvino/reference/is_inf.hpp | 6 +- .../include/openvino/reference/is_nan.hpp | 6 +- .../include/openvino/reference/less.hpp | 8 +- .../include/openvino/reference/less_eq.hpp | 8 +- .../include/openvino/reference/log.hpp | 6 +- .../openvino/reference/log_softmax.hpp | 14 +- .../openvino/reference/logical_reduction.hpp | 16 +- .../include/openvino/reference/loop.hpp | 14 +- .../include/openvino/reference/lrn.hpp | 8 +- .../include/openvino/reference/lstm_cell.hpp | 6 +- .../include/openvino/reference/matmul.hpp | 30 +- .../include/openvino/reference/matrix_nms.hpp | 6 +- .../include/openvino/reference/max.hpp | 12 +- .../include/openvino/reference/max_pool.hpp | 8 +- .../include/openvino/reference/maximum.hpp | 8 +- .../include/openvino/reference/mean.hpp | 12 +- .../include/openvino/reference/min.hpp | 12 +- .../include/openvino/reference/minimum.hpp | 8 +- .../include/openvino/reference/mish.hpp | 6 +- .../include/openvino/reference/mod.hpp | 8 +- .../openvino/reference/multiclass_nms.hpp | 6 +- .../include/openvino/reference/multiply.hpp | 8 +- .../include/openvino/reference/mvn.hpp | 10 +- .../include/openvino/reference/negate.hpp | 6 +- .../reference/non_max_suppression.hpp | 6 +- .../include/openvino/reference/non_zero.hpp | 6 +- .../openvino/reference/normalize_l2.hpp | 8 +- .../include/openvino/reference/not.hpp | 6 +- .../include/openvino/reference/not_equal.hpp | 8 +- .../include/openvino/reference/one_hot.hpp | 6 +- .../include/openvino/reference/or.hpp | 8 +- .../include/openvino/reference/pad.hpp | 6 +- .../include/openvino/reference/power.hpp | 2 +- .../include/openvino/reference/prelu.hpp | 8 +- .../include/openvino/reference/prior_box.hpp | 8 +- .../reference/prior_box_clustered.hpp | 10 +- .../include/openvino/reference/product.hpp | 12 +- .../include/openvino/reference/proposal.hpp | 16 +- .../openvino/reference/psroi_pooling.hpp | 6 +- .../include/openvino/reference/quantize.hpp | 8 +- .../openvino/reference/random_uniform.hpp | 6 +- .../include/openvino/reference/range.hpp | 8 +- .../include/openvino/reference/rdft.hpp | 6 +- .../include/openvino/reference/reduce_l1.hpp | 12 +- .../include/openvino/reference/reduce_l2.hpp | 12 +- .../openvino/reference/region_yolo.hpp | 6 +- .../include/openvino/reference/relu.hpp | 6 +- .../include/openvino/reference/reorg_yolo.hpp | 6 +- .../include/openvino/reference/reshape.hpp | 6 +- .../include/openvino/reference/result.hpp | 6 +- .../include/openvino/reference/reverse.hpp | 8 +- .../openvino/reference/reverse_sequence.hpp | 8 +- .../include/openvino/reference/rnn_cell.hpp | 6 +- .../include/openvino/reference/roi_align.hpp | 8 +- .../openvino/reference/roi_pooling.hpp | 8 +- .../include/openvino/reference/roll.hpp | 8 +- .../reference/scatter_elements_update.hpp | 8 +- .../openvino/reference/scatter_nd_update.hpp | 6 +- .../openvino/reference/scatter_update.hpp | 12 +- .../include/openvino/reference/select.hpp | 8 +- .../include/openvino/reference/selu.hpp | 6 +- .../include/openvino/reference/sequences.hpp | 266 ++++++++---------- .../include/openvino/reference/shape_of.hpp | 6 +- .../openvino/reference/shuffle_channels.hpp | 6 +- .../include/openvino/reference/sigmoid.hpp | 6 +- .../include/openvino/reference/sign.hpp | 6 +- .../include/openvino/reference/slice.hpp | 8 +- .../include/openvino/reference/softmax.hpp | 10 +- .../include/openvino/reference/softplus.hpp | 6 +- .../include/openvino/reference/softsign.hpp | 6 +- .../openvino/reference/space_to_depth.hpp | 8 +- .../include/openvino/reference/split.hpp | 6 +- .../include/openvino/reference/sqrt.hpp | 6 +- .../openvino/reference/squared_difference.hpp | 8 +- .../openvino/reference/strided_slice.hpp | 10 +- .../include/openvino/reference/subtract.hpp | 8 +- .../include/openvino/reference/sum.hpp | 12 +- .../include/openvino/reference/swish.hpp | 6 +- .../openvino/reference/tensor_iterator.hpp | 10 +- .../include/openvino/reference/tile.hpp | 8 +- .../include/openvino/reference/topk.hpp | 8 +- .../include/openvino/reference/transpose.hpp | 6 +- .../include/openvino/reference/unique.hpp | 30 +- .../reference/utils}/coordinate_index.hpp | 9 +- .../reference/utils}/coordinate_range.hpp | 10 +- .../reference/utils}/coordinate_transform.hpp | 20 +- .../openvino/reference/utils/fft_common.hpp | 6 +- .../openvino/reference/utils/nms_common.hpp | 6 +- .../include/openvino/reference/utils/span.hpp | 6 +- .../include/openvino/reference/xor.hpp | 8 +- src/core/reference/src/op/broadcast.cpp | 6 +- src/core/reference/src/op/concat.cpp | 6 +- src/core/reference/src/op/convert.cpp | 8 +- src/core/reference/src/op/depth_to_space.cpp | 14 +- src/core/reference/src/op/einsum.cpp | 138 +++++---- ...xperimental_detectron_detection_output.cpp | 6 +- ...mental_detectron_proposal_single_image.cpp | 8 +- ...mental_detectron_roi_feature_extractor.cpp | 6 +- src/core/reference/src/op/fft.cpp | 9 +- src/core/reference/src/op/function.cpp | 10 +- src/core/reference/src/op/gather_tree.cpp | 26 +- .../reference/src/op/generate_proposal.cpp | 6 +- .../reference/src/op/group_convolution.cpp | 6 +- .../op/group_convolution_backprop_data.cpp | 6 +- src/core/reference/src/op/if.cpp | 12 +- src/core/reference/src/op/interpolate.cpp | 2 +- src/core/reference/src/op/irdft.cpp | 9 +- src/core/reference/src/op/loop.cpp | 28 +- src/core/reference/src/op/matmul.cpp | 6 +- src/core/reference/src/op/matrix_nms.cpp | 13 +- src/core/reference/src/op/multiclass_nms.cpp | 10 +- .../reference/src/op/non_max_suppression.cpp | 9 +- src/core/reference/src/op/pad.cpp | 10 +- src/core/reference/src/op/random_uniform.cpp | 6 +- src/core/reference/src/op/rdft.cpp | 9 +- src/core/reference/src/op/reorg_yolo.cpp | 8 +- src/core/reference/src/op/reshape.cpp | 10 +- src/core/reference/src/op/reverse.cpp | 8 +- .../reference/src/op/shuffle_channels.cpp | 8 +- src/core/reference/src/op/slice.cpp | 8 +- src/core/reference/src/op/space_to_depth.cpp | 14 +- src/core/reference/src/op/split.cpp | 30 +- src/core/reference/src/op/strided_slice.cpp | 28 +- src/core/reference/src/op/tensor_iterator.cpp | 20 +- src/core/reference/src/op/tile.cpp | 14 +- src/core/reference/src/op/transpose.cpp | 8 +- .../reference/src/op/utils/fft_common.cpp | 6 +- .../reference/src/op/utils/nms_common.cpp | 6 +- .../src/runtime/opt_kernel/reshape.cpp | 2 +- .../src/{ => utils}/coordinate_index.cpp | 10 +- .../src/{ => utils}/coordinate_range.cpp | 8 +- .../src/{ => utils}/coordinate_transform.cpp | 15 +- src/core/src/op/abs.cpp | 2 +- src/core/src/op/add.cpp | 12 +- src/core/src/op/batch_to_space.cpp | 2 +- src/core/src/op/ceiling.cpp | 4 +- src/core/src/op/clamp.cpp | 2 +- src/core/src/op/concat.cpp | 24 +- src/core/src/op/convert.cpp | 12 +- src/core/src/op/cum_sum.cpp | 12 +- src/core/src/op/depth_to_space.cpp | 14 +- src/core/src/op/divide.cpp | 14 +- src/core/src/op/equal.cpp | 12 +- src/core/src/op/erf.cpp | 2 +- src/core/src/op/exp.cpp | 2 +- src/core/src/op/eye.cpp | 2 +- src/core/src/op/fake_quantize.cpp | 26 +- src/core/src/op/floor.cpp | 4 +- src/core/src/op/floor_mod.cpp | 12 +- src/core/src/op/gelu.cpp | 2 +- src/core/src/op/greater.cpp | 12 +- src/core/src/op/greater_eq.cpp | 12 +- src/core/src/op/grid_sample.cpp | 16 +- src/core/src/op/hsigmoid.cpp | 2 +- src/core/src/op/hswish.cpp | 2 +- src/core/src/op/interpolate.cpp | 74 ++--- src/core/src/op/less.cpp | 12 +- src/core/src/op/less_eq.cpp | 12 +- src/core/src/op/log.cpp | 2 +- src/core/src/op/logical_and.cpp | 12 +- src/core/src/op/logical_not.cpp | 2 +- src/core/src/op/logical_or.cpp | 12 +- src/core/src/op/loop.cpp | 12 +- src/core/src/op/matmul.cpp | 16 +- src/core/src/op/max_pool.cpp | 38 +-- src/core/src/op/maximum.cpp | 12 +- src/core/src/op/minimum.cpp | 12 +- src/core/src/op/mish.cpp | 2 +- src/core/src/op/mod.cpp | 12 +- src/core/src/op/multiply.cpp | 12 +- src/core/src/op/mvn.cpp | 18 +- src/core/src/op/negative.cpp | 2 +- src/core/src/op/non_zero.cpp | 6 +- src/core/src/op/not_equal.cpp | 12 +- src/core/src/op/one_hot.cpp | 16 +- src/core/src/op/power.cpp | 14 +- src/core/src/op/prelu.cpp | 10 +- src/core/src/op/prior_box.cpp | 4 +- src/core/src/op/prior_box_clustered.cpp | 6 +- src/core/src/op/random_uniform.cpp | 18 +- src/core/src/op/range.cpp | 2 +- src/core/src/op/reduce_l1.cpp | 2 +- src/core/src/op/reduce_l2.cpp | 2 +- src/core/src/op/reduce_logical_and.cpp | 8 +- src/core/src/op/reduce_logical_or.cpp | 8 +- src/core/src/op/reduce_max.cpp | 2 +- src/core/src/op/reduce_mean.cpp | 2 +- src/core/src/op/reduce_min.cpp | 2 +- src/core/src/op/reduce_prod.cpp | 2 +- src/core/src/op/reduce_sum.cpp | 2 +- src/core/src/op/relu.cpp | 2 +- src/core/src/op/reverse.cpp | 12 +- src/core/src/op/roi_align.cpp | 28 +- src/core/src/op/scatter_elements_update.cpp | 18 +- src/core/src/op/scatter_nd_update.cpp | 28 +- src/core/src/op/scatter_update.cpp | 18 +- src/core/src/op/select.cpp | 16 +- src/core/src/op/shape_of.cpp | 4 +- src/core/src/op/shuffle_channels.cpp | 2 +- src/core/src/op/sigmoid.cpp | 2 +- src/core/src/op/sign.cpp | 2 +- src/core/src/op/slice.cpp | 16 +- src/core/src/op/softmax.cpp | 4 +- src/core/src/op/softplus.cpp | 2 +- src/core/src/op/softsign.cpp | 2 +- src/core/src/op/space_to_batch.cpp | 18 +- src/core/src/op/space_to_depth.cpp | 14 +- src/core/src/op/split.cpp | 12 +- src/core/src/op/sqrt.cpp | 2 +- src/core/src/op/squeeze.cpp | 6 +- src/core/src/op/strided_slice.cpp | 10 +- src/core/src/op/subtract.cpp | 12 +- src/core/src/op/swish.cpp | 7 +- src/core/src/op/tile.cpp | 24 +- src/core/src/op/topk.cpp | 18 +- src/core/src/op/transpose.cpp | 12 +- src/core/src/op/unique.cpp | 16 +- src/core/src/op/unsqueeze.cpp | 2 +- src/core/src/op/util/broadcast_base.cpp | 12 +- src/core/src/op/util/gather_base.cpp | 32 +-- src/core/src/op/util/pad_base.cpp | 18 +- src/core/src/op/variadic_split.cpp | 16 +- src/core/src/op/xor.cpp | 12 +- src/core/src/pass/serialize.cpp | 2 +- src/core/tests/coordinate.cpp | 60 ++-- src/core/tests/coordinate_range.cpp | 54 ++-- src/core/tests/ov_tensor_test.cpp | 14 +- src/core/tests/span.cpp | 2 +- .../unit/dynamic_execution/priorbox_test.cpp | 2 +- .../adaptive_avg_pooling_gpu_test.cpp | 2 +- .../adaptive_max_pooling_gpu_test.cpp | 2 +- .../unit/test_cases/broadcast_gpu_test.cpp | 27 +- .../tests/unit/test_cases/gemm_gpu_test.cpp | 17 +- .../unit/test_cases/non_zero_gpu_test.cpp | 14 +- .../test_cases/scatter_nd_update_gpu_test.cpp | 42 +-- src/plugins/template/backend/ops/abs.cpp | 6 +- .../backend/ops/adaptive_avg_pool.cpp | 8 +- .../backend/ops/adaptive_max_pool.cpp | 20 +- src/plugins/template/backend/ops/avg_pool.cpp | 18 +- .../template/backend/ops/batch_norm.cpp | 32 +-- .../backend/ops/binary_convolution.cpp | 22 +- .../template/backend/ops/bucketize.cpp | 12 +- src/plugins/template/backend/ops/ceiling.cpp | 6 +- src/plugins/template/backend/ops/convert.cpp | 14 +- .../backend/ops/convert_color_nv12.cpp | 36 ++- .../template/backend/ops/convolution.cpp | 20 +- .../backend/ops/convolution_backprop_data.cpp | 2 +- .../backend/ops/ctc_greedy_decoder.cpp | 14 +- .../ops/ctc_greedy_decoder_seq_len.cpp | 32 +-- src/plugins/template/backend/ops/ctc_loss.cpp | 20 +- src/plugins/template/backend/ops/cum_sum.cpp | 12 +- .../backend/ops/deformable_convolution.cpp | 6 +- .../backend/ops/deformable_psroi_pooling.cpp | 56 ++-- .../template/backend/ops/detection_output.cpp | 20 +- src/plugins/template/backend/ops/einsum.cpp | 2 +- src/plugins/template/backend/ops/elu.cpp | 8 +- .../backend/ops/embedding_bag_offsets_sum.cpp | 17 +- .../backend/ops/embedding_bag_packed_sum.cpp | 13 +- .../backend/ops/embedding_segments_sum.cpp | 19 +- src/plugins/template/backend/ops/equal.cpp | 16 +- src/plugins/template/backend/ops/exp.cpp | 6 +- ...xperimental_detectron_detection_output.cpp | 36 +-- ...imental_detectron_prior_grid_generator.cpp | 18 +- ...mental_detectron_proposal_single_image.cpp | 36 +-- ...mental_detectron_roi_feature_extractor.cpp | 24 +- .../ops/experimental_detectron_topk_rois.cpp | 12 +- .../backend/ops/extract_image_patches.cpp | 10 +- src/plugins/template/backend/ops/fft.cpp | 37 ++- src/plugins/template/backend/ops/gather.cpp | 32 +-- .../template/backend/ops/gather_elements.cpp | 28 +- .../template/backend/ops/gather_nd.cpp | 56 ++-- .../template/backend/ops/gather_tree.cpp | 20 +- src/plugins/template/backend/ops/gelu.cpp | 16 +- .../backend/ops/generate_proposal.cpp | 44 +-- src/plugins/template/backend/ops/greater.cpp | 16 +- .../template/backend/ops/grid_sample.cpp | 16 +- src/plugins/template/backend/ops/grn.cpp | 8 +- .../backend/ops/group_convolution.cpp | 21 +- .../ops/group_convolution_backprop_data.cpp | 2 +- src/plugins/template/backend/ops/gru_cell.cpp | 62 ++-- .../template/backend/ops/hard_sigmoid.cpp | 10 +- src/plugins/template/backend/ops/if.cpp | 2 +- .../template/backend/ops/interpolate.cpp | 128 ++++----- src/plugins/template/backend/ops/irdft.cpp | 21 +- .../template/backend/ops/is_finite.cpp | 26 +- src/plugins/template/backend/ops/is_inf.cpp | 32 +-- src/plugins/template/backend/ops/is_nan.cpp | 24 +- src/plugins/template/backend/ops/log.cpp | 6 +- .../template/backend/ops/log_softmax.cpp | 8 +- src/plugins/template/backend/ops/lrn.cpp | 16 +- .../template/backend/ops/lstm_cell.cpp | 80 +++--- .../template/backend/ops/matrix_nms.cpp | 36 +-- src/plugins/template/backend/ops/mod.cpp | 12 +- .../template/backend/ops/multiclass_nms.cpp | 80 +++--- src/plugins/template/backend/ops/mvn.cpp | 26 +- .../backend/ops/non_max_suppression.cpp | 200 ++++++------- .../template/backend/ops/normalize_l2.cpp | 12 +- src/plugins/template/backend/ops/pad.cpp | 18 +- src/plugins/template/backend/ops/prelu.cpp | 10 +- src/plugins/template/backend/ops/proposal.cpp | 40 +-- .../template/backend/ops/psroi_pooling.cpp | 20 +- src/plugins/template/backend/ops/rdft.cpp | 14 +- .../template/backend/ops/region_yolo.cpp | 16 +- src/plugins/template/backend/ops/relu.cpp | 6 +- .../template/backend/ops/reorg_yolo.cpp | 10 +- .../template/backend/ops/reverse_sequence.cpp | 12 +- src/plugins/template/backend/ops/rnn_cell.cpp | 26 +- .../template/backend/ops/roi_align.cpp | 28 +- .../template/backend/ops/roi_pooling.cpp | 16 +- src/plugins/template/backend/ops/roll.cpp | 2 +- .../backend/ops/scatter_nd_update.cpp | 28 +- src/plugins/template/backend/ops/selu.cpp | 14 +- .../template/backend/ops/sequences.cpp | 208 +++++++------- src/plugins/template/backend/ops/sigmoid.cpp | 6 +- src/plugins/template/backend/ops/sign.cpp | 6 +- src/plugins/template/backend/ops/softsign.cpp | 24 +- .../backend/ops/squared_difference.cpp | 12 +- .../template/backend/ops/tensor_iterator.cpp | 20 +- src/plugins/template/backend/ops/unique.cpp | 26 +- 398 files changed, 2613 insertions(+), 3048 deletions(-) rename src/core/reference/include/{ngraph => openvino/reference/utils}/coordinate_index.hpp (58%) rename src/core/reference/include/{ngraph => openvino/reference/utils}/coordinate_range.hpp (97%) rename src/core/reference/include/{ngraph => openvino/reference/utils}/coordinate_transform.hpp (93%) rename src/core/reference/src/{ => utils}/coordinate_index.cpp (77%) rename src/core/reference/src/{ => utils}/coordinate_range.cpp (97%) rename src/core/reference/src/{ => utils}/coordinate_transform.cpp (96%) diff --git a/src/common/offline_transformations/src/pruning/init_const_mask.cpp b/src/common/offline_transformations/src/pruning/init_const_mask.cpp index fcf9255a800..f2086fb05fc 100644 --- a/src/common/offline_transformations/src/pruning/init_const_mask.cpp +++ b/src/common/offline_transformations/src/pruning/init_const_mask.cpp @@ -5,10 +5,10 @@ #include #include "mask_attribute.hpp" -#include "ngraph/coordinate_transform.hpp" #include "openvino/op/log.hpp" #include "openvino/opsets/opset6.hpp" #include "openvino/pass/pattern/op/wrap_type.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" #include "pruning.hpp" ov::pass::InitConstMask::InitConstMask(const ov::AxisSet& dims, @@ -43,7 +43,7 @@ ov::pass::InitConstMask::InitConstMask(const ov::AxisSet& dims, bool skip_dim_value = false; OPENVINO_SUPPRESS_DEPRECATED_START - ngraph::CoordinateTransform iter(shape, begin, end); + ov::CoordinateTransform iter(shape, begin, end); for (const Coordinate& coord : iter) { if (!condition(values.at(iter.index(coord)))) { skip_dim_value = true; diff --git a/src/common/offline_transformations/src/pruning/propagate_masks.cpp b/src/common/offline_transformations/src/pruning/propagate_masks.cpp index 3a820fd192a..b2ce77882d4 100644 --- a/src/common/offline_transformations/src/pruning/propagate_masks.cpp +++ b/src/common/offline_transformations/src/pruning/propagate_masks.cpp @@ -7,7 +7,6 @@ #include #include "mask_attribute.hpp" -#include "ngraph/coordinate_transform.hpp" #include "openvino/core/rt_info.hpp" #include "openvino/core/validation_util.hpp" #include "openvino/op/gelu.hpp" @@ -17,6 +16,7 @@ #include "openvino/op/util/pad_base.hpp" #include "openvino/opsets/opset10.hpp" #include "openvino/pass/pattern/op/wrap_type.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" #include "openvino/util/log.hpp" #include "pruning.hpp" @@ -1015,14 +1015,14 @@ struct ChannelsMap { * on unsquized_shape_dim dimension according to unsquized_shape shape. */ OPENVINO_SUPPRESS_DEPRECATED_START -static ngraph::CoordinateTransform get_channel_iter(const ov::Shape unsquized_shape, - const size_t unsquized_shape_dim, - const size_t channel) { +static ov::CoordinateTransform get_channel_iter(const ov::Shape unsquized_shape, + const size_t unsquized_shape_dim, + const size_t channel) { auto begin = ov::Coordinate(unsquized_shape.size(), 0); auto end = ov::Coordinate(unsquized_shape); begin[unsquized_shape_dim] = channel; end[unsquized_shape_dim] = channel + 1; - ngraph::CoordinateTransform iter(unsquized_shape, begin, end); + ov::CoordinateTransform iter(unsquized_shape, begin, end); return iter; } OPENVINO_SUPPRESS_DEPRECATED_END diff --git a/src/common/snippets/src/pass/fq_decomposition.cpp b/src/common/snippets/src/pass/fq_decomposition.cpp index 09166383dca..0f849ba1f06 100644 --- a/src/common/snippets/src/pass/fq_decomposition.cpp +++ b/src/common/snippets/src/pass/fq_decomposition.cpp @@ -6,13 +6,13 @@ #include -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "openvino/core/rt_info.hpp" #include "openvino/opsets/opset1.hpp" #include "openvino/pass/constant_folding.hpp" #include "openvino/pass/manager.hpp" #include "openvino/pass/pattern/op/wrap_type.hpp" #include "openvino/pass/validate.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" #include "openvino/reference/broadcast.hpp" #include "snippets/itt.hpp" #include "snippets/op/convert_saturation.hpp" @@ -208,9 +208,10 @@ bool ov::snippets::pass::FakeQuantizeDecomposition::getScalesAndShifts( auto broadcast_type = fq_node->get_auto_broadcast(); // We have two ways for computations of scales and shifts to avoid model compilation time growth - // because common function "ov::runtime::reference::autobroadcast_binop()" is expensive: + // because common function "ov::reference::autobroadcast_binop()" is expensive: // - A usual case (weights with the same shapes or scalars) - optimal calculations without large broadcasting - // - A rare case ("general broadcasting") - common computations using autobroadcast_binop() call with broadcasting support + // - A rare case ("general broadcasting") - common computations using autobroadcast_binop() call with broadcasting + // support // Calculations of input scales and shift: // - isc := (levels-1) / (ih - il) @@ -235,23 +236,35 @@ bool ov::snippets::pass::FakeQuantizeDecomposition::getScalesAndShifts( const auto input_size = ov::shape_size(scale_shape); isc.resize(input_size, 0); ish.resize(input_size, 0); - ngraph::runtime::reference::autobroadcast_binop(input_high.data(), input_low.data(), isc.data(), - input_high_shape, input_low_shape, broadcast_type, - [levels](float x, float y) -> float { return (levels - 1) / (x - y); }); - ngraph::runtime::reference::autobroadcast_binop(input_low.data(), isc.data(), ish.data(), - input_low_shape, scale_shape, broadcast_type, - [](float x, float y) -> float { return -x * y; }); + ov::reference::autobroadcast_binop(input_high.data(), + input_low.data(), + isc.data(), + input_high_shape, + input_low_shape, + broadcast_type, + [levels](float x, float y) -> float { + return (levels - 1) / (x - y); + }); + ov::reference::autobroadcast_binop(input_low.data(), + isc.data(), + ish.data(), + input_low_shape, + scale_shape, + broadcast_type, + [](float x, float y) -> float { + return -x * y; + }); auto broadcast = [](const std::vector& original_data, std::vector& out_data, const ov::Shape& original_shape, const ov::Shape& out_shape, size_t size) -> void { out_data.resize(size, 0); std::vector broadcast_axes(out_shape.size() - original_shape.size()); std::iota(broadcast_axes.begin(), broadcast_axes.end(), 0); - ngraph::runtime::reference::broadcast(reinterpret_cast(original_data.data()), - reinterpret_cast(out_data.data()), - original_shape, - out_shape, - broadcast_axes, - sizeof(float)); + ov::reference::broadcast(reinterpret_cast(original_data.data()), + reinterpret_cast(out_data.data()), + original_shape, + out_shape, + broadcast_axes, + sizeof(float)); }; broadcast(input_low, cl, input_low_shape, scale_shape, input_size); broadcast(input_high, ch, input_high_shape, scale_shape, input_size); @@ -276,9 +289,15 @@ bool ov::snippets::pass::FakeQuantizeDecomposition::getScalesAndShifts( PartialShape::broadcast_merge_into(scale_pshape, output_high_constant->get_output_partial_shape(0), broadcast_type); const auto output_size = ov::shape_size(scale_pshape.get_shape()); osc.resize(output_size, 0); - ngraph::runtime::reference::autobroadcast_binop(output_high.data(), output_low.data(), osc.data(), - output_high_shape, output_low_shape, broadcast_type, - [levels](float x, float y) -> float { return (x - y) / (levels - 1); }); + ov::reference::autobroadcast_binop(output_high.data(), + output_low.data(), + osc.data(), + output_high_shape, + output_low_shape, + broadcast_type, + [levels](float x, float y) -> float { + return (x - y) / (levels - 1); + }); osh = output_low; } diff --git a/src/common/transformations/src/transformations/common_optimizations/compress_float_constants.cpp b/src/common/transformations/src/transformations/common_optimizations/compress_float_constants.cpp index cddf2313ef0..2e234f25b43 100644 --- a/src/common/transformations/src/transformations/common_optimizations/compress_float_constants.cpp +++ b/src/common/transformations/src/transformations/common_optimizations/compress_float_constants.cpp @@ -96,7 +96,7 @@ ov::pass::CompressFloatConstantsImpl::CompressFloatConstantsImpl(bool postponed) if (size == 0) return false; auto num_out_of_range = - ngraph::runtime::reference::count_out_of_f16_range(const_node->get_data_ptr(), size); + ov::reference::count_out_of_f16_range(const_node->get_data_ptr(), size); // if more than 75% of a FP32 constant do not fit into FP16 keep in FP32 const float keep_threshold = 0.75f; @@ -113,7 +113,7 @@ ov::pass::CompressFloatConstantsImpl::CompressFloatConstantsImpl(bool postponed) auto* dst_data = const_cast(reinterpret_cast(compressed_const->get_data_ptr())); OPENVINO_ASSERT(dst_data); - ngraph::runtime::reference::convert_from_f32_to_f16_with_clamp(src_data, dst_data, size); + ov::reference::convert_from_f32_to_f16_with_clamp(src_data, dst_data, size); new_const = compressed_const; } } else if (c_type == ov::element::f64) { diff --git a/src/common/transformations/src/transformations/convert_precision.cpp b/src/common/transformations/src/transformations/convert_precision.cpp index e6b9ac7bb99..29ef79c3124 100644 --- a/src/common/transformations/src/transformations/convert_precision.cpp +++ b/src/common/transformations/src/transformations/convert_precision.cpp @@ -907,7 +907,7 @@ std::shared_ptr change_constant_precision change_constant_precision(src_data, dst_data, size); + ov::reference::convert(src_data, dst_data, size); return new_constant; } diff --git a/src/common/transformations/tests/offline_transformations/pruning_test.cpp b/src/common/transformations/tests/offline_transformations/pruning_test.cpp index 92b99842cdc..8cb95249a44 100644 --- a/src/common/transformations/tests/offline_transformations/pruning_test.cpp +++ b/src/common/transformations/tests/offline_transformations/pruning_test.cpp @@ -13,7 +13,6 @@ #include "common_test_utils/ov_test_utils.hpp" #include "inference_engine.hpp" #include "mask_attribute.hpp" -#include "ngraph/coordinate_transform.hpp" #include "openvino/core/model.hpp" #include "openvino/op/util/attr_types.hpp" #include "openvino/op/util/pad_base.hpp" @@ -22,6 +21,7 @@ #include "openvino/pass/manager.hpp" #include "openvino/pass/serialize.hpp" #include "openvino/pass/visualize_tree.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" #include "openvino/util/env_util.hpp" #include "transformations/init_node_info.hpp" @@ -52,7 +52,7 @@ Output create_constant_with_zeros(const Shape& shape, const Mask& mask) { coord_end[dim] = dim_value + 1; OPENVINO_SUPPRESS_DEPRECATED_START - ngraph::CoordinateTransform iter(shape, coord_begin, coord_end); + ov::CoordinateTransform iter(shape, coord_begin, coord_end); for (const Coordinate& coord : iter) { values[iter.index(coord)] = 0; } @@ -138,7 +138,7 @@ TEST(TransformationTests, InitMasksOutputChannel) { Shape weights_shape{6, 3, 3, 3}; std::vector values(shape_size(weights_shape), 1); OPENVINO_SUPPRESS_DEPRECATED_START - ngraph::CoordinateTransform iter(weights_shape, {0, 1, 0, 0}, {6, 2, 3, 3}); + ov::CoordinateTransform iter(weights_shape, {0, 1, 0, 0}, {6, 2, 3, 3}); for (const Coordinate& coord : iter) { values[iter.index(coord)] = 0; } diff --git a/src/core/reference/include/openvino/reference/abs.hpp b/src/core/reference/include/openvino/reference/abs.hpp index 22188e3ab60..d4163f3e884 100644 --- a/src/core/reference/include/openvino/reference/abs.hpp +++ b/src/core/reference/include/openvino/reference/abs.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template ::value, bool>::type = true> void abs(const T* arg, T* out, size_t count) { @@ -23,5 +22,4 @@ void abs(const T* arg, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/adaptive_avg_pool.hpp b/src/core/reference/include/openvino/reference/adaptive_avg_pool.hpp index a26f3e0ecb0..d8c6bf94430 100644 --- a/src/core/reference/include/openvino/reference/adaptive_avg_pool.hpp +++ b/src/core/reference/include/openvino/reference/adaptive_avg_pool.hpp @@ -11,8 +11,7 @@ #include "ngraph/axis_vector.hpp" #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace adaptive_pool { inline size_t window_start(size_t idx, size_t arg_shape, size_t out_shape) { @@ -130,5 +129,4 @@ void adaptive_avg_pool(const T* arg, T* out, const Shape& arg_shape, const Shape } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/adaptive_max_pool.hpp b/src/core/reference/include/openvino/reference/adaptive_max_pool.hpp index 44a8346c36e..9aa0c3afa2a 100644 --- a/src/core/reference/include/openvino/reference/adaptive_max_pool.hpp +++ b/src/core/reference/include/openvino/reference/adaptive_max_pool.hpp @@ -11,8 +11,7 @@ #include "ngraph/axis_vector.hpp" #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void adaptive_max_pool_1d(const T* arg, T* out, IT* indices, size_t h_in, size_t h_out) { @@ -126,5 +125,4 @@ void adaptive_max_pool(const T* arg, T* out, IT* selected_indices, const Shape& } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/add.hpp b/src/core/reference/include/openvino/reference/add.hpp index 081b702f073..85357de726d 100644 --- a/src/core/reference/include/openvino/reference/add.hpp +++ b/src/core/reference/include/openvino/reference/add.hpp @@ -6,11 +6,10 @@ #include -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape_util.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void add(const T* arg0, const T* arg1, T* out, size_t count) { @@ -31,5 +30,4 @@ void add(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/and.hpp b/src/core/reference/include/openvino/reference/and.hpp index 1e856826377..f1b6783b285 100644 --- a/src/core/reference/include/openvino/reference/and.hpp +++ b/src/core/reference/include/openvino/reference/and.hpp @@ -7,11 +7,10 @@ #include #include "ngraph/op/util/attr_types.hpp" -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void logical_and(const T* arg0, const T* arg1, T* out, size_t count) { @@ -32,5 +31,4 @@ void logical_and(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/atan2.hpp b/src/core/reference/include/openvino/reference/atan2.hpp index c844432ebfa..d16d48fae31 100644 --- a/src/core/reference/include/openvino/reference/atan2.hpp +++ b/src/core/reference/include/openvino/reference/atan2.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void atan2(const X* py, const Y* px, Z* pout, size_t count) { @@ -17,5 +16,4 @@ void atan2(const X* py, const Y* px, Z* pout, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/autobroadcast_binop.hpp b/src/core/reference/include/openvino/reference/autobroadcast_binop.hpp index f27f9b78ff0..0de0e66de9f 100644 --- a/src/core/reference/include/openvino/reference/autobroadcast_binop.hpp +++ b/src/core/reference/include/openvino/reference/autobroadcast_binop.hpp @@ -8,9 +8,9 @@ #include #include -#include "ngraph/coordinate_transform.hpp" #include "ngraph/op/util/attr_types.hpp" #include "ngraph/shape_util.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" namespace ov { namespace reference { @@ -44,7 +44,6 @@ inline void numpy_autobroadcast_binop(const T* arg0, const size_t axis, const size_t stride, Functor elementwise_functor) { - using ngraph::CoordinateIterator; for (CoordinateIterator it(output_shape), ite = CoordinateIterator::end();;) { for (size_t i = 0; i < stride; ++i) *out++ = elementwise_functor(arg0[i * A0], arg1[i * A1]); @@ -264,9 +263,9 @@ void autobroadcast_binop(const T* arg0, } NGRAPH_SUPPRESS_DEPRECATED_START - ngraph::CoordinateTransform arg0_transform(arg0_shape); - ngraph::CoordinateTransform arg1_transform(arg1_squeezed_shape); - ngraph::CoordinateTransform output_transform(arg0_shape); + CoordinateTransform arg0_transform(arg0_shape); + CoordinateTransform arg1_transform(arg1_squeezed_shape); + CoordinateTransform output_transform(arg0_shape); for (const Coordinate& output_coord : output_transform) { Coordinate arg1_coord = ngraph::reduce(output_coord, arg1_squeezed_axes, false); @@ -309,8 +308,6 @@ void autobroadcast_select(const U* arg0, const Shape& arg2_shape, const op::AutoBroadcastSpec& broadcast_spec, Functor elementwise_functor) { - using ngraph::CoordinateTransformBasic; - switch (broadcast_spec.m_type) { case op::AutoBroadcastType::NONE: for (size_t i = 0; i < shape_size(arg0_shape); i++) { diff --git a/src/core/reference/include/openvino/reference/avg_pool.hpp b/src/core/reference/include/openvino/reference/avg_pool.hpp index 42afecb6df8..bb7bd25d933 100644 --- a/src/core/reference/include/openvino/reference/avg_pool.hpp +++ b/src/core/reference/include/openvino/reference/avg_pool.hpp @@ -11,11 +11,10 @@ #include #include "ngraph/axis_vector.hpp" -#include "ngraph/coordinate_transform.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void avg_pool_backprop(const T* delta, @@ -231,5 +230,4 @@ void avg_pool(const T* arg, NGRAPH_SUPPRESS_DEPRECATED_END } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/batch_norm.hpp b/src/core/reference/include/openvino/reference/batch_norm.hpp index b32211b4261..15e10cd5c91 100644 --- a/src/core/reference/include/openvino/reference/batch_norm.hpp +++ b/src/core/reference/include/openvino/reference/batch_norm.hpp @@ -7,11 +7,10 @@ #include #include -#include "ngraph/coordinate_transform.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template static inline T norm(T val, T mean, T var, T eps) { @@ -46,5 +45,4 @@ void batch_norm_inference(float eps, NGRAPH_SUPPRESS_DEPRECATED_END } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/binary_convolution.hpp b/src/core/reference/include/openvino/reference/binary_convolution.hpp index 4e23fd4b797..bf3e16beae2 100644 --- a/src/core/reference/include/openvino/reference/binary_convolution.hpp +++ b/src/core/reference/include/openvino/reference/binary_convolution.hpp @@ -7,8 +7,7 @@ #include "ngraph/shape.hpp" #include "openvino/reference/convolution.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace details { inline uint8_t extract_bit(uint8_t val, uint8_t bit) { @@ -143,5 +142,4 @@ void binary_convolution(const T_IN* in, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/broadcast.hpp b/src/core/reference/include/openvino/reference/broadcast.hpp index 5afaa7a6a6c..abad1b8ce5e 100644 --- a/src/core/reference/include/openvino/reference/broadcast.hpp +++ b/src/core/reference/include/openvino/reference/broadcast.hpp @@ -7,8 +7,7 @@ #include "ngraph/axis_set.hpp" #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void broadcast(const char* arg, char* out, @@ -17,5 +16,4 @@ void broadcast(const char* arg, const AxisSet& broadcast_axes, size_t elem_size); } -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/bucketize.hpp b/src/core/reference/include/openvino/reference/bucketize.hpp index 8605d9e250c..2288d15388d 100644 --- a/src/core/reference/include/openvino/reference/bucketize.hpp +++ b/src/core/reference/include/openvino/reference/bucketize.hpp @@ -8,8 +8,7 @@ #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void bucketize(const T* data, @@ -40,7 +39,4 @@ void bucketize(const T* data, } } // namespace reference - -} // namespace runtime - -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/ceiling.hpp b/src/core/reference/include/openvino/reference/ceiling.hpp index a3d9bbd5d06..e6aafae44f3 100644 --- a/src/core/reference/include/openvino/reference/ceiling.hpp +++ b/src/core/reference/include/openvino/reference/ceiling.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void ceiling(const T* arg, T* out, size_t count) { @@ -17,5 +16,4 @@ void ceiling(const T* arg, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/clamp.hpp b/src/core/reference/include/openvino/reference/clamp.hpp index bcd4adc65e4..1370d28d6a8 100644 --- a/src/core/reference/include/openvino/reference/clamp.hpp +++ b/src/core/reference/include/openvino/reference/clamp.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void clamp(const T* arg, T* out, T min, T max, size_t count) { @@ -23,5 +22,4 @@ void clamp(const T* arg, T* out, T min, T max, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/concat.hpp b/src/core/reference/include/openvino/reference/concat.hpp index 7de016824f4..6d210a2244b 100644 --- a/src/core/reference/include/openvino/reference/concat.hpp +++ b/src/core/reference/include/openvino/reference/concat.hpp @@ -8,8 +8,7 @@ #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void concat(const std::vector& args, char* out, @@ -18,5 +17,4 @@ void concat(const std::vector& args, int64_t concatenation_axis, size_t elem_size); } -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/constant.hpp b/src/core/reference/include/openvino/reference/constant.hpp index 2de230e4931..2c0a6add560 100644 --- a/src/core/reference/include/openvino/reference/constant.hpp +++ b/src/core/reference/include/openvino/reference/constant.hpp @@ -6,8 +6,7 @@ #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void constant(const T* arg0, T* out, size_t count) { @@ -16,5 +15,4 @@ void constant(const T* arg0, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/convert.hpp b/src/core/reference/include/openvino/reference/convert.hpp index a05b34d50a0..d95ce275328 100644 --- a/src/core/reference/include/openvino/reference/convert.hpp +++ b/src/core/reference/include/openvino/reference/convert.hpp @@ -9,8 +9,7 @@ #include "ngraph/type/element_type.hpp" #include "ngraph/type/float16.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace detail { inline void set_u1(uint8_t* buf, size_t idx, uint8_t val) { @@ -130,5 +129,4 @@ typename std::enable_if::value>::type convert(const TI* a } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/convert_color_nv12.hpp b/src/core/reference/include/openvino/reference/convert_color_nv12.hpp index 9814d4389e4..4e8db24eb29 100644 --- a/src/core/reference/include/openvino/reference/convert_color_nv12.hpp +++ b/src/core/reference/include/openvino/reference/convert_color_nv12.hpp @@ -10,8 +10,7 @@ #include "openvino/op/util/convert_color_i420_base.hpp" #include "openvino/op/util/convert_color_nv12_base.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template @@ -206,5 +205,4 @@ inline bool color_convert_i420(const std::shared_ptr& op, OPENVINO_SUPPRESS_DEPRECATED_END } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/convolution.hpp b/src/core/reference/include/openvino/reference/convolution.hpp index bbf463d3e8b..6a26372befe 100644 --- a/src/core/reference/include/openvino/reference/convolution.hpp +++ b/src/core/reference/include/openvino/reference/convolution.hpp @@ -8,8 +8,7 @@ #include "ngraph/util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace { @@ -407,8 +406,7 @@ void convolution(const T* in, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov // can't be removed currently due to arm-plugin dependency #include "openvino/reference/convolution_backprop_data.hpp" diff --git a/src/core/reference/include/openvino/reference/convolution_backprop_data.hpp b/src/core/reference/include/openvino/reference/convolution_backprop_data.hpp index d1ded434b6d..05d6e8d559a 100644 --- a/src/core/reference/include/openvino/reference/convolution_backprop_data.hpp +++ b/src/core/reference/include/openvino/reference/convolution_backprop_data.hpp @@ -14,8 +14,7 @@ #include "openvino/reference/convolution.hpp" #include "openvino/reference/reverse.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace { constexpr size_t filter_input_ch_axis = 0; @@ -395,5 +394,4 @@ void convolution_backprop_in(const T* delta_in, output_padding); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/copy.hpp b/src/core/reference/include/openvino/reference/copy.hpp index b11ae659da1..3e3d4910584 100644 --- a/src/core/reference/include/openvino/reference/copy.hpp +++ b/src/core/reference/include/openvino/reference/copy.hpp @@ -6,8 +6,7 @@ #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void copy(const T* arg, T* out, size_t count) { @@ -16,5 +15,4 @@ void copy(const T* arg, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/ctc_greedy_decoder.hpp b/src/core/reference/include/openvino/reference/ctc_greedy_decoder.hpp index bed3122ddb8..1cab6887744 100644 --- a/src/core/reference/include/openvino/reference/ctc_greedy_decoder.hpp +++ b/src/core/reference/include/openvino/reference/ctc_greedy_decoder.hpp @@ -8,9 +8,9 @@ #include #include -#include "ngraph/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +#include "openvino/reference/utils/coordinate_transform.hpp" + +namespace ov { namespace reference { template void ctc_greedy_decoder(const T* data, @@ -20,7 +20,7 @@ void ctc_greedy_decoder(const T* data, const Shape& sequence_masks_shape, const Shape& out_shape, const bool ctc_merge_repeated) { - NGRAPH_SUPPRESS_DEPRECATED_START + OPENVINO_SUPPRESS_DEPRECATED_START const auto max_seq_len = data_shape[0]; const auto batch_size = data_shape[1]; const auto class_count = data_shape[2]; @@ -59,8 +59,7 @@ void ctc_greedy_decoder(const T* data, } } std::copy(tmp_out.begin(), tmp_out.end(), out); - NGRAPH_SUPPRESS_DEPRECATED_END + OPENVINO_SUPPRESS_DEPRECATED_END } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/ctc_greedy_decoder_seq_len.hpp b/src/core/reference/include/openvino/reference/ctc_greedy_decoder_seq_len.hpp index 200e3e15b90..bf3e28e339d 100644 --- a/src/core/reference/include/openvino/reference/ctc_greedy_decoder_seq_len.hpp +++ b/src/core/reference/include/openvino/reference/ctc_greedy_decoder_seq_len.hpp @@ -8,9 +8,8 @@ #include #include -#include "ngraph/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +#include "openvino/reference/utils/coordinate_transform.hpp" +namespace ov { namespace reference { template void ctc_greedy_decoder_seq_len(const TF* data, @@ -44,5 +43,4 @@ void ctc_greedy_decoder_seq_len(const TF* data, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/ctc_loss.hpp b/src/core/reference/include/openvino/reference/ctc_loss.hpp index dc4fc81c70e..03fae356ad6 100644 --- a/src/core/reference/include/openvino/reference/ctc_loss.hpp +++ b/src/core/reference/include/openvino/reference/ctc_loss.hpp @@ -8,8 +8,7 @@ #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void CTCLoss(const T* logits, @@ -162,5 +161,4 @@ void CTCLoss(const T* logits, } // for (size_t b = 0; b < batchNum; b++) } // CTCLoss } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/cum_sum.hpp b/src/core/reference/include/openvino/reference/cum_sum.hpp index 636189a8204..df517f0f7b7 100644 --- a/src/core/reference/include/openvino/reference/cum_sum.hpp +++ b/src/core/reference/include/openvino/reference/cum_sum.hpp @@ -6,8 +6,7 @@ #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template @@ -42,5 +41,4 @@ void cumsum(const T* arg, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/deformable_convolution.hpp b/src/core/reference/include/openvino/reference/deformable_convolution.hpp index 536a2d9ffc6..e3b553352c2 100644 --- a/src/core/reference/include/openvino/reference/deformable_convolution.hpp +++ b/src/core/reference/include/openvino/reference/deformable_convolution.hpp @@ -6,8 +6,7 @@ #include "openvino/reference/convolution.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace def_conv_impl { inline void validate_deformable_convolution_params(const Shape& in_shape, @@ -316,5 +315,4 @@ void deformable_convolution(const T* in, bilinear_interpolation_pad); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/deformable_psroi_pooling.hpp b/src/core/reference/include/openvino/reference/deformable_psroi_pooling.hpp index 1f5348946dc..5c1d5fed7df 100644 --- a/src/core/reference/include/openvino/reference/deformable_psroi_pooling.hpp +++ b/src/core/reference/include/openvino/reference/deformable_psroi_pooling.hpp @@ -16,8 +16,7 @@ #include "clamp.hpp" #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void deformable_psroi_pooling(const T* data_input, @@ -172,5 +171,4 @@ void deformable_psroi_pooling(const T* data_input, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/depth_to_space.hpp b/src/core/reference/include/openvino/reference/depth_to_space.hpp index c79cbd69242..d895354aad0 100644 --- a/src/core/reference/include/openvino/reference/depth_to_space.hpp +++ b/src/core/reference/include/openvino/reference/depth_to_space.hpp @@ -7,16 +7,14 @@ #include "ngraph/op/depth_to_space.hpp" #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void depth_to_space(const char* const in, const Shape& in_shape, char* const out, const Shape& out_shape, const size_t block_size, - const op::DepthToSpace::DepthToSpaceMode mode, + const op::v0::DepthToSpace::DepthToSpaceMode mode, const size_t elem_size); } -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/detection_output.hpp b/src/core/reference/include/openvino/reference/detection_output.hpp index 76b7a6945f0..b55ad70916d 100644 --- a/src/core/reference/include/openvino/reference/detection_output.hpp +++ b/src/core/reference/include/openvino/reference/detection_output.hpp @@ -13,8 +13,7 @@ #include "ngraph/op/util/detection_output_base.hpp" #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { enum { idxLocation, idxConfidence, idxPriors, idxArmConfidence, idxArmLocation, numInputs }; @@ -588,5 +587,4 @@ public: } }; } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/divide.hpp b/src/core/reference/include/openvino/reference/divide.hpp index e126c93bec9..858d8f4f696 100644 --- a/src/core/reference/include/openvino/reference/divide.hpp +++ b/src/core/reference/include/openvino/reference/divide.hpp @@ -9,13 +9,12 @@ #include #include "ngraph/op/util/attr_types.hpp" -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape.hpp" #include "ngraph/type/bfloat16.hpp" #include "ngraph/type/float16.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { // NOTE: Execution throws `std::domain_error` if either a non-integral value or an // out-of-bounds value is detected in the input tensor. @@ -110,5 +109,4 @@ divide(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/einsum.hpp b/src/core/reference/include/openvino/reference/einsum.hpp index 99ffcc74f4c..667a923739c 100644 --- a/src/core/reference/include/openvino/reference/einsum.hpp +++ b/src/core/reference/include/openvino/reference/einsum.hpp @@ -9,10 +9,8 @@ #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void einsum(const HostTensorVector& outputs, const HostTensorVector& inputs, const std::string& equation); } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/elu.hpp b/src/core/reference/include/openvino/reference/elu.hpp index 6f1e10942b9..6ae9d6467aa 100644 --- a/src/core/reference/include/openvino/reference/elu.hpp +++ b/src/core/reference/include/openvino/reference/elu.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void elu(const T* arg, T* out, size_t count, double alpha) { @@ -17,5 +16,4 @@ void elu(const T* arg, T* out, size_t count, double alpha) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/embedding_bag_offsets_sum.hpp b/src/core/reference/include/openvino/reference/embedding_bag_offsets_sum.hpp index ca36a096b61..d6b03e1fbc5 100644 --- a/src/core/reference/include/openvino/reference/embedding_bag_offsets_sum.hpp +++ b/src/core/reference/include/openvino/reference/embedding_bag_offsets_sum.hpp @@ -6,8 +6,7 @@ #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void embeddingBagOffsetsSum(const T* emb_table, @@ -93,5 +92,4 @@ void embeddingBagOffsetsSum(const T* emb_table, } // embeddingBagOffsetsSum } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/embedding_bag_packed_sum.hpp b/src/core/reference/include/openvino/reference/embedding_bag_packed_sum.hpp index ea4cc48cefc..f16b2355b94 100644 --- a/src/core/reference/include/openvino/reference/embedding_bag_packed_sum.hpp +++ b/src/core/reference/include/openvino/reference/embedding_bag_packed_sum.hpp @@ -6,8 +6,7 @@ #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void embeddingBagPackedSum(const T* emb_table, @@ -47,5 +46,4 @@ void embeddingBagPackedSum(const T* emb_table, } // embeddingBagPackedSum } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/embedding_segments_sum.hpp b/src/core/reference/include/openvino/reference/embedding_segments_sum.hpp index 8b4a833bf66..f11947fac9b 100644 --- a/src/core/reference/include/openvino/reference/embedding_segments_sum.hpp +++ b/src/core/reference/include/openvino/reference/embedding_segments_sum.hpp @@ -6,8 +6,7 @@ #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void embeddingSegmentsSum(const T* embTable, @@ -72,5 +71,4 @@ void embeddingSegmentsSum(const T* embTable, } // embeddingSegmentsSum } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/equal.hpp b/src/core/reference/include/openvino/reference/equal.hpp index 58b6c39cf87..62554f9b4a2 100644 --- a/src/core/reference/include/openvino/reference/equal.hpp +++ b/src/core/reference/include/openvino/reference/equal.hpp @@ -12,11 +12,10 @@ #include #include "ngraph/op/util/attr_types.hpp" -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void equal(const T* arg0, @@ -41,8 +40,7 @@ void equal(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov #if defined(__GNUC__) # pragma GCC diagnostic pop diff --git a/src/core/reference/include/openvino/reference/erf.hpp b/src/core/reference/include/openvino/reference/erf.hpp index 331cc4ab87e..09ff245dd49 100644 --- a/src/core/reference/include/openvino/reference/erf.hpp +++ b/src/core/reference/include/openvino/reference/erf.hpp @@ -11,8 +11,7 @@ #include "ngraph/type/bfloat16.hpp" #include "ngraph/type/float16.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template ::value, bool>::type = true> void erf(const T* arg, T* out, size_t count) { @@ -28,5 +27,4 @@ void erf(const T* arg, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/exp.hpp b/src/core/reference/include/openvino/reference/exp.hpp index 74b182c64e0..1f7bf80e2c3 100644 --- a/src/core/reference/include/openvino/reference/exp.hpp +++ b/src/core/reference/include/openvino/reference/exp.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void exp(const T* arg, T* out, size_t count) { @@ -17,5 +16,4 @@ void exp(const T* arg, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/experimental_detectron_detection_output.hpp b/src/core/reference/include/openvino/reference/experimental_detectron_detection_output.hpp index b2147fe9c46..c2ba17605e6 100644 --- a/src/core/reference/include/openvino/reference/experimental_detectron_detection_output.hpp +++ b/src/core/reference/include/openvino/reference/experimental_detectron_detection_output.hpp @@ -27,8 +27,7 @@ #include "ngraph/ops.hpp" #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void experimental_detectron_detection_output(const float* input_rois, const float* input_deltas, @@ -50,5 +49,4 @@ void experimental_detectron_detection_output_postprocessing(void* pboxes, const Shape& output_classes_shape, const Shape& output_scores_shape); } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/experimental_detectron_prior_grid_generator.hpp b/src/core/reference/include/openvino/reference/experimental_detectron_prior_grid_generator.hpp index 1d0ecb7ab8b..565baefb5e1 100644 --- a/src/core/reference/include/openvino/reference/experimental_detectron_prior_grid_generator.hpp +++ b/src/core/reference/include/openvino/reference/experimental_detectron_prior_grid_generator.hpp @@ -26,8 +26,7 @@ #include "ngraph/ops.hpp" #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void experimental_detectron_prior_grid_generator(const T* priors, @@ -58,5 +57,4 @@ void experimental_detectron_prior_grid_generator(const T* priors, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/experimental_detectron_proposal_single_image.hpp b/src/core/reference/include/openvino/reference/experimental_detectron_proposal_single_image.hpp index a46a1303d53..4e890c051e3 100644 --- a/src/core/reference/include/openvino/reference/experimental_detectron_proposal_single_image.hpp +++ b/src/core/reference/include/openvino/reference/experimental_detectron_proposal_single_image.hpp @@ -15,8 +15,7 @@ #include "ngraph/ops.hpp" #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void experimental_detectron_proposals_single_image( const float* im_info, @@ -39,5 +38,4 @@ void experimental_detectron_proposals_single_image_postprocessing(void* prois, const Shape& output_rois_shape, const Shape& output_scores_shape); } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/experimental_detectron_roi_feature_extractor.hpp b/src/core/reference/include/openvino/reference/experimental_detectron_roi_feature_extractor.hpp index 3997c7f73b7..df8edf00986 100644 --- a/src/core/reference/include/openvino/reference/experimental_detectron_roi_feature_extractor.hpp +++ b/src/core/reference/include/openvino/reference/experimental_detectron_roi_feature_extractor.hpp @@ -14,8 +14,7 @@ #include "ngraph/ops.hpp" #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void experimental_detectron_roi_feature_extractor( const std::vector>& inputs, @@ -32,5 +31,4 @@ void experimental_detectron_roi_feature_extractor_postprocessing(void* prois_fea const Shape& output_roi_features_shape, const Shape& output_rois_shape); } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/experimental_detectron_topk_rois.hpp b/src/core/reference/include/openvino/reference/experimental_detectron_topk_rois.hpp index c2ca9cd0b28..8f29fc33161 100644 --- a/src/core/reference/include/openvino/reference/experimental_detectron_topk_rois.hpp +++ b/src/core/reference/include/openvino/reference/experimental_detectron_topk_rois.hpp @@ -15,8 +15,7 @@ #include "ngraph/ops.hpp" #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void experimental_detectron_topk_rois(const T* input_rois, @@ -43,5 +42,4 @@ void experimental_detectron_topk_rois(const T* input_rois, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/extract_image_patches.hpp b/src/core/reference/include/openvino/reference/extract_image_patches.hpp index 0d1f748b7e3..c6130c38906 100644 --- a/src/core/reference/include/openvino/reference/extract_image_patches.hpp +++ b/src/core/reference/include/openvino/reference/extract_image_patches.hpp @@ -6,11 +6,10 @@ #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template -void extract_image_patches(const std::shared_ptr extImgPatches, +void extract_image_patches(const std::shared_ptr extImgPatches, const T* input, T* out, const Shape& inShape, @@ -115,5 +114,4 @@ void extract_image_patches(const std::shared_ptr extImg } // extractImagePatches } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/eye.hpp b/src/core/reference/include/openvino/reference/eye.hpp index d16821ee994..328c7f942a2 100644 --- a/src/core/reference/include/openvino/reference/eye.hpp +++ b/src/core/reference/include/openvino/reference/eye.hpp @@ -9,8 +9,7 @@ #include "ngraph/shape.hpp" #include "utils/span.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void eye(T* data, const Shape& out_shape, const int64_t diagonal_index) { @@ -37,5 +36,4 @@ void eye(T* data, const Shape& out_shape, const int64_t diagonal_index) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/fake_quantize.hpp b/src/core/reference/include/openvino/reference/fake_quantize.hpp index cf98032f4c1..a9122ede16e 100644 --- a/src/core/reference/include/openvino/reference/fake_quantize.hpp +++ b/src/core/reference/include/openvino/reference/fake_quantize.hpp @@ -12,13 +12,12 @@ #include #include "ngraph/check.hpp" -#include "ngraph/coordinate_transform.hpp" #include "ngraph/op/util/attr_types.hpp" #include "ngraph/shape.hpp" #include "ngraph/shape_util.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace fake_quantize_details { template @@ -158,11 +157,11 @@ void fake_quantize(const T* const arg, for (const Coordinate& output_coord : output_transform) { OPENVINO_SUPPRESS_DEPRECATED_START - const Coordinate arg0_coord = reduce(output_coord, arg0_squeezed_axes, false); - const Coordinate arg1_coord = reduce(output_coord, arg1_squeezed_axes, false); - const Coordinate arg2_coord = reduce(output_coord, arg2_squeezed_axes, false); - const Coordinate arg3_coord = reduce(output_coord, arg3_squeezed_axes, false); - const Coordinate arg4_coord = reduce(output_coord, arg4_squeezed_axes, false); + const Coordinate arg0_coord = ngraph::reduce(output_coord, arg0_squeezed_axes, false); + const Coordinate arg1_coord = ngraph::reduce(output_coord, arg1_squeezed_axes, false); + const Coordinate arg2_coord = ngraph::reduce(output_coord, arg2_squeezed_axes, false); + const Coordinate arg3_coord = ngraph::reduce(output_coord, arg3_squeezed_axes, false); + const Coordinate arg4_coord = ngraph::reduce(output_coord, arg4_squeezed_axes, false); OPENVINO_SUPPRESS_DEPRECATED_END const size_t arg0_idx = @@ -187,5 +186,4 @@ void fake_quantize(const T* const arg, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/fft.hpp b/src/core/reference/include/openvino/reference/fft.hpp index 44677fc2176..f35ef8ce79b 100644 --- a/src/core/reference/include/openvino/reference/fft.hpp +++ b/src/core/reference/include/openvino/reference/fft.hpp @@ -31,8 +31,7 @@ #include "ngraph/ops.hpp" #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { enum class FFTKind { Forward, Inverse }; @@ -52,5 +51,4 @@ std::vector canonicalize_axes(const int64_t* axes_data, const Shape& axes_data_shape, int64_t complex_data_rank); } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/floor.hpp b/src/core/reference/include/openvino/reference/floor.hpp index 5ef7faa36d3..d7fca06c5f3 100644 --- a/src/core/reference/include/openvino/reference/floor.hpp +++ b/src/core/reference/include/openvino/reference/floor.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void floor(const T* arg, T* out, size_t count) { @@ -17,5 +16,4 @@ void floor(const T* arg, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/floor_mod.hpp b/src/core/reference/include/openvino/reference/floor_mod.hpp index edd1c164504..09add88410d 100644 --- a/src/core/reference/include/openvino/reference/floor_mod.hpp +++ b/src/core/reference/include/openvino/reference/floor_mod.hpp @@ -7,11 +7,10 @@ #include #include -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape_util.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void floor_mod(const T* arg0, @@ -28,5 +27,4 @@ void floor_mod(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/function.hpp b/src/core/reference/include/openvino/reference/function.hpp index 628241e2918..575821e81b4 100644 --- a/src/core/reference/include/openvino/reference/function.hpp +++ b/src/core/reference/include/openvino/reference/function.hpp @@ -8,12 +8,10 @@ #include #include -#include "ngraph/function.hpp" +#include "openvino/core/model.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { -void function(const std::shared_ptr& function, const HostTensorVector& inputs, HostTensorVector& outputs); +void function(const std::shared_ptr& function, const HostTensorVector& inputs, HostTensorVector& outputs); } -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/gather.hpp b/src/core/reference/include/openvino/reference/gather.hpp index 82a7fb50188..30a52889a7b 100644 --- a/src/core/reference/include/openvino/reference/gather.hpp +++ b/src/core/reference/include/openvino/reference/gather.hpp @@ -9,8 +9,7 @@ #include "ngraph/shape.hpp" #include "utils/span.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void gather(const T* const data, @@ -57,5 +56,4 @@ void gather(const T* const data, } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/gather_elements.hpp b/src/core/reference/include/openvino/reference/gather_elements.hpp index 43105f74638..0f269123ec8 100644 --- a/src/core/reference/include/openvino/reference/gather_elements.hpp +++ b/src/core/reference/include/openvino/reference/gather_elements.hpp @@ -4,11 +4,9 @@ #pragma once -#include "ngraph/coordinate_index.hpp" -#include "ngraph/coordinate_transform.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void gather_elements(const T* data, @@ -109,5 +107,4 @@ void gather_elements(const T* data, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/gather_nd.hpp b/src/core/reference/include/openvino/reference/gather_nd.hpp index 0bae63818ff..6ca656b66a7 100644 --- a/src/core/reference/include/openvino/reference/gather_nd.hpp +++ b/src/core/reference/include/openvino/reference/gather_nd.hpp @@ -8,11 +8,10 @@ #include #include -#include "ngraph/coordinate_transform.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" #include "utils/span.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace details { template @@ -106,5 +105,4 @@ void gather_nd(const T* const params, } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/gather_tree.hpp b/src/core/reference/include/openvino/reference/gather_tree.hpp index 7f9ee725a83..5ac49c4c337 100644 --- a/src/core/reference/include/openvino/reference/gather_tree.hpp +++ b/src/core/reference/include/openvino/reference/gather_tree.hpp @@ -7,8 +7,7 @@ #include "ngraph/shape.hpp" #include "ngraph/type/element_type.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void gather_tree(const char* step_ids, const char* parent_ids, @@ -21,5 +20,4 @@ void gather_tree(const char* step_ids, const Shape& end_token_shape, const element::Type& type); } -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/gelu.hpp b/src/core/reference/include/openvino/reference/gelu.hpp index c361c981319..d67bcd8827d 100644 --- a/src/core/reference/include/openvino/reference/gelu.hpp +++ b/src/core/reference/include/openvino/reference/gelu.hpp @@ -8,8 +8,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void gelu(const T* arg, T* out, op::GeluApproximationMode mode, size_t count) { @@ -27,5 +26,4 @@ void gelu(const T* arg, T* out, op::GeluApproximationMode mode, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/generate_proposal.hpp b/src/core/reference/include/openvino/reference/generate_proposal.hpp index e418779de48..ae29efa0cc3 100644 --- a/src/core/reference/include/openvino/reference/generate_proposal.hpp +++ b/src/core/reference/include/openvino/reference/generate_proposal.hpp @@ -15,8 +15,7 @@ #include "ngraph/ops.hpp" #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void generate_proposals(const std::vector& im_info, const std::vector& anchors, @@ -43,5 +42,4 @@ void generate_proposals_postprocessing(void* prois, const Shape& output_scores_shape); } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/greater.hpp b/src/core/reference/include/openvino/reference/greater.hpp index a951bcb9356..41128fc1c5d 100644 --- a/src/core/reference/include/openvino/reference/greater.hpp +++ b/src/core/reference/include/openvino/reference/greater.hpp @@ -7,11 +7,10 @@ #include #include "ngraph/op/util/attr_types.hpp" -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void greater(const T* arg0, @@ -36,5 +35,4 @@ void greater(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/greater_eq.hpp b/src/core/reference/include/openvino/reference/greater_eq.hpp index 0c3a884f598..5072604a413 100644 --- a/src/core/reference/include/openvino/reference/greater_eq.hpp +++ b/src/core/reference/include/openvino/reference/greater_eq.hpp @@ -7,11 +7,10 @@ #include #include "ngraph/op/util/attr_types.hpp" -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void greater_eq(const T* arg0, @@ -36,5 +35,4 @@ void greater_eq(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/grid_sample.hpp b/src/core/reference/include/openvino/reference/grid_sample.hpp index ed3afda4601..9ad50767dc2 100644 --- a/src/core/reference/include/openvino/reference/grid_sample.hpp +++ b/src/core/reference/include/openvino/reference/grid_sample.hpp @@ -13,8 +13,7 @@ #include "ngraph/shape.hpp" #include "openvino/op/grid_sample.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace { @@ -295,5 +294,4 @@ void grid_sample(DATA_ET* output, std::fesetround(prev_rounding_mode); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/grn.hpp b/src/core/reference/include/openvino/reference/grn.hpp index 731d0af38cb..e05962e6154 100644 --- a/src/core/reference/include/openvino/reference/grn.hpp +++ b/src/core/reference/include/openvino/reference/grn.hpp @@ -6,13 +6,11 @@ #include "openvino/reference/normalize_l2.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void grn(const T* data, T* out, float bias, const Shape& data_shape) { normalize_l2(data, out, data_shape, {1}, bias, op::EpsMode::ADD); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/group_convolution.hpp b/src/core/reference/include/openvino/reference/group_convolution.hpp index d819bb17240..0ae26e696b6 100644 --- a/src/core/reference/include/openvino/reference/group_convolution.hpp +++ b/src/core/reference/include/openvino/reference/group_convolution.hpp @@ -16,8 +16,7 @@ constexpr size_t out_batch_axis = 0; constexpr size_t out_channel_axis = 1; } // namespace -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void validate_group_convolution_parameters(const Shape& in_shape, const Shape& f_shape, @@ -72,16 +71,16 @@ void group_convolution(const INPUT* in, for (size_t batch_idx = 0; batch_idx < in_shape[in_batch_axis]; ++batch_idx) { group_filter = f; for (size_t group_idx = 0; group_idx < group_count; ++group_idx) { - runtime::reference::convolution(group_batch, - group_filter, - group_out, - group_batch_shape, - group_filter_shape, - group_out_shape, - strides, - dilation, - pads_begin, - pads_end); + reference::convolution(group_batch, + group_filter, + group_out, + group_batch_shape, + group_filter_shape, + group_out_shape, + strides, + dilation, + pads_begin, + pads_end); group_batch += group_batch_size; group_filter += group_filter_size; group_out += group_out_size; @@ -89,5 +88,4 @@ void group_convolution(const INPUT* in, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/group_convolution_backprop_data.hpp b/src/core/reference/include/openvino/reference/group_convolution_backprop_data.hpp index f57c18b34e9..d64c63734a1 100644 --- a/src/core/reference/include/openvino/reference/group_convolution_backprop_data.hpp +++ b/src/core/reference/include/openvino/reference/group_convolution_backprop_data.hpp @@ -7,8 +7,7 @@ #include "ngraph/util.hpp" #include "openvino/reference/group_convolution.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void infer_backward_conv_output_shape(const Shape& in_spatial_shape, @@ -80,18 +79,18 @@ void group_convolution_backprop_data(const T* in, for (size_t batch_idx = 0; batch_idx < in_shape[in_batch_axis]; ++batch_idx) { group_filter = f; for (size_t group_idx = 0; group_idx < group_count; ++group_idx) { - runtime::reference::convolution_backprop_in(group_batch, - group_filter, - group_out, - group_batch_shape, - group_filter_shape, - group_out_shape, - in_dilation, - dilation, - pads_begin, - pads_end, - strides, - output_padding); + reference::convolution_backprop_in(group_batch, + group_filter, + group_out, + group_batch_shape, + group_filter_shape, + group_out_shape, + in_dilation, + dilation, + pads_begin, + pads_end, + strides, + output_padding); group_batch += group_batch_size; group_filter += group_filter_size; group_out += group_out_size; @@ -129,5 +128,4 @@ void group_convolution_backprop_data(const INPUT* in, } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/group_normalization.hpp b/src/core/reference/include/openvino/reference/group_normalization.hpp index 542facf2a73..35a215b7123 100644 --- a/src/core/reference/include/openvino/reference/group_normalization.hpp +++ b/src/core/reference/include/openvino/reference/group_normalization.hpp @@ -23,7 +23,6 @@ void group_normalization(const T* const data, const size_t num_groups, const double epsilon) { using namespace std; - using namespace ngraph::runtime::reference; const auto num_batches = data_shape[0]; const auto num_channels = data_shape[1]; diff --git a/src/core/reference/include/openvino/reference/gru_cell.hpp b/src/core/reference/include/openvino/reference/gru_cell.hpp index da6042eccdb..9211650b757 100644 --- a/src/core/reference/include/openvino/reference/gru_cell.hpp +++ b/src/core/reference/include/openvino/reference/gru_cell.hpp @@ -16,8 +16,7 @@ #include "openvino/reference/subtract.hpp" #include "openvino/reference/tanh.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void gru_cell(const T* X, @@ -216,5 +215,4 @@ void gru_cell(const T* X, reference::add(mul1.data(), mul2.data(), dst_data, gate_shape, gate_shape, op::AutoBroadcastType::NUMPY); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/hard_sigmoid.hpp b/src/core/reference/include/openvino/reference/hard_sigmoid.hpp index e0173495343..4dd92870791 100644 --- a/src/core/reference/include/openvino/reference/hard_sigmoid.hpp +++ b/src/core/reference/include/openvino/reference/hard_sigmoid.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void hard_sigmoid(const T* arg, const T alpha, const T beta, T* out, size_t count) { @@ -17,5 +16,4 @@ void hard_sigmoid(const T* arg, const T alpha, const T beta, T* out, size_t coun } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/helpers.hpp b/src/core/reference/include/openvino/reference/helpers.hpp index 317e9b7eb56..2f2cfb3807e 100644 --- a/src/core/reference/include/openvino/reference/helpers.hpp +++ b/src/core/reference/include/openvino/reference/helpers.hpp @@ -4,8 +4,7 @@ #pragma once -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template struct widen { @@ -22,5 +21,4 @@ struct widen { using type = long double; }; } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/hsigmoid.hpp b/src/core/reference/include/openvino/reference/hsigmoid.hpp index 8208f462e6c..069a12257e4 100644 --- a/src/core/reference/include/openvino/reference/hsigmoid.hpp +++ b/src/core/reference/include/openvino/reference/hsigmoid.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void hsigmoid(const T* arg, T* out, size_t count) { @@ -17,5 +16,4 @@ void hsigmoid(const T* arg, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/hswish.hpp b/src/core/reference/include/openvino/reference/hswish.hpp index 7d1bf5449a1..65a0ca846c1 100644 --- a/src/core/reference/include/openvino/reference/hswish.hpp +++ b/src/core/reference/include/openvino/reference/hswish.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void hswish(const T* arg, T* out, size_t count) { @@ -17,5 +16,4 @@ void hswish(const T* arg, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/if.hpp b/src/core/reference/include/openvino/reference/if.hpp index 28aae70ff8c..aaa47d0624b 100644 --- a/src/core/reference/include/openvino/reference/if.hpp +++ b/src/core/reference/include/openvino/reference/if.hpp @@ -6,16 +6,14 @@ #include -#include "ngraph/op/util/multi_subgraph_base.hpp" +#include "openvino/op/util/multi_subgraph_base.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { -void if_reference(const std::vector>& body, - const std::vector& out_descs, - const std::vector& input_descs, +void if_reference(const std::vector>& body, + const std::vector& out_descs, + const std::vector& input_descs, const HostTensorVector& out, const HostTensorVector& args); } -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/interpolate.hpp b/src/core/reference/include/openvino/reference/interpolate.hpp index c2eb4344ede..10b6a466f22 100644 --- a/src/core/reference/include/openvino/reference/interpolate.hpp +++ b/src/core/reference/include/openvino/reference/interpolate.hpp @@ -13,13 +13,12 @@ #include #include "interpolate_pil.hpp" -#include "ngraph/coordinate_transform.hpp" #include "ngraph/op/interpolate.hpp" #include "ngraph/shape_util.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" #include "transpose.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { using Nearest_mode = ngraph::op::v4::Interpolate::NearestMode; using Transform_mode = ngraph::op::v4::Interpolate::CoordinateTransformMode; @@ -831,5 +830,4 @@ void interpolate(T* input_data, evaluator(reinterpret_cast(padded_data_ptr), padded_input_shape, scales, axes, out, out_shape); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/interpolate_pil.hpp b/src/core/reference/include/openvino/reference/interpolate_pil.hpp index 93a2b9776f5..66a40c8f88c 100644 --- a/src/core/reference/include/openvino/reference/interpolate_pil.hpp +++ b/src/core/reference/include/openvino/reference/interpolate_pil.hpp @@ -44,8 +44,7 @@ #include "ngraph/op/interpolate.hpp" #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace interpolate_pil { @@ -316,5 +315,4 @@ void imaging_resample_inner(const T* im_in, } // namespace interpolate_pil } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/irdft.hpp b/src/core/reference/include/openvino/reference/irdft.hpp index 29e3bc22030..a32c20e9765 100644 --- a/src/core/reference/include/openvino/reference/irdft.hpp +++ b/src/core/reference/include/openvino/reference/irdft.hpp @@ -8,8 +8,7 @@ #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void irdft(const std::vector& input_data, const Shape& input_data_shape, @@ -19,5 +18,4 @@ void irdft(const std::vector& input_data, const Shape& irdft_output_shape, const int64_t last_signal_size); } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/is_finite.hpp b/src/core/reference/include/openvino/reference/is_finite.hpp index 19f6008c317..21677d0f9f9 100644 --- a/src/core/reference/include/openvino/reference/is_finite.hpp +++ b/src/core/reference/include/openvino/reference/is_finite.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template typename std::enable_if::value, void>::type is_finite(const T* input, @@ -28,5 +27,4 @@ typename std::enable_if::value, void>::type is_finite(const T* } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/is_inf.hpp b/src/core/reference/include/openvino/reference/is_inf.hpp index f73ded77e54..156dafcfe6e 100644 --- a/src/core/reference/include/openvino/reference/is_inf.hpp +++ b/src/core/reference/include/openvino/reference/is_inf.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template typename std::enable_if::value, void>::type @@ -54,5 +53,4 @@ typename std::enable_if::value, void>::type is_inf(const T* inp } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/is_nan.hpp b/src/core/reference/include/openvino/reference/is_nan.hpp index 1ca703e1e8c..47eed0e9944 100644 --- a/src/core/reference/include/openvino/reference/is_nan.hpp +++ b/src/core/reference/include/openvino/reference/is_nan.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template typename std::enable_if::value, void>::type is_nan(const T* input, U* output, size_t count) { @@ -25,5 +24,4 @@ typename std::enable_if::value, void>::type is_nan(const T* inp }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/less.hpp b/src/core/reference/include/openvino/reference/less.hpp index d8256243f2e..c4519726589 100644 --- a/src/core/reference/include/openvino/reference/less.hpp +++ b/src/core/reference/include/openvino/reference/less.hpp @@ -7,11 +7,10 @@ #include #include "ngraph/op/util/attr_types.hpp" -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void less(const T* arg0, @@ -36,5 +35,4 @@ void less(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/less_eq.hpp b/src/core/reference/include/openvino/reference/less_eq.hpp index ce1b3930438..80aff2fad73 100644 --- a/src/core/reference/include/openvino/reference/less_eq.hpp +++ b/src/core/reference/include/openvino/reference/less_eq.hpp @@ -7,11 +7,10 @@ #include #include "ngraph/op/util/attr_types.hpp" -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void less_eq(const T* arg0, @@ -36,5 +35,4 @@ void less_eq(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/log.hpp b/src/core/reference/include/openvino/reference/log.hpp index 8df50c2f9fa..fec6c959e29 100644 --- a/src/core/reference/include/openvino/reference/log.hpp +++ b/src/core/reference/include/openvino/reference/log.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void log(const T* arg, T* out, size_t count) { @@ -17,5 +16,4 @@ void log(const T* arg, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/log_softmax.hpp b/src/core/reference/include/openvino/reference/log_softmax.hpp index 513d2d1eb5a..fb5d455b28a 100644 --- a/src/core/reference/include/openvino/reference/log_softmax.hpp +++ b/src/core/reference/include/openvino/reference/log_softmax.hpp @@ -6,18 +6,17 @@ #include -#include "ngraph/coordinate_transform.hpp" #include "ngraph/shape_util.hpp" #include "openvino/reference/max.hpp" #include "openvino/reference/sum.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void log_softmax(const T* arg, T* out, const Shape& shape, const AxisSet& axes) { NGRAPH_SUPPRESS_DEPRECATED_START - auto temp_shape = reduce(shape, axes, true); + auto temp_shape = ngraph::reduce(shape, axes, true); auto temp_elements = shape_size(temp_shape); auto temp_max = std::vector(temp_elements, 0); auto temp_sum = std::vector(temp_elements, 0); @@ -27,7 +26,7 @@ void log_softmax(const T* arg, T* out, const Shape& shape, const AxisSet& axes) CoordinateTransform transform(shape); CoordinateTransform temp_transform(temp_shape); for (const Coordinate& coord : transform) { - Coordinate temp_coord = reduce(coord, axes, true); + Coordinate temp_coord = ngraph::reduce(coord, axes, true); out[transform.index(coord)] = static_cast(std::exp(arg[transform.index(coord)] - temp_max[temp_transform.index(temp_coord)])); } @@ -35,7 +34,7 @@ void log_softmax(const T* arg, T* out, const Shape& shape, const AxisSet& axes) sum(out, temp_sum.data(), shape, axes); for (const Coordinate& coord : transform) { - Coordinate temp_coord = reduce(coord, axes, true); + Coordinate temp_coord = ngraph::reduce(coord, axes, true); out[transform.index(coord)] = static_cast((arg[transform.index(coord)] - temp_max[temp_transform.index(temp_coord)]) - std::log(temp_sum[temp_transform.index(temp_coord)])); @@ -43,5 +42,4 @@ void log_softmax(const T* arg, T* out, const Shape& shape, const AxisSet& axes) NGRAPH_SUPPRESS_DEPRECATED_END } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/logical_reduction.hpp b/src/core/reference/include/openvino/reference/logical_reduction.hpp index 6dd21b5c040..7fd88db5eaa 100644 --- a/src/core/reference/include/openvino/reference/logical_reduction.hpp +++ b/src/core/reference/include/openvino/reference/logical_reduction.hpp @@ -7,11 +7,10 @@ #include #include -#include "ngraph/coordinate_transform.hpp" #include "ngraph/shape_util.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { OPENVINO_SUPPRESS_DEPRECATED_START static inline void reduce_logical_and(const char* arg, @@ -19,7 +18,7 @@ static inline void reduce_logical_and(const char* arg, const Shape& in_shape, const AxisSet& reduction_axes) { constexpr bool dont_keep_dims_in_output = false; - const auto out_shape = reduce(in_shape, reduction_axes, dont_keep_dims_in_output); + const auto out_shape = ngraph::reduce(in_shape, reduction_axes, dont_keep_dims_in_output); std::fill(out, out + shape_size(out_shape), 1); const auto in_strides = row_major_strides(in_shape); @@ -27,7 +26,7 @@ static inline void reduce_logical_and(const char* arg, CoordinateTransformBasic input_transform(in_shape); for (const Coordinate& input_coord : input_transform) { - const Coordinate output_coord = reduce(input_coord, reduction_axes, dont_keep_dims_in_output); + const Coordinate output_coord = ngraph::reduce(input_coord, reduction_axes, dont_keep_dims_in_output); const size_t in_idx = std::inner_product(input_coord.begin(), input_coord.end(), in_strides.begin(), uint64_t(0)); @@ -39,7 +38,7 @@ static inline void reduce_logical_and(const char* arg, } static inline void reduce_logical_or(const char* arg, char* out, const Shape& in_shape, const AxisSet& reduction_axes) { - const auto out_shape = reduce(in_shape, reduction_axes, false); + const auto out_shape = ngraph::reduce(in_shape, reduction_axes, false); std::fill(out, out + shape_size(out_shape), 0); const auto in_strides = row_major_strides(in_shape); @@ -47,7 +46,7 @@ static inline void reduce_logical_or(const char* arg, char* out, const Shape& in CoordinateTransformBasic input_transform(in_shape); for (const Coordinate& input_coord : input_transform) { - const Coordinate output_coord = reduce(input_coord, reduction_axes, false); + const Coordinate output_coord = ngraph::reduce(input_coord, reduction_axes, false); const size_t in_idx = std::inner_product(input_coord.begin(), input_coord.end(), in_strides.begin(), uint64_t(0)); @@ -59,5 +58,4 @@ static inline void reduce_logical_or(const char* arg, char* out, const Shape& in } OPENVINO_SUPPRESS_DEPRECATED_END } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/loop.hpp b/src/core/reference/include/openvino/reference/loop.hpp index 27ddbd0b477..f233aaf0089 100644 --- a/src/core/reference/include/openvino/reference/loop.hpp +++ b/src/core/reference/include/openvino/reference/loop.hpp @@ -5,17 +5,17 @@ #pragma once #include -#include -namespace ngraph { -namespace runtime { +#include "openvino/op/loop.hpp" +#include "openvino/op/util/sub_graph_base.hpp" + +namespace ov { namespace reference { -void loop(const std::shared_ptr& body, +void loop(const std::shared_ptr& body, const op::util::OutputDescriptionVector& out_descs, const op::util::InputDescriptionVector& input_descs, - const opset5::Loop::SpecialBodyPorts& special_ports, + const op::v5::Loop::SpecialBodyPorts& special_ports, const HostTensorVector& out, const HostTensorVector& args); } -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/lrn.hpp b/src/core/reference/include/openvino/reference/lrn.hpp index 6a47a7956e0..e3e2177ef21 100644 --- a/src/core/reference/include/openvino/reference/lrn.hpp +++ b/src/core/reference/include/openvino/reference/lrn.hpp @@ -8,11 +8,10 @@ #include #include -#include "ngraph/coordinate_transform.hpp" #include "ngraph/util.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { static size_t point_to_flat_idx(const Shape& shape, const std::vector& point) { size_t idx = point[0]; @@ -97,5 +96,4 @@ void lrn(const T* arg, NGRAPH_SUPPRESS_DEPRECATED_END } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/lstm_cell.hpp b/src/core/reference/include/openvino/reference/lstm_cell.hpp index 07ccd0d68d6..b82eef98ba9 100644 --- a/src/core/reference/include/openvino/reference/lstm_cell.hpp +++ b/src/core/reference/include/openvino/reference/lstm_cell.hpp @@ -16,8 +16,7 @@ #include "openvino/reference/subtract.hpp" #include "openvino/reference/tanh.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void lstm_cell(const T* X, @@ -365,5 +364,4 @@ void lstm_cell_v1(const T* X, reference::multiply(XHBPo.data(), Ct.data(), out_Ht, gate_shape, gate_shape, op::AutoBroadcastType::NUMPY); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/matmul.hpp b/src/core/reference/include/openvino/reference/matmul.hpp index 312b9f2eee6..f05dd224f88 100644 --- a/src/core/reference/include/openvino/reference/matmul.hpp +++ b/src/core/reference/include/openvino/reference/matmul.hpp @@ -13,8 +13,7 @@ #include "ngraph/shape_util.hpp" #include "openvino/reference/broadcast.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace details { template @@ -102,12 +101,12 @@ void matmul(const T* arg0, std::vector tmp(shape_size(arg0_shape)); auto axis_vector = details::get_transpose_order(arg0_shape); std::swap(arg0_shape_tmp[arg0_rank - 1], arg0_shape_tmp[arg0_rank - 2]); - opt_kernel::reshape(reinterpret_cast(arg0_data), - reinterpret_cast(tmp.data()), - arg0_shape, - axis_vector, - arg0_shape_tmp, - sizeof(T)); + ngraph::runtime::opt_kernel::reshape(reinterpret_cast(arg0_data), + reinterpret_cast(tmp.data()), + arg0_shape, + axis_vector, + arg0_shape_tmp, + sizeof(T)); arg0_new_data.swap(tmp); arg0_data = arg0_new_data.data(); } @@ -116,12 +115,12 @@ void matmul(const T* arg0, std::vector tmp(shape_size(arg1_shape)); auto axis_vector = details::get_transpose_order(arg1_shape); std::swap(arg1_shape_tmp[arg1_rank - 1], arg1_shape_tmp[arg1_rank - 2]); - opt_kernel::reshape(reinterpret_cast(arg1_data), - reinterpret_cast(tmp.data()), - arg1_shape, - axis_vector, - arg1_shape_tmp, - sizeof(T)); + ngraph::runtime::opt_kernel::reshape(reinterpret_cast(arg1_data), + reinterpret_cast(tmp.data()), + arg1_shape, + axis_vector, + arg1_shape_tmp, + sizeof(T)); arg1_new_data.swap(tmp); arg1_data = arg1_new_data.data(); } @@ -218,5 +217,4 @@ void matmul(const T* arg0, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/matrix_nms.hpp b/src/core/reference/include/openvino/reference/matrix_nms.hpp index 890c1b61d49..4a3b5b015e7 100644 --- a/src/core/reference/include/openvino/reference/matrix_nms.hpp +++ b/src/core/reference/include/openvino/reference/matrix_nms.hpp @@ -19,8 +19,7 @@ #include "ngraph/op/util/op_types.hpp" #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void matrix_nms(const float* boxes_data, const Shape& boxes_data_shape, @@ -34,5 +33,4 @@ void matrix_nms(const float* boxes_data, int64_t* valid_outputs); } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/max.hpp b/src/core/reference/include/openvino/reference/max.hpp index 76c249ca23d..0cbb810ecaf 100644 --- a/src/core/reference/include/openvino/reference/max.hpp +++ b/src/core/reference/include/openvino/reference/max.hpp @@ -8,11 +8,10 @@ #include #include -#include "ngraph/coordinate_transform.hpp" #include "ngraph/shape_util.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void max(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduction_axes) { @@ -20,7 +19,7 @@ void max(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduction_a constexpr bool dont_keep_dims_in_output = false; OPENVINO_SUPPRESS_DEPRECATED_START - const auto out_shape = reduce(in_shape, reduction_axes, dont_keep_dims_in_output); + const auto out_shape = ngraph::reduce(in_shape, reduction_axes, dont_keep_dims_in_output); std::fill(out, out + shape_size(out_shape), minval); const auto in_strides = row_major_strides(in_shape); @@ -28,7 +27,7 @@ void max(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduction_a CoordinateTransformBasic input_transform(in_shape); for (const Coordinate& input_coord : input_transform) { - const Coordinate output_coord = reduce(input_coord, reduction_axes, dont_keep_dims_in_output); + const Coordinate output_coord = ngraph::reduce(input_coord, reduction_axes, dont_keep_dims_in_output); const size_t in_idx = std::inner_product(input_coord.begin(), input_coord.end(), in_strides.begin(), uint64_t(0)); @@ -44,5 +43,4 @@ void max(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduction_a OPENVINO_SUPPRESS_DEPRECATED_END } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/max_pool.hpp b/src/core/reference/include/openvino/reference/max_pool.hpp index a28d3227b54..eaf2dee8932 100644 --- a/src/core/reference/include/openvino/reference/max_pool.hpp +++ b/src/core/reference/include/openvino/reference/max_pool.hpp @@ -7,10 +7,9 @@ #include #include -#include "ngraph/coordinate_transform.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void max_pool(const T* arg, @@ -411,5 +410,4 @@ void max_pool(const Values_t* data, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/maximum.hpp b/src/core/reference/include/openvino/reference/maximum.hpp index 0566391c691..e918d4281b3 100644 --- a/src/core/reference/include/openvino/reference/maximum.hpp +++ b/src/core/reference/include/openvino/reference/maximum.hpp @@ -7,11 +7,10 @@ #include #include "ngraph/op/util/attr_types.hpp" -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void maximum(const T* arg0, const T* arg1, T* out, size_t count) { @@ -32,5 +31,4 @@ void maximum(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/mean.hpp b/src/core/reference/include/openvino/reference/mean.hpp index 934d2b07782..85fe10eddcf 100644 --- a/src/core/reference/include/openvino/reference/mean.hpp +++ b/src/core/reference/include/openvino/reference/mean.hpp @@ -9,20 +9,19 @@ #include #include -#include "ngraph/coordinate_transform.hpp" #include "ngraph/shape_util.hpp" #include "ngraph/type/bfloat16.hpp" #include "ngraph/type/float16.hpp" #include "openvino/reference/sum.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void mean(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduction_axes) { constexpr bool dont_keep_dims_in_output = false; OPENVINO_SUPPRESS_DEPRECATED_START - const auto out_shape = reduce(in_shape, reduction_axes, dont_keep_dims_in_output); + const auto out_shape = ngraph::reduce(in_shape, reduction_axes, dont_keep_dims_in_output); std::vector cs(shape_size(out_shape), 0); std::fill(out, out + shape_size(out_shape), T(0)); @@ -33,7 +32,7 @@ void mean(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduction_ std::map index_to_count_map; for (const Coordinate& input_coord : input_transform) { - const Coordinate output_coord = reduce(input_coord, reduction_axes, dont_keep_dims_in_output); + const Coordinate output_coord = ngraph::reduce(input_coord, reduction_axes, dont_keep_dims_in_output); const size_t in_idx = std::inner_product(input_coord.begin(), input_coord.end(), in_strides.begin(), uint64_t(0)); @@ -56,5 +55,4 @@ void mean(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduction_ } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/min.hpp b/src/core/reference/include/openvino/reference/min.hpp index db25a08558c..6d6c3e05df3 100644 --- a/src/core/reference/include/openvino/reference/min.hpp +++ b/src/core/reference/include/openvino/reference/min.hpp @@ -8,15 +8,14 @@ #include #include -#include "ngraph/coordinate_transform.hpp" #include "ngraph/shape_util.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" #ifdef _WIN32 # undef min #endif -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void min(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduction_axes) { @@ -25,7 +24,7 @@ void min(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduction_a constexpr bool dont_keep_dims_in_output = false; OPENVINO_SUPPRESS_DEPRECATED_START - const auto out_shape = reduce(in_shape, reduction_axes, dont_keep_dims_in_output); + const auto out_shape = ngraph::reduce(in_shape, reduction_axes, dont_keep_dims_in_output); std::fill(out, out + shape_size(out_shape), minval); const auto in_strides = row_major_strides(in_shape); @@ -33,7 +32,7 @@ void min(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduction_a CoordinateTransformBasic input_transform(in_shape); for (const Coordinate& input_coord : input_transform) { - const Coordinate output_coord = reduce(input_coord, reduction_axes, dont_keep_dims_in_output); + const Coordinate output_coord = ngraph::reduce(input_coord, reduction_axes, dont_keep_dims_in_output); const size_t in_idx = std::inner_product(input_coord.begin(), input_coord.end(), in_strides.begin(), uint64_t(0)); @@ -49,5 +48,4 @@ void min(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduction_a OPENVINO_SUPPRESS_DEPRECATED_END } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/minimum.hpp b/src/core/reference/include/openvino/reference/minimum.hpp index 2d4e4abe87a..78b8788ef80 100644 --- a/src/core/reference/include/openvino/reference/minimum.hpp +++ b/src/core/reference/include/openvino/reference/minimum.hpp @@ -7,11 +7,10 @@ #include #include "ngraph/op/util/attr_types.hpp" -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void minimum(const T* arg0, const T* arg1, T* out, size_t count) { @@ -32,5 +31,4 @@ void minimum(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/mish.hpp b/src/core/reference/include/openvino/reference/mish.hpp index b6e1a6f9e8e..023bf719a2c 100644 --- a/src/core/reference/include/openvino/reference/mish.hpp +++ b/src/core/reference/include/openvino/reference/mish.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void mish(const T* arg, T* out, size_t count) { @@ -17,5 +16,4 @@ void mish(const T* arg, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/mod.hpp b/src/core/reference/include/openvino/reference/mod.hpp index c58e4fda0e3..76af9cbe95a 100644 --- a/src/core/reference/include/openvino/reference/mod.hpp +++ b/src/core/reference/include/openvino/reference/mod.hpp @@ -7,10 +7,9 @@ #include #include -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void mod(const T* arg0, @@ -24,5 +23,4 @@ void mod(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/multiclass_nms.hpp b/src/core/reference/include/openvino/reference/multiclass_nms.hpp index ecdfc56cc6b..1a33c91eb55 100644 --- a/src/core/reference/include/openvino/reference/multiclass_nms.hpp +++ b/src/core/reference/include/openvino/reference/multiclass_nms.hpp @@ -19,8 +19,7 @@ #include "ngraph/op/util/op_types.hpp" #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void multiclass_nms(const float* boxes_data, @@ -37,5 +36,4 @@ void multiclass_nms(const float* boxes_data, int64_t* valid_outputs); } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/multiply.hpp b/src/core/reference/include/openvino/reference/multiply.hpp index b837bb05073..bfc1dd01e67 100644 --- a/src/core/reference/include/openvino/reference/multiply.hpp +++ b/src/core/reference/include/openvino/reference/multiply.hpp @@ -7,11 +7,10 @@ #include #include "ngraph/op/util/attr_types.hpp" -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void multiply(const T* arg0, const T* arg1, T* out, size_t count) { @@ -32,5 +31,4 @@ void multiply(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/mvn.hpp b/src/core/reference/include/openvino/reference/mvn.hpp index 7d87bc59134..cd171fe73f2 100644 --- a/src/core/reference/include/openvino/reference/mvn.hpp +++ b/src/core/reference/include/openvino/reference/mvn.hpp @@ -16,8 +16,7 @@ #include "openvino/reference/subtract.hpp" #include "openvino/reference/sum.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { OPENVINO_SUPPRESS_DEPRECATED_START template @@ -27,7 +26,7 @@ void mvn(const T* arg, const bool normalize_variance, const AxisSet& reduction_axes, const double eps) { - auto reduced_shape = reduce(in_shape, reduction_axes, true); + auto reduced_shape = ngraph::reduce(in_shape, reduction_axes, true); std::vector tmp_buffer(shape_size(in_shape)); mean(arg, tmp_buffer.data(), in_shape, reduction_axes); subtract(arg, tmp_buffer.data(), out, in_shape, reduced_shape, op::AutoBroadcastType::NUMPY); @@ -57,7 +56,7 @@ void mvn_6(const T* arg, bool normalize_variance, double eps, op::MVNEpsMode eps_mode) { - auto reduced_shape = reduce(in_shape, reduction_axes, true); + auto reduced_shape = ngraph::reduce(in_shape, reduction_axes, true); std::vector tmp_buffer(shape_size(in_shape)); mean(arg, tmp_buffer.data(), in_shape, reduction_axes); subtract(arg, tmp_buffer.data(), out, in_shape, reduced_shape, op::AutoBroadcastType::NUMPY); @@ -107,5 +106,4 @@ AxisSet mvn_6_reduction_axes(const ov::Tensor& axes_input, size_t rank) { } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/negate.hpp b/src/core/reference/include/openvino/reference/negate.hpp index 8029a335d90..d63755ba2ec 100644 --- a/src/core/reference/include/openvino/reference/negate.hpp +++ b/src/core/reference/include/openvino/reference/negate.hpp @@ -6,8 +6,7 @@ #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void negate(const T* arg, T* out, size_t count) { @@ -16,5 +15,4 @@ void negate(const T* arg, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/non_max_suppression.hpp b/src/core/reference/include/openvino/reference/non_max_suppression.hpp index 9ed0eab2082..ca4d9ef49c2 100644 --- a/src/core/reference/include/openvino/reference/non_max_suppression.hpp +++ b/src/core/reference/include/openvino/reference/non_max_suppression.hpp @@ -19,8 +19,7 @@ #include "ngraph/ops.hpp" #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void non_max_suppression5(const float* boxes_data, const Shape& boxes_data_shape, @@ -66,5 +65,4 @@ void nms_postprocessing(const HostTensorVector& outputs, int64_t valid_outputs, const ngraph::element::Type selected_scores_type); } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/non_zero.hpp b/src/core/reference/include/openvino/reference/non_zero.hpp index af0913af7db..3ac5ee3c8ba 100644 --- a/src/core/reference/include/openvino/reference/non_zero.hpp +++ b/src/core/reference/include/openvino/reference/non_zero.hpp @@ -8,8 +8,7 @@ #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { /// \brief Return number of non-zero entries in the input argument. /// @@ -115,5 +114,4 @@ void non_zero(const T* arg, U* out, const Shape& arg_shape) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/normalize_l2.hpp b/src/core/reference/include/openvino/reference/normalize_l2.hpp index 2a66d54fa6b..ce737f652af 100644 --- a/src/core/reference/include/openvino/reference/normalize_l2.hpp +++ b/src/core/reference/include/openvino/reference/normalize_l2.hpp @@ -6,11 +6,10 @@ #include -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" #include "openvino/reference/sum.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void normalize_l2(const T* data, @@ -53,5 +52,4 @@ void normalize_l2(const T* data, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/not.hpp b/src/core/reference/include/openvino/reference/not.hpp index edfc06e54ad..e0444a8eb73 100644 --- a/src/core/reference/include/openvino/reference/not.hpp +++ b/src/core/reference/include/openvino/reference/not.hpp @@ -6,8 +6,7 @@ #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void logical_not(const T* arg, T* out, size_t count) { @@ -16,5 +15,4 @@ void logical_not(const T* arg, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/not_equal.hpp b/src/core/reference/include/openvino/reference/not_equal.hpp index ee5cbbd4699..f033bcdde70 100644 --- a/src/core/reference/include/openvino/reference/not_equal.hpp +++ b/src/core/reference/include/openvino/reference/not_equal.hpp @@ -12,11 +12,10 @@ #include #include "ngraph/op/util/attr_types.hpp" -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void not_equal(const T* arg0, @@ -30,8 +29,7 @@ void not_equal(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov #if defined(__GNUC__) # pragma GCC diagnostic pop diff --git a/src/core/reference/include/openvino/reference/one_hot.hpp b/src/core/reference/include/openvino/reference/one_hot.hpp index e054d027d0f..8527c1281bc 100644 --- a/src/core/reference/include/openvino/reference/one_hot.hpp +++ b/src/core/reference/include/openvino/reference/one_hot.hpp @@ -6,8 +6,7 @@ #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void one_hot(const INPUT_TYPE* indices, @@ -43,5 +42,4 @@ void one_hot(const INPUT_TYPE* indices, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/or.hpp b/src/core/reference/include/openvino/reference/or.hpp index c689f4e6df4..9d34d7b0978 100644 --- a/src/core/reference/include/openvino/reference/or.hpp +++ b/src/core/reference/include/openvino/reference/or.hpp @@ -7,11 +7,10 @@ #include #include "ngraph/op/util/attr_types.hpp" -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void logical_or(const T* arg0, const T* arg1, T* out, size_t count) { @@ -32,5 +31,4 @@ void logical_or(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/pad.hpp b/src/core/reference/include/openvino/reference/pad.hpp index 5cc2287d4aa..ce66f64b05a 100644 --- a/src/core/reference/include/openvino/reference/pad.hpp +++ b/src/core/reference/include/openvino/reference/pad.hpp @@ -8,8 +8,7 @@ #include "ngraph/op/util/attr_types.hpp" // for op::PadMode #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void pad(const char* data, const char* pad_value, @@ -21,5 +20,4 @@ void pad(const char* data, const CoordinateDiff& padding_above, const op::PadMode pad_mode); } -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/power.hpp b/src/core/reference/include/openvino/reference/power.hpp index 8986068c635..2aeb3042fcf 100644 --- a/src/core/reference/include/openvino/reference/power.hpp +++ b/src/core/reference/include/openvino/reference/power.hpp @@ -8,8 +8,8 @@ #include #include "ngraph/op/util/attr_types.hpp" -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" namespace ov { namespace reference { diff --git a/src/core/reference/include/openvino/reference/prelu.hpp b/src/core/reference/include/openvino/reference/prelu.hpp index ef52ba1705b..3de4744bf7e 100644 --- a/src/core/reference/include/openvino/reference/prelu.hpp +++ b/src/core/reference/include/openvino/reference/prelu.hpp @@ -9,10 +9,9 @@ #include #include -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void prelu(const T* arg, const T* slope, T* out, const Shape& arg_shape, const Shape& slope_shape) { @@ -34,5 +33,4 @@ void prelu(const T* arg, const T* slope, T* out, const Shape& arg_shape, const S }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/prior_box.hpp b/src/core/reference/include/openvino/reference/prior_box.hpp index 0c57998221f..e4ca13ae310 100644 --- a/src/core/reference/include/openvino/reference/prior_box.hpp +++ b/src/core/reference/include/openvino/reference/prior_box.hpp @@ -8,11 +8,10 @@ #include "ngraph/axis_vector.hpp" #include "ngraph/check.hpp" -#include "ngraph/coordinate_transform.hpp" #include "ngraph/op/prior_box.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { static inline float clip_great(float x, float threshold) { return x < threshold ? x : threshold; @@ -229,5 +228,4 @@ void prior_box(const T* data, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/prior_box_clustered.hpp b/src/core/reference/include/openvino/reference/prior_box_clustered.hpp index 656d503e460..d15d69a6757 100644 --- a/src/core/reference/include/openvino/reference/prior_box_clustered.hpp +++ b/src/core/reference/include/openvino/reference/prior_box_clustered.hpp @@ -8,18 +8,17 @@ #include "ngraph/axis_vector.hpp" #include "ngraph/check.hpp" -#include "ngraph/coordinate_transform.hpp" #include "ngraph/op/prior_box_clustered.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void prior_box_clustered(const T* data, const T* img, float* dst_data, const Shape& out_shape, - const op::PriorBoxClusteredAttrs& attrs) { + const ngraph::op::PriorBoxClusteredAttrs& attrs) { size_t num_priors_ = attrs.widths.size(); auto variances = attrs.variances; @@ -91,5 +90,4 @@ void prior_box_clustered(const T* data, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/product.hpp b/src/core/reference/include/openvino/reference/product.hpp index ff7d3a4a784..41ce4cf3b1d 100644 --- a/src/core/reference/include/openvino/reference/product.hpp +++ b/src/core/reference/include/openvino/reference/product.hpp @@ -7,17 +7,16 @@ #include #include -#include "ngraph/coordinate_transform.hpp" #include "ngraph/shape_util.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void product(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduction_axes) { constexpr bool dont_keep_dims_in_output = false; OPENVINO_SUPPRESS_DEPRECATED_START - const auto out_shape = reduce(in_shape, reduction_axes, dont_keep_dims_in_output); + const auto out_shape = ngraph::reduce(in_shape, reduction_axes, dont_keep_dims_in_output); std::fill(out, out + shape_size(out_shape), T(1)); const auto in_strides = row_major_strides(in_shape); @@ -25,7 +24,7 @@ void product(const T* arg, T* out, const Shape& in_shape, const AxisSet& reducti CoordinateTransformBasic input_transform(in_shape); for (const Coordinate& input_coord : input_transform) { - const Coordinate output_coord = reduce(input_coord, reduction_axes, dont_keep_dims_in_output); + const Coordinate output_coord = ngraph::reduce(input_coord, reduction_axes, dont_keep_dims_in_output); const size_t in_idx = std::inner_product(input_coord.begin(), input_coord.end(), in_strides.begin(), uint64_t(0)); @@ -37,5 +36,4 @@ void product(const T* arg, T* out, const Shape& in_shape, const AxisSet& reducti OPENVINO_SUPPRESS_DEPRECATED_END } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/proposal.hpp b/src/core/reference/include/openvino/reference/proposal.hpp index 15eede2cc4d..febec805131 100644 --- a/src/core/reference/include/openvino/reference/proposal.hpp +++ b/src/core/reference/include/openvino/reference/proposal.hpp @@ -4,8 +4,7 @@ #include "ngraph/op/proposal.hpp" #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace details { template @@ -17,7 +16,7 @@ struct ProposalBox { T score; }; -inline std::vector generate_anchors(const op::ProposalAttrs& attrs, const unsigned int anchor_count) { +inline std::vector generate_anchors(const op::v0::Proposal::Attributes& attrs, const unsigned int anchor_count) { std::vector anchors(4 * anchor_count); // Framework specific parameters @@ -156,7 +155,7 @@ static void enumerate_proposals(const T* bottom4d, x1 = static_cast(pred_ctr_x + 0.5f * pred_w); y1 = static_cast(pred_ctr_y + 0.5f * pred_h); - // adjust new corner locations to be within the image region, + // adjust new corner locations to be within the image region if (clip_before_nms) { x0 = std::max(0.0f, std::min(x0, img_W - coordinates_offset)); y0 = std::max(0.0f, std::min(y0, img_H - coordinates_offset)); @@ -319,7 +318,7 @@ static void proposal_exec(const T* class_probs, const Shape& image_shape_shape, const Shape& output_shape, const Shape& out_probs_shape, - const op::ProposalAttrs& attrs) { + const op::v0::Proposal::Attributes& attrs) { const T* p_bottom_item = class_probs; const T* p_d_anchor_item = bbox_deltas; T* p_roi_item = output; @@ -420,7 +419,7 @@ void proposal_v0(const T* class_probs, const Shape& bbox_deltas_shape, const Shape& image_shape_shape, const Shape& output_shape, - const op::ProposalAttrs& attrs) { + const op::v0::Proposal::Attributes& attrs) { details::proposal_exec(class_probs, bbox_deltas, image_shape, @@ -445,7 +444,7 @@ void proposal_v4(const T* class_probs, const Shape& image_shape_shape, const Shape& output_shape, const Shape& out_probs_shape, - const op::ProposalAttrs& attrs) { + const op::v0::Proposal::Attributes& attrs) { details::proposal_exec(class_probs, bbox_deltas, image_shape, @@ -459,5 +458,4 @@ void proposal_v4(const T* class_probs, attrs); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/psroi_pooling.hpp b/src/core/reference/include/openvino/reference/psroi_pooling.hpp index e7598305a70..482f48ea28f 100644 --- a/src/core/reference/include/openvino/reference/psroi_pooling.hpp +++ b/src/core/reference/include/openvino/reference/psroi_pooling.hpp @@ -9,8 +9,7 @@ #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { enum PSROIPoolingMode { AVG, BILINEAR }; template @@ -138,5 +137,4 @@ void psroi_pooling(const T* input, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/quantize.hpp b/src/core/reference/include/openvino/reference/quantize.hpp index aef89f97c24..e5333aadca5 100644 --- a/src/core/reference/include/openvino/reference/quantize.hpp +++ b/src/core/reference/include/openvino/reference/quantize.hpp @@ -4,12 +4,11 @@ #pragma once -#include "ngraph/coordinate_transform.hpp" #include "ngraph/op/quantize.hpp" #include "ngraph/shape_util.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void quantize(const REAL* input, @@ -74,5 +73,4 @@ void quantize(const REAL* input, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/random_uniform.hpp b/src/core/reference/include/openvino/reference/random_uniform.hpp index 33530e53a54..6f942b97dc6 100644 --- a/src/core/reference/include/openvino/reference/random_uniform.hpp +++ b/src/core/reference/include/openvino/reference/random_uniform.hpp @@ -9,8 +9,7 @@ #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { // Helper struct for converting between types @@ -47,5 +46,4 @@ const size_t rounds_number = 10; const uint64_t skip_const = 256; } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/range.hpp b/src/core/reference/include/openvino/reference/range.hpp index 9dbc5e9739f..99a6cb39d87 100644 --- a/src/core/reference/include/openvino/reference/range.hpp +++ b/src/core/reference/include/openvino/reference/range.hpp @@ -9,12 +9,11 @@ #include "ngraph/axis_vector.hpp" #include "ngraph/check.hpp" -#include "ngraph/coordinate_transform.hpp" #include "ngraph/type/bfloat16.hpp" #include "ngraph/type/float16.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { // Return type is `void`, only enabled if `T` is a built-in FP // type, or nGraph's `bfloat16` or `float16` type. @@ -41,5 +40,4 @@ typename std::enable_if::value>::type range(const T* start, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/rdft.hpp b/src/core/reference/include/openvino/reference/rdft.hpp index e163cd48fd3..ecfdae9585f 100644 --- a/src/core/reference/include/openvino/reference/rdft.hpp +++ b/src/core/reference/include/openvino/reference/rdft.hpp @@ -25,8 +25,7 @@ #include "ngraph/ops.hpp" #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void rdft(const std::vector& input_data, const Shape& input_data_shape, @@ -34,5 +33,4 @@ void rdft(const std::vector& input_data, const Shape& output_fft_shape, float* rdft_result); } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/reduce_l1.hpp b/src/core/reference/include/openvino/reference/reduce_l1.hpp index 37477aa7e72..f34342e9a14 100644 --- a/src/core/reference/include/openvino/reference/reduce_l1.hpp +++ b/src/core/reference/include/openvino/reference/reduce_l1.hpp @@ -7,17 +7,16 @@ #include #include -#include "ngraph/coordinate_transform.hpp" #include "ngraph/shape_util.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void reduce_l1(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduction_axes) { constexpr bool dont_keep_dims_in_output = false; OPENVINO_SUPPRESS_DEPRECATED_START - const auto out_shape = reduce(in_shape, reduction_axes, dont_keep_dims_in_output); + const auto out_shape = ngraph::reduce(in_shape, reduction_axes, dont_keep_dims_in_output); std::fill(out, out + shape_size(out_shape), T(0)); const auto in_strides = row_major_strides(in_shape); @@ -25,7 +24,7 @@ void reduce_l1(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduc CoordinateTransformBasic input_transform(in_shape); for (const Coordinate& input_coord : input_transform) { - const Coordinate output_coord = reduce(input_coord, reduction_axes, dont_keep_dims_in_output); + const Coordinate output_coord = ngraph::reduce(input_coord, reduction_axes, dont_keep_dims_in_output); const size_t in_idx = std::inner_product(input_coord.begin(), input_coord.end(), in_strides.begin(), uint64_t(0)); @@ -37,5 +36,4 @@ void reduce_l1(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduc OPENVINO_SUPPRESS_DEPRECATED_END } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/reduce_l2.hpp b/src/core/reference/include/openvino/reference/reduce_l2.hpp index c338f340be8..37e2d24353c 100644 --- a/src/core/reference/include/openvino/reference/reduce_l2.hpp +++ b/src/core/reference/include/openvino/reference/reduce_l2.hpp @@ -7,17 +7,16 @@ #include #include -#include "ngraph/coordinate_transform.hpp" #include "ngraph/shape_util.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void reduce_l2(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduction_axes) { constexpr bool dont_keep_dims_in_output = false; OPENVINO_SUPPRESS_DEPRECATED_START - const auto out_shape = reduce(in_shape, reduction_axes, dont_keep_dims_in_output); + const auto out_shape = ngraph::reduce(in_shape, reduction_axes, dont_keep_dims_in_output); std::fill(out, out + shape_size(out_shape), T(0)); const auto in_strides = row_major_strides(in_shape); @@ -25,7 +24,7 @@ void reduce_l2(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduc CoordinateTransformBasic input_transform(in_shape); for (const Coordinate& input_coord : input_transform) { - const Coordinate output_coord = reduce(input_coord, reduction_axes, dont_keep_dims_in_output); + const Coordinate output_coord = ngraph::reduce(input_coord, reduction_axes, dont_keep_dims_in_output); const size_t in_idx = std::inner_product(input_coord.begin(), input_coord.end(), in_strides.begin(), uint64_t(0)); @@ -40,5 +39,4 @@ void reduce_l2(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduc OPENVINO_SUPPRESS_DEPRECATED_END } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/region_yolo.hpp b/src/core/reference/include/openvino/reference/region_yolo.hpp index 3f7e8982927..f510c683db0 100644 --- a/src/core/reference/include/openvino/reference/region_yolo.hpp +++ b/src/core/reference/include/openvino/reference/region_yolo.hpp @@ -9,8 +9,7 @@ #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { static inline int entry_index(int width, int height, int coords, int classes, int outputs, int batch, int location, int entry) { @@ -115,5 +114,4 @@ void region_yolo(const T* input, } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/relu.hpp b/src/core/reference/include/openvino/reference/relu.hpp index 6ee2d3a3df7..0aad9b2e25f 100644 --- a/src/core/reference/include/openvino/reference/relu.hpp +++ b/src/core/reference/include/openvino/reference/relu.hpp @@ -6,8 +6,7 @@ #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void relu(const T* arg, T* out, size_t count) { @@ -17,5 +16,4 @@ void relu(const T* arg, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/reorg_yolo.hpp b/src/core/reference/include/openvino/reference/reorg_yolo.hpp index cb05d0a1e87..2678a4e82e3 100644 --- a/src/core/reference/include/openvino/reference/reorg_yolo.hpp +++ b/src/core/reference/include/openvino/reference/reorg_yolo.hpp @@ -9,10 +9,8 @@ #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void reorg_yolo(const char* arg, char* out, const Shape& in_shape, int64_t stride, const size_t elem_size); } -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/reshape.hpp b/src/core/reference/include/openvino/reference/reshape.hpp index ed8b702c0d3..3d769475352 100644 --- a/src/core/reference/include/openvino/reference/reshape.hpp +++ b/src/core/reference/include/openvino/reference/reshape.hpp @@ -7,8 +7,7 @@ #include "ngraph/axis_vector.hpp" #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void reshape(const char* arg, char* out, @@ -17,5 +16,4 @@ void reshape(const char* arg, const Shape& out_shape, size_t elem_size); } -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/result.hpp b/src/core/reference/include/openvino/reference/result.hpp index ea86c830182..ca71bab4dcb 100644 --- a/src/core/reference/include/openvino/reference/result.hpp +++ b/src/core/reference/include/openvino/reference/result.hpp @@ -11,13 +11,11 @@ #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void result(const T* arg, T* out, size_t count) { memcpy(out, arg, sizeof(T) * count); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/reverse.hpp b/src/core/reference/include/openvino/reference/reverse.hpp index 45468f62636..b4ea16c5013 100644 --- a/src/core/reference/include/openvino/reference/reverse.hpp +++ b/src/core/reference/include/openvino/reference/reverse.hpp @@ -6,10 +6,9 @@ #include -#include "ngraph/coordinate_transform.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void reverse(const char* arg, char* out, @@ -18,5 +17,4 @@ void reverse(const char* arg, const AxisSet& reversed_axes, size_t elem_size); } -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/reverse_sequence.hpp b/src/core/reference/include/openvino/reference/reverse_sequence.hpp index 5d8424c9728..6a01bc9303e 100644 --- a/src/core/reference/include/openvino/reference/reverse_sequence.hpp +++ b/src/core/reference/include/openvino/reference/reverse_sequence.hpp @@ -7,11 +7,10 @@ #include #include -#include "ngraph/coordinate_transform.hpp" #include "ngraph/util.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void reverse_sequence(const T* arg, @@ -46,5 +45,4 @@ void reverse_sequence(const T* arg, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/rnn_cell.hpp b/src/core/reference/include/openvino/reference/rnn_cell.hpp index e8110f13816..cc5309ce3f0 100644 --- a/src/core/reference/include/openvino/reference/rnn_cell.hpp +++ b/src/core/reference/include/openvino/reference/rnn_cell.hpp @@ -13,8 +13,7 @@ #include "openvino/reference/sigmoid.hpp" #include "openvino/reference/tanh.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void rnn_cell(const T* X, @@ -93,5 +92,4 @@ void rnn_cell(const T* X, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/roi_align.hpp b/src/core/reference/include/openvino/reference/roi_align.hpp index 4cb4b38e235..f7f9d1bc791 100644 --- a/src/core/reference/include/openvino/reference/roi_align.hpp +++ b/src/core/reference/include/openvino/reference/roi_align.hpp @@ -6,11 +6,10 @@ #include -#include "ngraph/coordinate_transform.hpp" #include "ngraph/op/roi_align.hpp" // for ROIAlign:PoolingMode #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +#include "openvino/reference/utils/coordinate_transform.hpp" +namespace ov { namespace reference { using ROIPoolingMode = op::v3::ROIAlign::PoolingMode; using AlignedMode = op::v9::ROIAlign::AlignedMode; @@ -224,5 +223,4 @@ void roi_align(const T* feature_maps, return; } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/roi_pooling.hpp b/src/core/reference/include/openvino/reference/roi_pooling.hpp index a1a703a3458..7efa4daf384 100644 --- a/src/core/reference/include/openvino/reference/roi_pooling.hpp +++ b/src/core/reference/include/openvino/reference/roi_pooling.hpp @@ -6,8 +6,7 @@ #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void roi_pooling(const T* feature_maps, @@ -183,7 +182,4 @@ void roi_pooling(const T* feature_maps, } } } // namespace reference - -} // namespace runtime - -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/roll.hpp b/src/core/reference/include/openvino/reference/roll.hpp index ae0c32a76b6..16b50bc32f6 100644 --- a/src/core/reference/include/openvino/reference/roll.hpp +++ b/src/core/reference/include/openvino/reference/roll.hpp @@ -16,11 +16,10 @@ #pragma once -#include "ngraph/coordinate_transform.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { size_t shift_pos(size_t pos_in_spanned_data, size_t dim_shift, size_t spanned_shape_size, size_t dim_size) { size_t pos = pos_in_spanned_data / spanned_shape_size % dim_size; @@ -74,5 +73,4 @@ void roll(const char* arg, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/scatter_elements_update.hpp b/src/core/reference/include/openvino/reference/scatter_elements_update.hpp index 5b6a1fe4594..0262db0a1ce 100644 --- a/src/core/reference/include/openvino/reference/scatter_elements_update.hpp +++ b/src/core/reference/include/openvino/reference/scatter_elements_update.hpp @@ -9,12 +9,11 @@ #include #include "ngraph/check.hpp" -#include "ngraph/coordinate_transform.hpp" #include "ngraph/shape.hpp" #include "openvino/op/scatter_elements_update.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { using Reduction = ov::op::v12::ScatterElementsUpdate::Reduction; @@ -249,5 +248,4 @@ void scatter_elem_update_with_reduction(const DataType* input_data, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/scatter_nd_update.hpp b/src/core/reference/include/openvino/reference/scatter_nd_update.hpp index e6da7d237f7..f4c5821dac0 100644 --- a/src/core/reference/include/openvino/reference/scatter_nd_update.hpp +++ b/src/core/reference/include/openvino/reference/scatter_nd_update.hpp @@ -11,8 +11,7 @@ #include "ngraph/shape.hpp" #include "utils/span.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void scatterNdUpdate(const dataType* const inputData, @@ -61,5 +60,4 @@ void scatterNdUpdate(const dataType* const inputData, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/scatter_update.hpp b/src/core/reference/include/openvino/reference/scatter_update.hpp index 1e60c3968b4..90a1b50b1b7 100644 --- a/src/core/reference/include/openvino/reference/scatter_update.hpp +++ b/src/core/reference/include/openvino/reference/scatter_update.hpp @@ -7,12 +7,11 @@ #include #include "ngraph/check.hpp" -#include "ngraph/coordinate_transform.hpp" #include "ngraph/shape.hpp" -#include "ngraph/util.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" +#include "openvino/util/common_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { static const CoordinateTransformBasic get_target_shape(const Shape& data_shape, const Coordinate& start_corner, @@ -26,7 +25,7 @@ static const CoordinateTransformBasic get_target_shape(const Shape& data_shape, OPENVINO_SUPPRESS_DEPRECATED_START for (size_t axis = 0; axis < m_n_axes; axis++) { target_shape.push_back( - ceil_div(end_corner[axis_order[axis]] - start_corner[axis_order[axis]], strides[axis_order[axis]])); + util::ceil_div(end_corner[axis_order[axis]] - start_corner[axis_order[axis]], strides[axis_order[axis]])); } OPENVINO_SUPPRESS_DEPRECATED_END return target_shape; @@ -144,5 +143,4 @@ static void scatter_update(const char* input_data, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/select.hpp b/src/core/reference/include/openvino/reference/select.hpp index 07de2280946..743c8b089d0 100644 --- a/src/core/reference/include/openvino/reference/select.hpp +++ b/src/core/reference/include/openvino/reference/select.hpp @@ -7,10 +7,9 @@ #include #include -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void select(const char* arg0, @@ -48,5 +47,4 @@ void select(const char* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/selu.hpp b/src/core/reference/include/openvino/reference/selu.hpp index 4a4aabc3e1c..b498fba38d4 100644 --- a/src/core/reference/include/openvino/reference/selu.hpp +++ b/src/core/reference/include/openvino/reference/selu.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void selu(const T* arg, @@ -24,5 +23,4 @@ void selu(const T* arg, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/sequences.hpp b/src/core/reference/include/openvino/reference/sequences.hpp index b1a2523ede8..c466ec5d559 100644 --- a/src/core/reference/include/openvino/reference/sequences.hpp +++ b/src/core/reference/include/openvino/reference/sequences.hpp @@ -13,8 +13,7 @@ #include "openvino/reference/split.hpp" #include "reverse_sequence.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { enum class CellType { RNN, @@ -117,94 +116,94 @@ void cell_pass(CellType type, for (size_t time_step = 0; time_step < num_splits; ++time_step) { if (type == CellType::LSTM) { - runtime::reference::lstm_cell(reinterpret_cast(in_seqs.data() + time_step * part_size), - squeeze_axis(shapes[0], 1), - reinterpret_cast(H_i), - squeeze_axis(shapes[2], 1), - reinterpret_cast(C_i), - squeeze_axis(shapes[3], 1), - reinterpret_cast(inputs[4]), - squeeze_axis(shapes[4], 0), - reinterpret_cast(inputs[5]), - squeeze_axis(shapes[5], 0), - reinterpret_cast(inputs[6]), - squeeze_axis(shapes[6], 0), - reinterpret_cast(outputs[1]), - reinterpret_cast(outputs[2]), - args.activation_f, - args.activation_g, - args.activation_h, - args.clip); + reference::lstm_cell(reinterpret_cast(in_seqs.data() + time_step * part_size), + squeeze_axis(shapes[0], 1), + reinterpret_cast(H_i), + squeeze_axis(shapes[2], 1), + reinterpret_cast(C_i), + squeeze_axis(shapes[3], 1), + reinterpret_cast(inputs[4]), + squeeze_axis(shapes[4], 0), + reinterpret_cast(inputs[5]), + squeeze_axis(shapes[5], 0), + reinterpret_cast(inputs[6]), + squeeze_axis(shapes[6], 0), + reinterpret_cast(outputs[1]), + reinterpret_cast(outputs[2]), + args.activation_f, + args.activation_g, + args.activation_h, + args.clip); } else if (type == CellType::LSTM_v1) { - runtime::reference::lstm_cell_v1(reinterpret_cast(in_seqs.data() + time_step * part_size), - squeeze_axis(shapes[0], 1), - reinterpret_cast(H_i), - squeeze_axis(shapes[2], 1), - reinterpret_cast(C_i), - squeeze_axis(shapes[3], 1), - reinterpret_cast(inputs[4]), - squeeze_axis(shapes[4], 0), - reinterpret_cast(inputs[5]), - squeeze_axis(shapes[5], 0), - reinterpret_cast(inputs[6]), - squeeze_axis(shapes[6], 0), - reinterpret_cast(inputs[7]), - squeeze_axis(shapes[7], 0), - reinterpret_cast(outputs[1]), - reinterpret_cast(outputs[2]), - args.activation_f, - args.activation_g, - args.activation_h, - args.clip, - args.weight_format, - args.input_forget); + reference::lstm_cell_v1(reinterpret_cast(in_seqs.data() + time_step * part_size), + squeeze_axis(shapes[0], 1), + reinterpret_cast(H_i), + squeeze_axis(shapes[2], 1), + reinterpret_cast(C_i), + squeeze_axis(shapes[3], 1), + reinterpret_cast(inputs[4]), + squeeze_axis(shapes[4], 0), + reinterpret_cast(inputs[5]), + squeeze_axis(shapes[5], 0), + reinterpret_cast(inputs[6]), + squeeze_axis(shapes[6], 0), + reinterpret_cast(inputs[7]), + squeeze_axis(shapes[7], 0), + reinterpret_cast(outputs[1]), + reinterpret_cast(outputs[2]), + args.activation_f, + args.activation_g, + args.activation_h, + args.clip, + args.weight_format, + args.input_forget); } else if (type == CellType::RNN) { - runtime::reference::rnn_cell(reinterpret_cast(in_seqs.data() + time_step * part_size), - squeeze_axis(shapes[0], 1), - reinterpret_cast(H_i), - squeeze_axis(shapes[2], 1), - reinterpret_cast(inputs[3]), - squeeze_axis(shapes[3], 0), - reinterpret_cast(inputs[4]), - squeeze_axis(shapes[4], 0), - reinterpret_cast(inputs[5]), - squeeze_axis(shapes[5], 0), - reinterpret_cast(outputs[1]), - args.activation_f, - args.clip); + reference::rnn_cell(reinterpret_cast(in_seqs.data() + time_step * part_size), + squeeze_axis(shapes[0], 1), + reinterpret_cast(H_i), + squeeze_axis(shapes[2], 1), + reinterpret_cast(inputs[3]), + squeeze_axis(shapes[3], 0), + reinterpret_cast(inputs[4]), + squeeze_axis(shapes[4], 0), + reinterpret_cast(inputs[5]), + squeeze_axis(shapes[5], 0), + reinterpret_cast(outputs[1]), + args.activation_f, + args.clip); } else if (type == CellType::GRU) { - runtime::reference::gru_cell(reinterpret_cast(in_seqs.data() + time_step * part_size), - squeeze_axis(shapes[0], 1), - reinterpret_cast(H_i), - squeeze_axis(shapes[2], 1), - reinterpret_cast(inputs[3]), - squeeze_axis(shapes[3], 0), - reinterpret_cast(inputs[4]), - squeeze_axis(shapes[4], 0), - reinterpret_cast(inputs[5]), - squeeze_axis(shapes[5], 0), - reinterpret_cast(outputs[1]), - args.activation_f, - args.activation_g, - args.clip, - args.linear_before_reset); + reference::gru_cell(reinterpret_cast(in_seqs.data() + time_step * part_size), + squeeze_axis(shapes[0], 1), + reinterpret_cast(H_i), + squeeze_axis(shapes[2], 1), + reinterpret_cast(inputs[3]), + squeeze_axis(shapes[3], 0), + reinterpret_cast(inputs[4]), + squeeze_axis(shapes[4], 0), + reinterpret_cast(inputs[5]), + squeeze_axis(shapes[5], 0), + reinterpret_cast(outputs[1]), + args.activation_f, + args.activation_g, + args.clip, + args.linear_before_reset); } else if (type == CellType::AUGRU) { - runtime::reference::gru_cell(reinterpret_cast(in_seqs.data() + time_step * part_size), - squeeze_axis(shapes[0], 1), - reinterpret_cast(H_i), - squeeze_axis(shapes[2], 1), - reinterpret_cast(inputs[3]), - squeeze_axis(shapes[3], 0), - reinterpret_cast(inputs[4]), - squeeze_axis(shapes[4], 0), - reinterpret_cast(inputs[5]), - squeeze_axis(shapes[5], 0), - reinterpret_cast(outputs[1]), - args.activation_f, - args.activation_g, - args.clip, - args.linear_before_reset, - reinterpret_cast(a_seqs.data() + time_step * batch * sizeof(T))); + reference::gru_cell(reinterpret_cast(in_seqs.data() + time_step * part_size), + squeeze_axis(shapes[0], 1), + reinterpret_cast(H_i), + squeeze_axis(shapes[2], 1), + reinterpret_cast(inputs[3]), + squeeze_axis(shapes[3], 0), + reinterpret_cast(inputs[4]), + squeeze_axis(shapes[4], 0), + reinterpret_cast(inputs[5]), + squeeze_axis(shapes[5], 0), + reinterpret_cast(outputs[1]), + args.activation_f, + args.activation_g, + args.clip, + args.linear_before_reset, + reinterpret_cast(a_seqs.data() + time_step * batch * sizeof(T))); } if (enable_mask) { @@ -254,7 +253,7 @@ void cell_pass(CellType type, for (size_t i = 0; i < num_splits; ++i) to_concat_pointers[i] = h_list[i].data(); - runtime::reference::concat(to_concat_pointers, outputs[0], in_shapes, out_shape, 1, sizeof(T)); + reference::concat(to_concat_pointers, outputs[0], in_shapes, out_shape, 1, sizeof(T)); if (is_reverse) // enable_mask { @@ -365,24 +364,19 @@ void lstm_sequence(const char* X, Shape output_shape_y{H_shape[0], 2, X_shape[1], H_shape[2]}; Shape output_shape_h_c{H_shape[0], 2, H_shape[2]}; - runtime::reference::concat({forward_res_y.data(), reverse_res_y.data()}, - Y, - in_shapes_y, - output_shape_y, - 1, - sizeof(T)); - runtime::reference::concat({forward_res[0].data(), reverse_res[0].data()}, - Ho, - in_shapes_h_c, - output_shape_h_c, - 1, - sizeof(T)); - runtime::reference::concat({forward_res[1].data(), reverse_res[1].data()}, - Co, - in_shapes_h_c, - output_shape_h_c, - 1, - sizeof(T)); + reference::concat({forward_res_y.data(), reverse_res_y.data()}, Y, in_shapes_y, output_shape_y, 1, sizeof(T)); + reference::concat({forward_res[0].data(), reverse_res[0].data()}, + Ho, + in_shapes_h_c, + output_shape_h_c, + 1, + sizeof(T)); + reference::concat({forward_res[1].data(), reverse_res[1].data()}, + Co, + in_shapes_h_c, + output_shape_h_c, + 1, + sizeof(T)); } } @@ -495,24 +489,19 @@ void lstm_sequence_v1(const char* X, Shape output_shape_y{H_shape[0], 2, X_shape[1], H_shape[2]}; Shape output_shape_h_c{H_shape[0], 2, H_shape[2]}; - runtime::reference::concat({forward_res_y.data(), reverse_res_y.data()}, - Y, - in_shapes_y, - output_shape_y, - 1, - sizeof(T)); - runtime::reference::concat({forward_res[0].data(), reverse_res[0].data()}, - Ho, - in_shapes_h_c, - output_shape_h_c, - 1, - sizeof(T)); - runtime::reference::concat({forward_res[1].data(), reverse_res[1].data()}, - Co, - in_shapes_h_c, - output_shape_h_c, - 1, - sizeof(T)); + reference::concat({forward_res_y.data(), reverse_res_y.data()}, Y, in_shapes_y, output_shape_y, 1, sizeof(T)); + reference::concat({forward_res[0].data(), reverse_res[0].data()}, + Ho, + in_shapes_h_c, + output_shape_h_c, + 1, + sizeof(T)); + reference::concat({forward_res[1].data(), reverse_res[1].data()}, + Co, + in_shapes_h_c, + output_shape_h_c, + 1, + sizeof(T)); } } @@ -616,18 +605,8 @@ void gru_sequence(const char* X, Shape output_shape_y{H_shape[0], 2, X_shape[1], H_shape[2]}; Shape output_shape_h{H_shape[0], 2, H_shape[2]}; - runtime::reference::concat({forward_res_y.data(), reverse_res_y.data()}, - Y, - in_shapes_y, - output_shape_y, - 1, - sizeof(T)); - runtime::reference::concat({forward_res_h.data(), reverse_res_h.data()}, - Ho, - in_shapes_h, - output_shape_h, - 1, - sizeof(T)); + reference::concat({forward_res_y.data(), reverse_res_y.data()}, Y, in_shapes_y, output_shape_y, 1, sizeof(T)); + reference::concat({forward_res_h.data(), reverse_res_h.data()}, Ho, in_shapes_h, output_shape_h, 1, sizeof(T)); } } @@ -714,20 +693,9 @@ void rnn_sequence(const char* X, Shape output_shape_y{H_shape[0], 2, X_shape[1], H_shape[2]}; Shape output_shape_h{H_shape[0], 2, H_shape[2]}; - runtime::reference::concat({forward_res_y.data(), reverse_res_y.data()}, - Y, - in_shapes_y, - output_shape_y, - 1, - sizeof(T)); - runtime::reference::concat({forward_res_h.data(), reverse_res_h.data()}, - Ho, - in_shapes_h, - output_shape_h, - 1, - sizeof(T)); + reference::concat({forward_res_y.data(), reverse_res_y.data()}, Y, in_shapes_y, output_shape_y, 1, sizeof(T)); + reference::concat({forward_res_h.data(), reverse_res_h.data()}, Ho, in_shapes_h, output_shape_h, 1, sizeof(T)); } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/shape_of.hpp b/src/core/reference/include/openvino/reference/shape_of.hpp index b52afea118b..940c236ec1f 100644 --- a/src/core/reference/include/openvino/reference/shape_of.hpp +++ b/src/core/reference/include/openvino/reference/shape_of.hpp @@ -6,8 +6,7 @@ #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template inline void shape_of(const Shape& arg_shape, T* out) { @@ -16,5 +15,4 @@ inline void shape_of(const Shape& arg_shape, T* out) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/shuffle_channels.hpp b/src/core/reference/include/openvino/reference/shuffle_channels.hpp index 054cb082723..aff376b15b9 100644 --- a/src/core/reference/include/openvino/reference/shuffle_channels.hpp +++ b/src/core/reference/include/openvino/reference/shuffle_channels.hpp @@ -10,8 +10,7 @@ #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void shuffle_channels(const char* arg, char* out, @@ -20,5 +19,4 @@ void shuffle_channels(const char* arg, const int64_t axis, const int64_t group); } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/sigmoid.hpp b/src/core/reference/include/openvino/reference/sigmoid.hpp index 5e8766680a4..d30aedf21ae 100644 --- a/src/core/reference/include/openvino/reference/sigmoid.hpp +++ b/src/core/reference/include/openvino/reference/sigmoid.hpp @@ -8,8 +8,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template ::value, bool>::type = true> void sigmoid(const T* arg, T* out, size_t count) { @@ -29,5 +28,4 @@ void sigmoid(const T* arg, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/sign.hpp b/src/core/reference/include/openvino/reference/sign.hpp index a27474ffa46..5666eb5ebf4 100644 --- a/src/core/reference/include/openvino/reference/sign.hpp +++ b/src/core/reference/include/openvino/reference/sign.hpp @@ -6,8 +6,7 @@ #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void sign(const T* arg, T* out, size_t count) { @@ -16,5 +15,4 @@ void sign(const T* arg, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/slice.hpp b/src/core/reference/include/openvino/reference/slice.hpp index 90e8ac5e388..a86b47f76fe 100644 --- a/src/core/reference/include/openvino/reference/slice.hpp +++ b/src/core/reference/include/openvino/reference/slice.hpp @@ -4,11 +4,10 @@ #pragma once -#include "ngraph/coordinate_transform.hpp" #include "ngraph/type/element_type.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { // Slice-8 reference implementation void slice(const char* data, @@ -30,5 +29,4 @@ void slice(const char* arg, const Shape& out_shape, size_t elem_size); } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/softmax.hpp b/src/core/reference/include/openvino/reference/softmax.hpp index 7ac0e64d5ae..d4cbf5bbaff 100644 --- a/src/core/reference/include/openvino/reference/softmax.hpp +++ b/src/core/reference/include/openvino/reference/softmax.hpp @@ -6,10 +6,10 @@ #include -#include "ngraph/coordinate_transform.hpp" #include "ngraph/shape_util.hpp" #include "openvino/reference/max.hpp" #include "openvino/reference/sum.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" namespace ov { namespace reference { @@ -20,17 +20,17 @@ void softmax(const T* arg, T* out, const Shape& shape, const AxisSet& axes) { auto temp_elements = shape_size(temp_shape); auto temp_ptr = new T[temp_elements]; - ngraph::runtime::reference::max(arg, temp_ptr, shape, axes); + max(arg, temp_ptr, shape, axes); - ngraph::CoordinateTransform transform(shape); - ngraph::CoordinateTransform temp_transform(temp_shape); + CoordinateTransform transform(shape); + CoordinateTransform temp_transform(temp_shape); for (const Coordinate& coord : transform) { Coordinate temp_coord = ngraph::reduce(coord, axes, true); out[transform.index(coord)] = std::exp(arg[transform.index(coord)] - temp_ptr[temp_transform.index(temp_coord)]); } - ngraph::runtime::reference::sum(out, temp_ptr, shape, axes); + sum(out, temp_ptr, shape, axes); for (const Coordinate& coord : transform) { Coordinate temp_coord = ngraph::reduce(coord, axes, true); diff --git a/src/core/reference/include/openvino/reference/softplus.hpp b/src/core/reference/include/openvino/reference/softplus.hpp index 7f703a579e9..77d817f8507 100644 --- a/src/core/reference/include/openvino/reference/softplus.hpp +++ b/src/core/reference/include/openvino/reference/softplus.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void softplus(const T* arg, T* out, size_t count) { @@ -19,5 +18,4 @@ void softplus(const T* arg, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/softsign.hpp b/src/core/reference/include/openvino/reference/softsign.hpp index a5d953be595..59cd44f7d47 100644 --- a/src/core/reference/include/openvino/reference/softsign.hpp +++ b/src/core/reference/include/openvino/reference/softsign.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void softsign(const T* arg, T* out, size_t count) { @@ -17,5 +16,4 @@ void softsign(const T* arg, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/space_to_depth.hpp b/src/core/reference/include/openvino/reference/space_to_depth.hpp index 6a27ad08dc3..3eeb2653463 100644 --- a/src/core/reference/include/openvino/reference/space_to_depth.hpp +++ b/src/core/reference/include/openvino/reference/space_to_depth.hpp @@ -7,16 +7,14 @@ #include "ngraph/op/space_to_depth.hpp" #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void space_to_depth(const char* const in, const Shape& in_shape, char* const out, const Shape& out_shape, const size_t block_size, - const op::SpaceToDepth::SpaceToDepthMode mode, + const op::v0::SpaceToDepth::SpaceToDepthMode mode, const size_t elem_size); } -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/split.hpp b/src/core/reference/include/openvino/reference/split.hpp index 033905ec23d..dcbede1883a 100644 --- a/src/core/reference/include/openvino/reference/split.hpp +++ b/src/core/reference/include/openvino/reference/split.hpp @@ -8,8 +8,7 @@ #include "openvino/reference/slice.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void split(const char* data, const Shape& data_shape, @@ -18,5 +17,4 @@ void split(const char* data, size_t num_splits, char** out_data); } -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/sqrt.hpp b/src/core/reference/include/openvino/reference/sqrt.hpp index 77b088fb94f..e0d4d4f1ba0 100644 --- a/src/core/reference/include/openvino/reference/sqrt.hpp +++ b/src/core/reference/include/openvino/reference/sqrt.hpp @@ -8,8 +8,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template typename std::enable_if::value>::type sqrt(const T* arg, T* out, size_t count) { @@ -24,5 +23,4 @@ typename std::enable_if::value>::type sqrt(const T* arg, T* } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/squared_difference.hpp b/src/core/reference/include/openvino/reference/squared_difference.hpp index e681f34223b..b28586d3623 100644 --- a/src/core/reference/include/openvino/reference/squared_difference.hpp +++ b/src/core/reference/include/openvino/reference/squared_difference.hpp @@ -7,11 +7,10 @@ #include #include -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape_util.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void squared_difference(const T* arg0, @@ -25,5 +24,4 @@ void squared_difference(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/strided_slice.hpp b/src/core/reference/include/openvino/reference/strided_slice.hpp index 82b065b8e0b..9c47c8c1e8f 100644 --- a/src/core/reference/include/openvino/reference/strided_slice.hpp +++ b/src/core/reference/include/openvino/reference/strided_slice.hpp @@ -7,19 +7,17 @@ #include #include "ngraph/check.hpp" -#include "ngraph/coordinate_transform.hpp" #include "ngraph/runtime/host_tensor.hpp" #include "ngraph/runtime/opt_kernel/reshape.hpp" #include "ngraph/slice_plan.hpp" #include "openvino/reference/reverse.hpp" #include "openvino/reference/slice.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { NGRAPH_SUPPRESS_DEPRECATED_START -void strided_slice(const char* arg, char* out, const Shape& arg_shape, const SlicePlan& sp, size_t elem_type); +void strided_slice(const char* arg, char* out, const Shape& arg_shape, const ngraph::SlicePlan& sp, size_t elem_type); NGRAPH_SUPPRESS_DEPRECATED_END } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/subtract.hpp b/src/core/reference/include/openvino/reference/subtract.hpp index 1e00fa81880..1e5454bb64a 100644 --- a/src/core/reference/include/openvino/reference/subtract.hpp +++ b/src/core/reference/include/openvino/reference/subtract.hpp @@ -7,11 +7,10 @@ #include #include "ngraph/op/util/attr_types.hpp" -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void subtract(const T* arg0, const T* arg1, T* out, size_t count) { @@ -32,5 +31,4 @@ void subtract(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/sum.hpp b/src/core/reference/include/openvino/reference/sum.hpp index b7c3798eb50..3f811b3d566 100644 --- a/src/core/reference/include/openvino/reference/sum.hpp +++ b/src/core/reference/include/openvino/reference/sum.hpp @@ -7,13 +7,12 @@ #include #include -#include "ngraph/coordinate_transform.hpp" #include "ngraph/shape_util.hpp" #include "ngraph/type/bfloat16.hpp" #include "ngraph/type/float16.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace details { // Windows doesn't seem to like it if we directly use std::isfinite on integer @@ -60,7 +59,7 @@ template void sum(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduction_axes) { constexpr bool dont_keep_dims_in_output = false; NGRAPH_SUPPRESS_DEPRECATED_START - const auto out_shape = reduce(in_shape, reduction_axes, dont_keep_dims_in_output); + const auto out_shape = ngraph::reduce(in_shape, reduction_axes, dont_keep_dims_in_output); std::vector cs(shape_size(out_shape), 0); std::fill(out, out + shape_size(out_shape), T(0)); @@ -70,7 +69,7 @@ void sum(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduction_a CoordinateTransformBasic input_transform(in_shape); for (const Coordinate& input_coord : input_transform) { - const Coordinate output_coord = reduce(input_coord, reduction_axes, dont_keep_dims_in_output); + const Coordinate output_coord = ngraph::reduce(input_coord, reduction_axes, dont_keep_dims_in_output); const size_t in_idx = std::inner_product(input_coord.begin(), input_coord.end(), in_strides.begin(), uint64_t(0)); @@ -82,5 +81,4 @@ void sum(const T* arg, T* out, const Shape& in_shape, const AxisSet& reduction_a NGRAPH_SUPPRESS_DEPRECATED_END } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/swish.hpp b/src/core/reference/include/openvino/reference/swish.hpp index 5a5761bfb65..99d1b9fe273 100644 --- a/src/core/reference/include/openvino/reference/swish.hpp +++ b/src/core/reference/include/openvino/reference/swish.hpp @@ -7,8 +7,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void swish(const T* arg, const T* beta, T* out, size_t count) { @@ -21,5 +20,4 @@ void swish(const T* arg, const T* beta, T* out, size_t count) { } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/tensor_iterator.hpp b/src/core/reference/include/openvino/reference/tensor_iterator.hpp index 8456dfa416f..f4ff4d8919e 100644 --- a/src/core/reference/include/openvino/reference/tensor_iterator.hpp +++ b/src/core/reference/include/openvino/reference/tensor_iterator.hpp @@ -7,18 +7,16 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { using custom_evaluate_function = std::function< - void(const std::shared_ptr& function, const HostTensorVector& inputs, HostTensorVector& outputs)>; + void(const std::shared_ptr& function, const HostTensorVector& inputs, HostTensorVector& outputs)>; void tensor_iterator(uint64_t num_iterations, - const std::shared_ptr& body, + const std::shared_ptr& body, const op::util::OutputDescriptionVector& out_descs, const op::util::InputDescriptionVector& input_descs, const HostTensorVector& out, const HostTensorVector& args, const custom_evaluate_function& evaluate = nullptr); } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/tile.hpp b/src/core/reference/include/openvino/reference/tile.hpp index 193a63902de..2ee3da6b0c0 100644 --- a/src/core/reference/include/openvino/reference/tile.hpp +++ b/src/core/reference/include/openvino/reference/tile.hpp @@ -6,11 +6,10 @@ #include -#include "ngraph/coordinate_transform.hpp" #include "ngraph/type/element_type.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void tile(const char* arg, char* out, @@ -19,5 +18,4 @@ void tile(const char* arg, const size_t elem_size, const std::vector& repeats); } -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/topk.hpp b/src/core/reference/include/openvino/reference/topk.hpp index ed48dab1256..0b7b4d48a53 100644 --- a/src/core/reference/include/openvino/reference/topk.hpp +++ b/src/core/reference/include/openvino/reference/topk.hpp @@ -8,11 +8,10 @@ #include #include -#include "ngraph/coordinate_transform.hpp" #include "ngraph/op/topk.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { // This used to be lambda expressions but MSVC had difficulty compiling it. This way is more explicit. template @@ -113,5 +112,4 @@ void topk(const T* arg, NGRAPH_SUPPRESS_DEPRECATED_END } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/transpose.hpp b/src/core/reference/include/openvino/reference/transpose.hpp index 73dadada649..03af9040382 100644 --- a/src/core/reference/include/openvino/reference/transpose.hpp +++ b/src/core/reference/include/openvino/reference/transpose.hpp @@ -11,8 +11,7 @@ #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void transpose(const char* data, char* out, @@ -21,5 +20,4 @@ void transpose(const char* data, const int64_t* axes_order, Shape out_shape); } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/unique.hpp b/src/core/reference/include/openvino/reference/unique.hpp index 40b38353503..f037f1e7f00 100644 --- a/src/core/reference/include/openvino/reference/unique.hpp +++ b/src/core/reference/include/openvino/reference/unique.hpp @@ -5,12 +5,11 @@ #pragma once #include "gather.hpp" -#include "ngraph/coordinate_index.hpp" -#include "ngraph/coordinate_transform.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/utils/coordinate_index.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { enum class DescriptorType { SINGLE_VALUE, SLICE }; @@ -137,8 +136,8 @@ UniqueElements find_unique_elements(const Data_t* data, auto elem_coord_rhs = *it; elem_coord_rhs.insert(elem_coord_rhs.cbegin() + axisVal, rhs.idx); - const auto lhs_elem_idx = ngraph::coordinate_index(elem_coord_lhs, data_shape); - const auto rhs_elem_idx = ngraph::coordinate_index(elem_coord_rhs, data_shape); + const auto lhs_elem_idx = coordinate_index(elem_coord_lhs, data_shape); + const auto rhs_elem_idx = coordinate_index(elem_coord_rhs, data_shape); if (*(data + lhs_elem_idx) < *(data + rhs_elem_idx)) { return true; @@ -175,7 +174,7 @@ UniqueElements find_unique_elements(const Data_t* data, // needs to be injected manually. auto elem_coord = *it; elem_coord.insert(elem_coord.cbegin() + axisVal, slice_with_lower_idx.idx); - const auto lhs_elem_idx = ngraph::coordinate_index(elem_coord, data_shape); + const auto lhs_elem_idx = coordinate_index(elem_coord, data_shape); const auto rhs_elem_idx = lhs_elem_idx + slices_offset; if (*(data + lhs_elem_idx) != *(data + rhs_elem_idx)) { return false; @@ -333,13 +332,13 @@ void unique(Data_t* out_unique_elements, indices.push_back(descriptor.idx); } - ngraph::runtime::reference::gather(data, - indices.data(), - out_unique_elements, - data_shape, - Shape{descriptors.unique_tensor_elements.size()}, - out_shape, - descriptors.axis); + gather(data, + indices.data(), + out_unique_elements, + data_shape, + Shape{descriptors.unique_tensor_elements.size()}, + out_shape, + descriptors.axis); } // filling out this output tensor requires a separate pass over all elements of the input tensor @@ -351,5 +350,4 @@ void unique(Data_t* out_unique_elements, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/ngraph/coordinate_index.hpp b/src/core/reference/include/openvino/reference/utils/coordinate_index.hpp similarity index 58% rename from src/core/reference/include/ngraph/coordinate_index.hpp rename to src/core/reference/include/openvino/reference/utils/coordinate_index.hpp index d03a86dd938..7408e548cdb 100644 --- a/src/core/reference/include/ngraph/coordinate_index.hpp +++ b/src/core/reference/include/openvino/reference/utils/coordinate_index.hpp @@ -4,12 +4,11 @@ #pragma once -#include -#include -#include +#include "openvino/core/coordinate.hpp" +#include "openvino/core/shape.hpp" -namespace ngraph { +namespace ov { std::size_t coordinate_index(const Coordinate& c, const Shape& s); -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/ngraph/coordinate_range.hpp b/src/core/reference/include/openvino/reference/utils/coordinate_range.hpp similarity index 97% rename from src/core/reference/include/ngraph/coordinate_range.hpp rename to src/core/reference/include/openvino/reference/utils/coordinate_range.hpp index bbc0cc898b8..611a911ae27 100644 --- a/src/core/reference/include/ngraph/coordinate_range.hpp +++ b/src/core/reference/include/openvino/reference/utils/coordinate_range.hpp @@ -7,11 +7,11 @@ #include #include -#include "ngraph/coordinate.hpp" -#include "ngraph/shape.hpp" -#include "ngraph/strides.hpp" +#include "openvino/core/coordinate.hpp" +#include "openvino/core/shape.hpp" +#include "openvino/core/strides.hpp" -namespace ngraph { +namespace ov { namespace coordinates { namespace impl { namespace { @@ -204,4 +204,4 @@ using impl::index; using impl::reverse; using impl::slice; } // namespace coordinates -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/ngraph/coordinate_transform.hpp b/src/core/reference/include/openvino/reference/utils/coordinate_transform.hpp similarity index 93% rename from src/core/reference/include/ngraph/coordinate_transform.hpp rename to src/core/reference/include/openvino/reference/utils/coordinate_transform.hpp index 0c29862394c..d94f8022e65 100644 --- a/src/core/reference/include/ngraph/coordinate_transform.hpp +++ b/src/core/reference/include/openvino/reference/utils/coordinate_transform.hpp @@ -4,14 +4,14 @@ #pragma once -#include "ngraph/axis_vector.hpp" -#include "ngraph/coordinate.hpp" -#include "ngraph/coordinate_diff.hpp" -#include "ngraph/deprecated.hpp" -#include "ngraph/shape.hpp" -#include "ngraph/strides.hpp" +#include "openvino/core/axis_vector.hpp" +#include "openvino/core/coordinate.hpp" +#include "openvino/core/coordinate_diff.hpp" +#include "openvino/core/deprecated.hpp" +#include "openvino/core/shape.hpp" +#include "openvino/core/strides.hpp" -namespace ngraph { +namespace ov { /// \brief A useful class that allows to iterate over the tensor coordinates. /// For example, for tensor with dimensions {2, 3} this iterator /// produces the following coordinates: @@ -76,7 +76,7 @@ public: /// \brief The tensor element index calculation by given coordinate. /// \param c tensor element coordinate /// \deprecated - NGRAPH_DEPRECATED("This method is deprecated and will be removed soon.") + OPENVINO_DEPRECATED("This method is deprecated and will be removed soon.") size_t index(const Coordinate& c) const; /// \brief Returns an iterator to the first coordinate of the tensor. @@ -93,7 +93,7 @@ protected: /// and helps to iterate over the subset of coordinates. /// Tensor items should be placed in memory in row-major order. /// \deprecated -class NGRAPH_DEPRECATED("This class is deprecated and will be removed soon.") CoordinateTransform +class OPENVINO_DEPRECATED("This class is deprecated and will be removed soon.") CoordinateTransform : protected CoordinateTransformBasic { public: using Iterator = CoordinateIterator; @@ -170,4 +170,4 @@ private: Shape m_target_shape; size_t m_n_axes; }; -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/utils/fft_common.hpp b/src/core/reference/include/openvino/reference/utils/fft_common.hpp index 98934aa1426..d445efbba71 100644 --- a/src/core/reference/include/openvino/reference/utils/fft_common.hpp +++ b/src/core/reference/include/openvino/reference/utils/fft_common.hpp @@ -14,8 +14,7 @@ #include "ngraph/shape.hpp" #include "ngraph/type/element_type.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace fft_common { // To simplify calculation of strides for all axes of 'shape' of some complex @@ -43,5 +42,4 @@ int64_t offset_from_coords_and_strides(const std::vector& coords, const std::vector reverse_fft_axes(const std::vector& axes, int64_t complex_data_rank); } // namespace fft_common } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/utils/nms_common.hpp b/src/core/reference/include/openvino/reference/utils/nms_common.hpp index c12b6d2bb75..4138db64085 100644 --- a/src/core/reference/include/openvino/reference/utils/nms_common.hpp +++ b/src/core/reference/include/openvino/reference/utils/nms_common.hpp @@ -12,8 +12,7 @@ #include "ngraph/type/element_type.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace nms_common { struct Rectangle { @@ -69,5 +68,4 @@ void nms_common_postprocessing(void* prois, } // namespace nms_common } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/utils/span.hpp b/src/core/reference/include/openvino/reference/utils/span.hpp index b103a4d2761..50fc379e916 100644 --- a/src/core/reference/include/openvino/reference/utils/span.hpp +++ b/src/core/reference/include/openvino/reference/utils/span.hpp @@ -10,8 +10,7 @@ #include #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace details { template @@ -165,5 +164,4 @@ constexpr auto span(Element* data, std::size_t size) -> Span { } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/include/openvino/reference/xor.hpp b/src/core/reference/include/openvino/reference/xor.hpp index 62f59233af7..b3c8bae203e 100644 --- a/src/core/reference/include/openvino/reference/xor.hpp +++ b/src/core/reference/include/openvino/reference/xor.hpp @@ -7,11 +7,10 @@ #include #include "ngraph/op/util/attr_types.hpp" -#include "ngraph/runtime/reference/autobroadcast_binop.hpp" #include "ngraph/shape.hpp" +#include "openvino/reference/autobroadcast_binop.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { template void logical_xor(const T* arg0, const T* arg1, T* out, size_t count) { @@ -32,5 +31,4 @@ void logical_xor(const T* arg0, }); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/broadcast.cpp b/src/core/reference/src/op/broadcast.cpp index 78cb26ad5c7..bfd27e5be56 100644 --- a/src/core/reference/src/op/broadcast.cpp +++ b/src/core/reference/src/op/broadcast.cpp @@ -6,8 +6,7 @@ #include "openvino/reference/tile.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void broadcast(const char* arg, char* out, @@ -32,5 +31,4 @@ void broadcast(const char* arg, return tile(arg, out, adjusted_in_shape, adjusted_out_shape, elem_size, repeats); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/concat.cpp b/src/core/reference/src/op/concat.cpp index 281608cd682..5617fe7ba02 100644 --- a/src/core/reference/src/op/concat.cpp +++ b/src/core/reference/src/op/concat.cpp @@ -6,8 +6,7 @@ #include -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace { std::vector calculate_shape_sizes(const std::vector& in_shapes) { @@ -46,5 +45,4 @@ void concat(const std::vector& args, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/convert.cpp b/src/core/reference/src/op/convert.cpp index efde306ed1d..2846802d6c4 100644 --- a/src/core/reference/src/op/convert.cpp +++ b/src/core/reference/src/op/convert.cpp @@ -6,10 +6,11 @@ #if defined(OPENVINO_ARCH_X86) || defined(OPENVINO_ARCH_X86_64) # include "jit_generator.hpp" + +using namespace ngraph::runtime; #endif -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { #if defined(OPENVINO_ARCH_X86) || defined(OPENVINO_ARCH_X86_64) namespace { @@ -533,5 +534,4 @@ size_t count_out_of_f16_range(const float* arg, size_t count) { } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/depth_to_space.cpp b/src/core/reference/src/op/depth_to_space.cpp index f4f688c46de..490b566f456 100644 --- a/src/core/reference/src/op/depth_to_space.cpp +++ b/src/core/reference/src/op/depth_to_space.cpp @@ -10,15 +10,14 @@ #include "ngraph/check.hpp" #include "ngraph/runtime/opt_kernel/reshape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void depth_to_space(const char* const in, const Shape& in_shape, char* const out, const Shape& out_shape, const size_t block_size, - const op::DepthToSpace::DepthToSpaceMode mode, + const op::v0::DepthToSpace::DepthToSpaceMode mode, const size_t elem_size) { // DepthToSpace run in tree steps: // - disperse data from depth channel @@ -65,7 +64,7 @@ void depth_to_space(const char* const in, // y = reshape(x'', // [N, C / (block_size ^ K), D1 * block_size, D2 * block_size, // D3 * block_size, ..., DK * block_size]) - case op::DepthToSpace::DepthToSpaceMode::DEPTH_FIRST: { + case op::v0::DepthToSpace::DepthToSpaceMode::DEPTH_FIRST: { dispersed_shape.insert(dispersed_shape.begin() + 1, c_flat); axes_order.push_back(1); for (size_t i = spatial_dim_index; i < in_shape.size(); ++i) { @@ -81,7 +80,7 @@ void depth_to_space(const char* const in, // K + (K + 1), K]) // y = reshape(x'', [N, C / (block_size ^ K), D1 * block_size, D2 * block_size, // D3 * block_size, ..., DK * block_size]) - case op::DepthToSpace::DepthToSpaceMode::BLOCKS_FIRST: { + case op::v0::DepthToSpace::DepthToSpaceMode::BLOCKS_FIRST: { dispersed_shape.insert(dispersed_shape.begin() + spatial_dims + 1, c_flat); axes_order.push_back(spatial_dims + 1); for (size_t i = 2; i < in_shape.size(); ++i) { @@ -97,9 +96,8 @@ void depth_to_space(const char* const in, post_transpose_shape[axis_idx] = dispersed_shape[axes_order[axis_idx]]; } - runtime::opt_kernel::reshape(in, out, dispersed_shape, axes_order, post_transpose_shape, elem_size); + ngraph::runtime::opt_kernel::reshape(in, out, dispersed_shape, axes_order, post_transpose_shape, elem_size); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/einsum.cpp b/src/core/reference/src/op/einsum.cpp index 7c9a58293f5..1901073f184 100644 --- a/src/core/reference/src/op/einsum.cpp +++ b/src/core/reference/src/op/einsum.cpp @@ -17,8 +17,7 @@ #include "openvino/reference/utils/span.hpp" NGRAPH_SUPPRESS_DEPRECATED_START -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace { /// \brief Compute einsum_path for a given Einsum node meaning that the @@ -291,15 +290,15 @@ HostTensorPtr unsqueeze_input(const HostTensorPtr& input, std::vector& } HostTensorPtr output = std::shared_ptr(new HostTensor(input->get_element_type(), output_shape)); - const AxisVector order = get_default_order(input->get_shape()); + const AxisVector order = ngraph::get_default_order(input->get_shape()); const auto element_type = input->get_element_type(); - ngraph::runtime::reference::reshape(reinterpret_cast(input->get_data_ptr()), - reinterpret_cast(output->get_data_ptr()), - input_shape, - order, - output_shape, - element_type.size()); + reference::reshape(reinterpret_cast(input->get_data_ptr()), + reinterpret_cast(output->get_data_ptr()), + input_shape, + order, + output_shape, + element_type.size()); return output; } @@ -353,10 +352,7 @@ void reduce_input(HostTensorVector& inputs, HostTensorPtr output_ptr = std::shared_ptr(new HostTensor(input_ptr->get_element_type(), output_shape)); - ngraph::runtime::reference::sum(input_ptr->get_data_ptr(), - output_ptr->get_data_ptr(), - input_shape, - reduced_axes); + reference::sum(input_ptr->get_data_ptr(), output_ptr->get_data_ptr(), input_shape, reduced_axes); // update a vector of inputs and input subscripts inputs[input_ind] = output_ptr; @@ -409,12 +405,12 @@ void transpose_input(HostTensorVector& inputs, }); HostTensorPtr output_ptr = std::shared_ptr(new HostTensor(element_type, output_shape)); - ngraph::runtime::reference::transpose(reinterpret_cast(input_ptr->get_data_ptr()), - reinterpret_cast(output_ptr->get_data_ptr()), - input_shape, - element_type.size(), - permutation.data(), - output_shape); + reference::transpose(reinterpret_cast(input_ptr->get_data_ptr()), + reinterpret_cast(output_ptr->get_data_ptr()), + input_shape, + element_type.size(), + permutation.data(), + output_shape); // update a vector of inputs and input subscripts inputs[input_ind] = output_ptr; @@ -454,12 +450,12 @@ void broadcast_input(HostTensorVector& inputs, std::vector broadcast_axes(old_shape.size()); std::iota(broadcast_axes.begin(), broadcast_axes.end(), new_shape.size() - old_shape.size()); - ngraph::runtime::reference::broadcast(reinterpret_cast(input->get_data_ptr()), - reinterpret_cast(output->get_data_ptr()), - input->get_shape(), - output->get_shape(), - broadcast_axes, - input->get_element_type().size()); + reference::broadcast(reinterpret_cast(input->get_data_ptr()), + reinterpret_cast(output->get_data_ptr()), + input->get_shape(), + output->get_shape(), + broadcast_axes, + input->get_element_type().size()); input = output; } @@ -534,12 +530,12 @@ HostTensorPtr build_multi_identity(const HostTensorPtr& input_ptr, ngraph::op::AutoBroadcastType::NUMPY); HostTensorPtr mul_output = std::shared_ptr(new HostTensor(identity->get_element_type(), output_shape.get_shape())); - ngraph::runtime::reference::multiply(multi_identity->get_data_ptr(), - identity->get_data_ptr(), - mul_output->get_data_ptr(), - multi_identity->get_shape(), - identity->get_shape(), - ngraph::op::AutoBroadcastType::NUMPY); + reference::multiply(multi_identity->get_data_ptr(), + identity->get_data_ptr(), + mul_output->get_data_ptr(), + multi_identity->get_shape(), + identity->get_shape(), + ngraph::op::AutoBroadcastType::NUMPY); multi_identity = mul_output; } return multi_identity; @@ -594,18 +590,15 @@ void extract_diagonal(HostTensorVector& inputs, std::vector& input_ HostTensorPtr multi_identity = build_multi_identity(input_ptr, repeated_labels, label_dim_map); HostTensorPtr mul_output = input_ptr; - ngraph::runtime::reference::multiply(input_ptr->get_data_ptr(), - multi_identity->get_data_ptr(), - mul_output->get_data_ptr(), - input_ptr->get_shape(), - multi_identity->get_shape(), - ngraph::op::AutoBroadcastType::NUMPY); + reference::multiply(input_ptr->get_data_ptr(), + multi_identity->get_data_ptr(), + mul_output->get_data_ptr(), + input_ptr->get_shape(), + multi_identity->get_shape(), + ngraph::op::AutoBroadcastType::NUMPY); HostTensorPtr result = std::shared_ptr(new HostTensor(input_ptr->get_element_type(), result_shape)); - ngraph::runtime::reference::sum(mul_output->get_data_ptr(), - result->get_data_ptr(), - mul_output->get_shape(), - reduced_axes); + reference::sum(mul_output->get_data_ptr(), result->get_data_ptr(), mul_output->get_shape(), reduced_axes); inputs[input_ind] = result; input_subscripts[input_ind] = resultant_subscript; } @@ -657,14 +650,14 @@ HostTensorPtr reshape_input_for_matmul(const HostTensorPtr& input, const auto element_type = input->get_element_type(); const auto input_shape = input->get_shape(); HostTensorPtr output = std::shared_ptr(new HostTensor(element_type, new_shape)); - const AxisVector order = get_default_order(input_shape); + const AxisVector order = ngraph::get_default_order(input_shape); - ngraph::runtime::reference::reshape(reinterpret_cast(input->get_data_ptr()), - reinterpret_cast(output->get_data_ptr()), - input_shape, - order, - new_shape, - element_type.size()); + reference::reshape(reinterpret_cast(input->get_data_ptr()), + reinterpret_cast(output->get_data_ptr()), + input_shape, + order, + new_shape, + element_type.size()); return output; } @@ -801,12 +794,12 @@ void contract_two_inputs(HostTensorVector& inputs, ngraph::op::AutoBroadcastType::NUMPY); HostTensorPtr mul_output = std::shared_ptr( new HostTensor(unsqueeze_output1->get_element_type(), output_shape.get_shape())); - ngraph::runtime::reference::multiply(unsqueeze_output1->get_data_ptr(), - unsqueeze_output2->get_data_ptr(), - mul_output->get_data_ptr(), - unsqueeze_output1->get_shape(), - unsqueeze_output2->get_shape(), - ngraph::op::AutoBroadcastType::NUMPY); + reference::multiply(unsqueeze_output1->get_data_ptr(), + unsqueeze_output2->get_data_ptr(), + mul_output->get_data_ptr(), + unsqueeze_output1->get_shape(), + unsqueeze_output2->get_shape(), + ngraph::op::AutoBroadcastType::NUMPY); // update input operand and input subscript for Einsum operation update_operands(inputs, input_subscripts, input_ind1, input_ind2, mul_output, resultant_subscript); @@ -879,7 +872,7 @@ void contract_two_inputs(HostTensorVector& inputs, // broadcast both inputs to have common sub-shape broadcasted that is needed // in case of ellipsis among the common labels - // ngraph::runtime::reference::broadcast() + // reference::broadcast() PartialShape::broadcast_merge_into(common_sub_shape1, common_sub_shape2, ngraph::op::AutoBroadcastType::NUMPY); Shape common_sub_shape = common_sub_shape1.get_shape(); broadcast_input(inputs, @@ -913,14 +906,14 @@ void contract_two_inputs(HostTensorVector& inputs, bool transpose_a = (is_separate_first1 ? false : true); bool transpose_b = (is_separate_first2 ? true : false); - ngraph::runtime::reference::matmul(matmul_operand1->get_data_ptr(), - matmul_operand2->get_data_ptr(), - matmul_output->get_data_ptr(), - matmul_operand1->get_shape(), - matmul_operand2->get_shape(), - matmul_output_shape, - transpose_a, - transpose_b); + reference::matmul(matmul_operand1->get_data_ptr(), + matmul_operand2->get_data_ptr(), + matmul_output->get_data_ptr(), + matmul_operand1->get_shape(), + matmul_operand2->get_shape(), + matmul_output_shape, + transpose_a, + transpose_b); // step 4. reshape back by unrolling dimensions corresponding to separate labels // if needed now dimensions corresponding to reduced labels are reduced by the @@ -937,13 +930,13 @@ void contract_two_inputs(HostTensorVector& inputs, HostTensorPtr contract_output = std::shared_ptr(new HostTensor(matmul_output->get_element_type(), back_shape)); - const AxisVector order = get_default_order(matmul_output->get_shape()); - ngraph::runtime::reference::reshape(reinterpret_cast(matmul_output->get_data_ptr()), - reinterpret_cast(contract_output->get_data_ptr()), - matmul_output->get_shape(), - order, - back_shape, - matmul_output->get_element_type().size()); + const AxisVector order = ngraph::get_default_order(matmul_output->get_shape()); + reference::reshape(reinterpret_cast(matmul_output->get_data_ptr()), + reinterpret_cast(contract_output->get_data_ptr()), + matmul_output->get_shape(), + order, + back_shape, + matmul_output->get_element_type().size()); update_operands(inputs, input_subscripts, input_ind1, input_ind2, contract_output, resultant_subscript); } @@ -1001,7 +994,4 @@ void einsum(const HostTensorVector& outputs, const HostTensorVector& inputs, con } } // namespace reference - -} // namespace runtime - -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/experimental_detectron_detection_output.cpp b/src/core/reference/src/op/experimental_detectron_detection_output.cpp index 8a7002e035f..da60c8a7ce8 100644 --- a/src/core/reference/src/op/experimental_detectron_detection_output.cpp +++ b/src/core/reference/src/op/experimental_detectron_detection_output.cpp @@ -207,8 +207,7 @@ bool SortScorePairDescend(const std::pair& pair1, const std::pair; +using ProposalBox = ov::reference::details::ProposalBox; void refine_anchors(const float* deltas, const float* scores, @@ -205,8 +205,7 @@ void fill_output_blobs(const float* proposals, } } // namespace -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void experimental_detectron_proposals_single_image( const float* im_info, @@ -339,5 +338,4 @@ void experimental_detectron_proposals_single_image_postprocessing(void* prois, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/experimental_detectron_roi_feature_extractor.cpp b/src/core/reference/src/op/experimental_detectron_roi_feature_extractor.cpp index c9314d8920a..ad4c35f3482 100644 --- a/src/core/reference/src/op/experimental_detectron_roi_feature_extractor.cpp +++ b/src/core/reference/src/op/experimental_detectron_roi_feature_extractor.cpp @@ -281,8 +281,7 @@ void ROIAlignForward(const int64_t nthreads, } } // namespace -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void experimental_detectron_roi_feature_extractor( const std::vector>& inputs, @@ -384,5 +383,4 @@ void experimental_detectron_roi_feature_extractor_postprocessing(void* prois_fea } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/fft.cpp b/src/core/reference/src/op/fft.cpp index bb9313ca350..012969f278f 100644 --- a/src/core/reference/src/op/fft.cpp +++ b/src/core/reference/src/op/fft.cpp @@ -28,11 +28,7 @@ #include "ngraph/shape.hpp" #include "openvino/reference/utils/fft_common.hpp" -using namespace ngraph; -using namespace ngraph::runtime::reference; - -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { // FFT operation supports for negative axes to transform. More precisely, according to // the FFT operation specification, axes should be integers from -(r - 1) to (r - 2) @@ -478,5 +474,4 @@ void fft_postprocessing(const HostTensorVector& outputs, } OPENVINO_SUPPRESS_DEPRECATED_END } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/function.cpp b/src/core/reference/src/op/function.cpp index e500f70ff59..cfd370e38a5 100644 --- a/src/core/reference/src/op/function.cpp +++ b/src/core/reference/src/op/function.cpp @@ -12,13 +12,10 @@ #include "openvino/core/deprecated.hpp" #include "openvino/reference/concat.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { OPENVINO_SUPPRESS_DEPRECATED_START -void function(const std::shared_ptr& function, - const HostTensorVector& inputs, - HostTensorVector& outputs) { +void function(const std::shared_ptr& function, const HostTensorVector& inputs, HostTensorVector& outputs) { const auto& results = function->get_results(); outputs.reserve(results.size()); for (size_t i = 0; i < results.size(); ++i) { @@ -28,5 +25,4 @@ void function(const std::shared_ptr& function, } OPENVINO_SUPPRESS_DEPRECATED_END } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/gather_tree.cpp b/src/core/reference/src/op/gather_tree.cpp index 789e56b1fd8..6e9ef4bb04d 100644 --- a/src/core/reference/src/op/gather_tree.cpp +++ b/src/core/reference/src/op/gather_tree.cpp @@ -10,10 +10,10 @@ #include #include "ngraph/check.hpp" -#include "ngraph/coordinate_transform.hpp" #include "openvino/core/except.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -using namespace ngraph; +using namespace ov; static size_t _asIndex(const char* source, const element::Type& element_type) { // According to the GatherTree op specification only I32 and FP32 precisions are supported. @@ -40,16 +40,16 @@ static size_t _asIndex(const char* source, const element::Type& element_type) { } // This is an implementation of the algorithm from the tensorflow 1.5 sources. -void runtime::reference::gather_tree(const char* step_ids, - const char* parent_ids, - const char* max_seq_len, - const char* end_token, - char* out, - const Shape& step_ids_shape, - const Shape& parent_ids_shape, - const Shape& max_seq_len_shape, - const Shape& end_token_shape, - const element::Type& element_type) { +void reference::gather_tree(const char* step_ids, + const char* parent_ids, + const char* max_seq_len, + const char* end_token, + char* out, + const Shape& step_ids_shape, + const Shape& parent_ids_shape, + const Shape& max_seq_len_shape, + const Shape& end_token_shape, + const element::Type& element_type) { if (step_ids_shape != parent_ids_shape) { OPENVINO_THROW("step_ids shape and parent_ids shape must be the same"); } @@ -74,7 +74,7 @@ void runtime::reference::gather_tree(const char* step_ids, } const auto in_strides = row_major_strides(step_ids_shape); - ngraph::CoordinateTransformBasic cordinate_transform(step_ids_shape); + CoordinateTransformBasic cordinate_transform(step_ids_shape); for (const auto& coord : cordinate_transform) { const auto out_idx = std::inner_product(coord.begin(), coord.end(), in_strides.begin(), uint64_t(0)); diff --git a/src/core/reference/src/op/generate_proposal.cpp b/src/core/reference/src/op/generate_proposal.cpp index 8a27c947bdd..3e4f9b8707b 100644 --- a/src/core/reference/src/op/generate_proposal.cpp +++ b/src/core/reference/src/op/generate_proposal.cpp @@ -210,8 +210,7 @@ static void generate_proposal_fill_output_blobs(const float* proposals, } } -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { static void generate_proposals_single_image(const std::vector& im_info, @@ -420,5 +419,4 @@ void generate_proposals_postprocessing(void* prois, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/group_convolution.cpp b/src/core/reference/src/op/group_convolution.cpp index 2a0f46829ef..f3a85a8b37a 100644 --- a/src/core/reference/src/op/group_convolution.cpp +++ b/src/core/reference/src/op/group_convolution.cpp @@ -4,8 +4,7 @@ #include "openvino/reference/group_convolution.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void validate_group_convolution_parameters(const Shape& in_shape, @@ -54,5 +53,4 @@ void validate_group_convolution_parameters(const Shape& in_shape, } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/group_convolution_backprop_data.cpp b/src/core/reference/src/op/group_convolution_backprop_data.cpp index 9892cfe2ca9..a45356d109d 100644 --- a/src/core/reference/src/op/group_convolution_backprop_data.cpp +++ b/src/core/reference/src/op/group_convolution_backprop_data.cpp @@ -6,8 +6,7 @@ #include "openvino/reference/group_convolution.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void infer_backward_conv_output_shape(const Shape& in_spatial_shape, @@ -113,5 +112,4 @@ void validate_group_convolution_backprop_data_parameters(const Shape& in_shape, } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/if.cpp b/src/core/reference/src/op/if.cpp index 4c627631396..3fe42b61719 100644 --- a/src/core/reference/src/op/if.cpp +++ b/src/core/reference/src/op/if.cpp @@ -8,12 +8,11 @@ #include "openvino/reference/function.hpp" OPENVINO_SUPPRESS_DEPRECATED_START -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { -void if_reference(const std::vector>& bodies, - const std::vector& out_descs, - const std::vector& input_descs, +void if_reference(const std::vector>& bodies, + const std::vector& out_descs, + const std::vector& input_descs, const HostTensorVector& out, const HostTensorVector& args) { NGRAPH_CHECK(args.size() > 0, "If operation must have input condition value"); @@ -42,5 +41,4 @@ void if_reference(const std::vector>& bodies, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/interpolate.cpp b/src/core/reference/src/op/interpolate.cpp index 1e6a8dd0666..64bf9f8b469 100644 --- a/src/core/reference/src/op/interpolate.cpp +++ b/src/core/reference/src/op/interpolate.cpp @@ -6,7 +6,7 @@ #include -using namespace ngraph::runtime::reference; +using namespace ov::reference; using Coordinate = ngraph::Coordinate; diff --git a/src/core/reference/src/op/irdft.cpp b/src/core/reference/src/op/irdft.cpp index 7fe1ab71d03..d66c7a8e556 100644 --- a/src/core/reference/src/op/irdft.cpp +++ b/src/core/reference/src/op/irdft.cpp @@ -14,11 +14,7 @@ #include "openvino/reference/fft.hpp" #include "openvino/reference/utils/fft_common.hpp" -using namespace ngraph; -using namespace ngraph::runtime::reference; - -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace { using complex_type = std::complex; @@ -153,5 +149,4 @@ void irdft(const std::vector& input_data, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/loop.cpp b/src/core/reference/src/op/loop.cpp index 3f7aaf5b840..0a1ee146664 100644 --- a/src/core/reference/src/op/loop.cpp +++ b/src/core/reference/src/op/loop.cpp @@ -4,24 +4,25 @@ #include "openvino/reference/loop.hpp" +#include "openvino/op/tensor_iterator.hpp" #include "openvino/reference/concat.hpp" #include "openvino/reference/function.hpp" #include "openvino/reference/split.hpp" + OPENVINO_SUPPRESS_DEPRECATED_START -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { -void loop(const std::shared_ptr& func, +void loop(const std::shared_ptr& func, const op::util::OutputDescriptionVector& out_descs, const op::util::InputDescriptionVector& input_descs, - const opset5::Loop::SpecialBodyPorts& special_ports, + const op::v5::Loop::SpecialBodyPorts& special_ports, const HostTensorVector& out, const HostTensorVector& args) { const auto& cur_iter_idx = special_ports.current_iteration_input_idx; auto val = std::find_if(input_descs.begin(), input_descs.end(), - [&cur_iter_idx](const op::util::InputDescriptionPtr& in_desc) { + [&cur_iter_idx](const op::util::SubGraphOp::InputDescription::Ptr& in_desc) { return in_desc->m_body_parameter_index == static_cast(cur_iter_idx); }); bool cur_iter_initial_value_exist = val != input_descs.end(); @@ -41,7 +42,7 @@ void loop(const std::shared_ptr& func, cur_iter->validate_and_infer_types(); } - auto init = std::make_shared(func->get_parameters().at(cur_iter_idx)->get_element_type(), + auto init = std::make_shared(func->get_parameters().at(cur_iter_idx)->get_element_type(), func->get_parameters().at(cur_iter_idx)->get_shape(), 0); inputs_to_body.at(cur_iter_idx)->initialize(init); @@ -56,7 +57,7 @@ void loop(const std::shared_ptr& func, std::vector back_edges; for (const auto& desc : input_descs) { inputs_to_body[desc->m_body_parameter_index] = args[desc->m_input_index]; - if (const auto& merged_desc = std::dynamic_pointer_cast(desc)) { + if (const auto& merged_desc = std::dynamic_pointer_cast(desc)) { back_edges.push_back({merged_desc->m_body_parameter_index, merged_desc->m_body_value_index}); cur_iter_back_edge_exist |= merged_desc->m_body_parameter_index == static_cast(cur_iter_idx); } @@ -79,20 +80,20 @@ void loop(const std::shared_ptr& func, auto exec_condition = args[1]->get_data_ptr(); if (exec_condition[0]) { // Find all ConcatOutputDescription - std::vector> concat_outputs; + std::vector> concat_outputs; for (const auto& desc : out_descs) { - if (const auto& concat_desc = std::dynamic_pointer_cast(desc)) { + if (const auto& concat_desc = std::dynamic_pointer_cast(desc)) { concat_outputs.push_back(concat_desc); } } // Slicing - std::vector> slice_inputs; + std::vector> slice_inputs; std::vector sliced_values; int slice_in_idx = 0; for (const auto& desc : input_descs) { if (const auto& slice_desc = - std::dynamic_pointer_cast(desc)) { + std::dynamic_pointer_cast(desc)) { const auto el_size = args[slice_desc->m_input_index]->get_element_type().size(); slice_inputs.push_back(slice_desc); auto shape = args[slice_desc->m_input_index]->get_shape(); @@ -187,7 +188,7 @@ void loop(const std::shared_ptr& func, } for (const auto& desc : out_descs) { - if (const auto& body_desc = std::dynamic_pointer_cast(desc)) { + if (const auto& body_desc = std::dynamic_pointer_cast(desc)) { const auto& res = body_outputs[body_desc->m_body_value_index]; out[body_desc->m_output_index]->set_shape(res->get_shape()); out[body_desc->m_output_index]->write(res->get_data_ptr(), res->get_size_in_bytes()); @@ -218,5 +219,4 @@ void loop(const std::shared_ptr& func, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/matmul.cpp b/src/core/reference/src/op/matmul.cpp index 0ae5046f5fa..446e941e984 100644 --- a/src/core/reference/src/op/matmul.cpp +++ b/src/core/reference/src/op/matmul.cpp @@ -11,8 +11,7 @@ #include "ngraph/shape_util.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace details { std::vector get_transpose_order(const Shape& input_shape) { @@ -25,5 +24,4 @@ std::vector get_transpose_order(const Shape& input_shape) { } } // namespace details } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/matrix_nms.cpp b/src/core/reference/src/op/matrix_nms.cpp index 5e0b51c9541..bc6b3847854 100644 --- a/src/core/reference/src/op/matrix_nms.cpp +++ b/src/core/reference/src/op/matrix_nms.cpp @@ -14,11 +14,7 @@ #include "openvino/reference/matrix_nms.hpp" #include "openvino/reference/utils/nms_common.hpp" -using namespace ngraph; -using namespace ngraph::runtime::reference; - -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace matrix_nms_v8 { template @@ -163,8 +159,8 @@ void matrix_nms(const float* boxes_data, int64_t* selected_indices, const Shape& selected_indices_shape, int64_t* valid_outputs) { - using Rectangle = runtime::reference::nms_common::Rectangle; - using BoxInfo = runtime::reference::nms_common::BoxInfo; + using Rectangle = reference::nms_common::Rectangle; + using BoxInfo = reference::nms_common::BoxInfo; // boxes shape: {num_batches, num_boxes, 4} // scores shape: {num_batches, num_classes, num_boxes} @@ -287,5 +283,4 @@ void matrix_nms(const float* boxes_data, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/multiclass_nms.cpp b/src/core/reference/src/op/multiclass_nms.cpp index e5e18073a99..cee59347ac1 100644 --- a/src/core/reference/src/op/multiclass_nms.cpp +++ b/src/core/reference/src/op/multiclass_nms.cpp @@ -14,14 +14,13 @@ #include "openvino/reference/multiclass_nms.hpp" #include "openvino/reference/utils/nms_common.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace multiclass_nms_impl { OPENVINO_SUPPRESS_DEPRECATED_START -using Rectangle = runtime::reference::nms_common::Rectangle; -using BoxInfo = runtime::reference::nms_common::BoxInfo; +using Rectangle = reference::nms_common::Rectangle; +using BoxInfo = reference::nms_common::BoxInfo; static float intersectionOverUnion(const Rectangle& boxI, const Rectangle& boxJ, const bool normalized) { const float norm = static_cast(normalized == false); @@ -394,5 +393,4 @@ void multiclass_nms(const float* boxes_data, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/non_max_suppression.cpp b/src/core/reference/src/op/non_max_suppression.cpp index e85d6e2d47d..e0032c3f5b4 100644 --- a/src/core/reference/src/op/non_max_suppression.cpp +++ b/src/core/reference/src/op/non_max_suppression.cpp @@ -12,11 +12,7 @@ #include "ngraph/shape.hpp" #include "openvino/reference/non_max_suppression.hpp" -using namespace ngraph; -using namespace ngraph::runtime::reference; - -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace { struct Rectangle { @@ -452,5 +448,4 @@ void nms5_postprocessing(const HostTensorVector& outputs, nms_postprocessing(outputs, output_type, selected_indices, selected_scores, valid_outputs, selected_scores_type); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/pad.cpp b/src/core/reference/src/op/pad.cpp index b6d74d6a32a..ad8ab0f9f0b 100644 --- a/src/core/reference/src/op/pad.cpp +++ b/src/core/reference/src/op/pad.cpp @@ -8,11 +8,10 @@ #include "ngraph/axis_vector.hpp" #include "ngraph/check.hpp" -#include "ngraph/coordinate_index.hpp" -#include "ngraph/coordinate_transform.hpp" +#include "openvino/reference/utils/coordinate_index.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace impl { namespace { template @@ -209,5 +208,4 @@ void pad(const char* data, impl::pad(data, pad_value, out, elem_size, data_shape, out_shape, padding_below, padding_above, pad_mode); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/random_uniform.cpp b/src/core/reference/src/op/random_uniform.cpp index dd9b556e76d..99bd70aca40 100644 --- a/src/core/reference/src/op/random_uniform.cpp +++ b/src/core/reference/src/op/random_uniform.cpp @@ -9,8 +9,7 @@ #include "ngraph/shape.hpp" #include "openvino/core/except.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace { @@ -321,5 +320,4 @@ std::pair random_uniform(const uint64_t* out_shape, } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/rdft.cpp b/src/core/reference/src/op/rdft.cpp index 52983e1fd48..771b05f73a1 100644 --- a/src/core/reference/src/op/rdft.cpp +++ b/src/core/reference/src/op/rdft.cpp @@ -23,11 +23,7 @@ #include "openvino/reference/fft.hpp" #include "openvino/reference/utils/fft_common.hpp" -using namespace ngraph; -using namespace ngraph::runtime::reference; - -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace { using complex_type = std::complex; @@ -85,5 +81,4 @@ void rdft(const std::vector& input_data, clip_and_write_result(axes_data, fft_result, output_fft_shape, rdft_result); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/reorg_yolo.cpp b/src/core/reference/src/op/reorg_yolo.cpp index 1cba3a2658d..1bf40680e16 100644 --- a/src/core/reference/src/op/reorg_yolo.cpp +++ b/src/core/reference/src/op/reorg_yolo.cpp @@ -10,10 +10,7 @@ #include "ngraph/shape.hpp" -using namespace ngraph; - -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void reorg_yolo(const char* arg, char* out, const Shape& in_shape, int64_t stride, const size_t elem_size) { // [N, C, H, W] @@ -57,5 +54,4 @@ void reorg_yolo(const char* arg, char* out, const Shape& in_shape, int64_t strid } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/reshape.cpp b/src/core/reference/src/op/reshape.cpp index e07485bf903..2da555a542a 100644 --- a/src/core/reference/src/op/reshape.cpp +++ b/src/core/reference/src/op/reshape.cpp @@ -8,11 +8,10 @@ #include #include "ngraph/check.hpp" -#include "ngraph/coordinate_range.hpp" -#include "ngraph/coordinate_transform.hpp" +#include "openvino/reference/utils/coordinate_range.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace { std::vector reorder(const std::vector& origin, const AxisVector& order) { @@ -52,5 +51,4 @@ void reshape(const char* arg, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/reverse.cpp b/src/core/reference/src/op/reverse.cpp index 78e26cbc714..0794a81ce95 100644 --- a/src/core/reference/src/op/reverse.cpp +++ b/src/core/reference/src/op/reverse.cpp @@ -9,12 +9,11 @@ #include #include "ngraph/check.hpp" -#include "ngraph/coordinate_range.hpp" +#include "openvino/reference/utils/coordinate_range.hpp" using namespace ngraph; -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void reverse(const char* arg, char* out, @@ -50,5 +49,4 @@ void reverse(const char* arg, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/shuffle_channels.cpp b/src/core/reference/src/op/shuffle_channels.cpp index 685d7ddecc1..487d9511538 100644 --- a/src/core/reference/src/op/shuffle_channels.cpp +++ b/src/core/reference/src/op/shuffle_channels.cpp @@ -6,8 +6,7 @@ #include "ngraph/runtime/opt_kernel/reshape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void shuffle_channels(const char* arg, char* out, @@ -43,11 +42,10 @@ void shuffle_channels(const char* arg, reshaped_input_shape[1], reshaped_input_shape[3]}; AxisVector axis_vector{0, 2, 1, 3}; - runtime::opt_kernel::reshape(arg, out, reshaped_input_shape, axis_vector, transposed_shape, elem_size); + ngraph::runtime::opt_kernel::reshape(arg, out, reshaped_input_shape, axis_vector, transposed_shape, elem_size); // Reshaped 4D tensor is interpreted as ND output tensor with original shape of data // input } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/slice.cpp b/src/core/reference/src/op/slice.cpp index faa0d3ba5cf..4ea9bc6be23 100644 --- a/src/core/reference/src/op/slice.cpp +++ b/src/core/reference/src/op/slice.cpp @@ -7,11 +7,10 @@ #include #include "ngraph/check.hpp" -#include "ngraph/coordinate_range.hpp" #include "openvino/core/except.hpp" +#include "openvino/reference/utils/coordinate_range.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void slice(const char* data, @@ -85,5 +84,4 @@ void slice(const char* arg, NGRAPH_SUPPRESS_DEPRECATED_END } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/space_to_depth.cpp b/src/core/reference/src/op/space_to_depth.cpp index d63627b081f..646550bb2a6 100644 --- a/src/core/reference/src/op/space_to_depth.cpp +++ b/src/core/reference/src/op/space_to_depth.cpp @@ -9,15 +9,14 @@ #include "ngraph/check.hpp" #include "ngraph/runtime/opt_kernel/reshape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void space_to_depth(const char* const in, const Shape& in_shape, char* const out, const Shape& out_shape, const size_t block_size, - const op::SpaceToDepth::SpaceToDepthMode mode, + const op::v0::SpaceToDepth::SpaceToDepthMode mode, const size_t elem_size) { // SpaceToDepth run in tree steps: // - disperse data from depth channel @@ -66,7 +65,7 @@ void space_to_depth(const char* const in, // x'' = transpose(x', [0, 1, 3, 5, ..., K + (K + 1), 2, 4, ..., K + K]) // y = reshape(x'', [N, C * (block_size ^ K), D1 / block_size, D2 / block_size, ..., // DK / block_size]) - case op::SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST: { + case op::v0::SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST: { axes_order.insert(axes_order.begin() + 1, 1); break; } @@ -75,7 +74,7 @@ void space_to_depth(const char* const in, // x'' = transpose(x', [0, 3, 5, ..., K + (K + 1), 1, 2, 4, ..., K + K]) // y = reshape(x'', [N, C * (block_size ^ K), D1 / block_size, D2 / block_size, ..., // DK / block_size]) - case op::SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST: { + case op::v0::SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST: { axes_order.insert(axes_order.begin() + spatial_dims + 1, 1); } } @@ -85,8 +84,7 @@ void space_to_depth(const char* const in, post_transpose_shape[axis_idx] = dispersed_shape[axes_order[axis_idx]]; } - runtime::opt_kernel::reshape(in, out, dispersed_shape, axes_order, post_transpose_shape, elem_size); + ngraph::runtime::opt_kernel::reshape(in, out, dispersed_shape, axes_order, post_transpose_shape, elem_size); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/split.cpp b/src/core/reference/src/op/split.cpp index e8095c258c4..41a2dba235a 100644 --- a/src/core/reference/src/op/split.cpp +++ b/src/core/reference/src/op/split.cpp @@ -10,14 +10,14 @@ #include "ngraph/check.hpp" -using namespace ngraph; +using namespace ov; -void runtime::reference::split(const char* data, - const Shape& data_shape, - size_t elem_size, - int64_t axis, - size_t num_splits, - char** out_data) { +void reference::split(const char* data, + const Shape& data_shape, + size_t elem_size, + int64_t axis, + size_t num_splits, + char** out_data) { const size_t part_length = data_shape.at(axis) / num_splits; Shape output_shape = data_shape; @@ -28,14 +28,14 @@ void runtime::reference::split(const char* data, upper_bounds.at(axis) = part_length; for (size_t i = 0; i < num_splits; ++i) { - runtime::reference::slice(data, - out_data[i], - data_shape, - lower_bounds, - upper_bounds, - Strides(lower_bounds.size(), 1), - output_shape, - elem_size); + reference::slice(data, + out_data[i], + data_shape, + lower_bounds, + upper_bounds, + Strides(lower_bounds.size(), 1), + output_shape, + elem_size); lower_bounds.at(axis) += part_length; upper_bounds.at(axis) += part_length; } diff --git a/src/core/reference/src/op/strided_slice.cpp b/src/core/reference/src/op/strided_slice.cpp index 5d16f130188..06e95dd4d17 100644 --- a/src/core/reference/src/op/strided_slice.cpp +++ b/src/core/reference/src/op/strided_slice.cpp @@ -11,14 +11,14 @@ #include "ngraph/check.hpp" #include "ngraph/runtime/aligned_buffer.hpp" -using namespace ngraph; +using namespace ov; NGRAPH_SUPPRESS_DEPRECATED_START -void runtime::reference::strided_slice(const char* arg, - char* out, - const Shape& arg_shape, - const SlicePlan& sp, - size_t elem_type) { +void reference::strided_slice(const char* arg, + char* out, + const Shape& arg_shape, + const ngraph::SlicePlan& sp, + size_t elem_type) { auto hasZeroDims = [](const ov::Shape& shape) -> bool { return std::any_of(shape.begin(), shape.end(), [](const size_t& dim) { return dim == 0; @@ -28,7 +28,7 @@ void runtime::reference::strided_slice(const char* arg, return; } - runtime::AlignedBuffer slice_out_buffer(shape_size(sp.reshape_in_shape) * elem_type); + ngraph::runtime::AlignedBuffer slice_out_buffer(shape_size(sp.reshape_in_shape) * elem_type); slice(reinterpret_cast(arg), slice_out_buffer.get_ptr(), arg_shape, @@ -38,13 +38,13 @@ void runtime::reference::strided_slice(const char* arg, sp.reshape_in_shape, elem_type); - runtime::AlignedBuffer reshape_out_buffer(shape_size(sp.reshape_out_shape) * elem_type); - opt_kernel::reshape(slice_out_buffer.get_ptr(), - reshape_out_buffer.get_ptr(), - sp.reshape_in_shape, - get_default_order(sp.reshape_in_shape.size()), - sp.reshape_out_shape, - elem_type); + ngraph::runtime::AlignedBuffer reshape_out_buffer(shape_size(sp.reshape_out_shape) * elem_type); + ngraph::runtime::opt_kernel::reshape(slice_out_buffer.get_ptr(), + reshape_out_buffer.get_ptr(), + sp.reshape_in_shape, + ngraph::get_default_order(sp.reshape_in_shape.size()), + sp.reshape_out_shape, + elem_type); reverse(reshape_out_buffer.get_ptr(), out, diff --git a/src/core/reference/src/op/tensor_iterator.cpp b/src/core/reference/src/op/tensor_iterator.cpp index c19fc688a5b..26646536372 100644 --- a/src/core/reference/src/op/tensor_iterator.cpp +++ b/src/core/reference/src/op/tensor_iterator.cpp @@ -9,11 +9,10 @@ #include "openvino/reference/split.hpp" OPENVINO_SUPPRESS_DEPRECATED_START -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void tensor_iterator(uint64_t num_iterations, - const std::shared_ptr& func, + const std::shared_ptr& func, const op::util::OutputDescriptionVector& out_descs, const op::util::InputDescriptionVector& input_descs, const HostTensorVector& out, @@ -31,25 +30,25 @@ void tensor_iterator(uint64_t num_iterations, std::vector back_edges; for (const auto& desc : input_descs) { inputs_to_body[desc->m_body_parameter_index] = args[desc->m_input_index]; - if (const auto& merged_desc = std::dynamic_pointer_cast(desc)) { + if (const auto& merged_desc = std::dynamic_pointer_cast(desc)) { back_edges.push_back({merged_desc->m_body_parameter_index, merged_desc->m_body_value_index}); } } // Find all ConcatOutputDescription - std::vector> concat_outputs; + std::vector> concat_outputs; for (const auto& desc : out_descs) { if (const auto& concat_desc = - std::dynamic_pointer_cast(desc)) { + std::dynamic_pointer_cast(desc)) { concat_outputs.push_back(concat_desc); } } // Slicing - std::vector> slice_inputs; + std::vector> slice_inputs; std::vector sliced_values; int slice_in_idx = 0; for (const auto& desc : input_descs) { - if (const auto& slice_desc = std::dynamic_pointer_cast(desc)) { + if (const auto& slice_desc = std::dynamic_pointer_cast(desc)) { const auto el_size = args[slice_desc->m_input_index]->get_element_type().size(); slice_inputs.push_back(slice_desc); auto shape = args[slice_desc->m_input_index]->get_shape(); @@ -105,7 +104,7 @@ void tensor_iterator(uint64_t num_iterations, } for (const auto& desc : out_descs) { - if (const auto& body_desc = std::dynamic_pointer_cast(desc)) { + if (const auto& body_desc = std::dynamic_pointer_cast(desc)) { // Copy output values from the last iteration const auto& res = body_outputs[body_desc->m_body_value_index]; out[body_desc->m_output_index]->set_shape(res->get_shape()); @@ -138,5 +137,4 @@ void tensor_iterator(uint64_t num_iterations, } } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/tile.cpp b/src/core/reference/src/op/tile.cpp index bff01bb0dc3..b027613d980 100644 --- a/src/core/reference/src/op/tile.cpp +++ b/src/core/reference/src/op/tile.cpp @@ -11,7 +11,7 @@ #include "ngraph/check.hpp" -using namespace ngraph; +using namespace ov; namespace { /// \brief For each axis calculates the product of inner axes @@ -31,12 +31,12 @@ std::vector create_pitches(const Shape& dims) { } } // namespace -void runtime::reference::tile(const char* arg, - char* out, - const Shape& in_shape, - const Shape& out_shape, - const size_t elem_size, - const std::vector& repeats) { +void reference::tile(const char* arg, + char* out, + const Shape& in_shape, + const Shape& out_shape, + const size_t elem_size, + const std::vector& repeats) { Shape in_shape_expanded(in_shape); in_shape_expanded.insert(in_shape_expanded.begin(), out_shape.size() - in_shape.size(), 1); size_t block_size = 0; diff --git a/src/core/reference/src/op/transpose.cpp b/src/core/reference/src/op/transpose.cpp index b3de7c9f116..1706775f572 100644 --- a/src/core/reference/src/op/transpose.cpp +++ b/src/core/reference/src/op/transpose.cpp @@ -12,8 +12,7 @@ #include "ngraph/runtime/opt_kernel/reshape.hpp" #include "ngraph/shape.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { void transpose(const char* data, char* out, @@ -24,8 +23,7 @@ void transpose(const char* data, // To reuse opt_kernel::reshape axes order vector has to be converted to AxisVector // Negative axes are not supported, it is validated by transpose evaluate method std::vector axis_vector(axes_order, axes_order + data_shape.size()); - runtime::opt_kernel::reshape(data, out, data_shape, axis_vector, out_shape, element_size); + ngraph::runtime::opt_kernel::reshape(data, out, data_shape, axis_vector, out_shape, element_size); } } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/utils/fft_common.cpp b/src/core/reference/src/op/utils/fft_common.cpp index 62a0bea81da..ec9c91a1211 100644 --- a/src/core/reference/src/op/utils/fft_common.cpp +++ b/src/core/reference/src/op/utils/fft_common.cpp @@ -12,8 +12,7 @@ #include "ngraph/check.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace fft_common { std::vector reverse_shape_of_emulated_complex_tensor(const ngraph::Shape& shape) { @@ -68,5 +67,4 @@ std::vector reverse_fft_axes(const std::vector& axes, int64_t } } // namespace fft_common } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/op/utils/nms_common.cpp b/src/core/reference/src/op/utils/nms_common.cpp index 6db5f20878f..a8dfe16687b 100644 --- a/src/core/reference/src/op/utils/nms_common.cpp +++ b/src/core/reference/src/op/utils/nms_common.cpp @@ -10,8 +10,7 @@ #include "ngraph/check.hpp" -namespace ngraph { -namespace runtime { +namespace ov { namespace reference { namespace nms_common { void nms_common_postprocessing(void* prois, @@ -71,5 +70,4 @@ void nms_common_postprocessing(void* prois, } } // namespace nms_common } // namespace reference -} // namespace runtime -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/runtime/opt_kernel/reshape.cpp b/src/core/reference/src/runtime/opt_kernel/reshape.cpp index 1305ba0abd9..f1bfd265182 100644 --- a/src/core/reference/src/runtime/opt_kernel/reshape.cpp +++ b/src/core/reference/src/runtime/opt_kernel/reshape.cpp @@ -370,7 +370,7 @@ void runtime::opt_kernel::reshape(const char* in, reshape_in6(in, out, in_shape, in_axis_order, out_shape, elem_size); break; default: - reference::reshape(in, out, in_shape, in_axis_order, out_shape, elem_size); + ov::reference::reshape(in, out, in_shape, in_axis_order, out_shape, elem_size); break; } } diff --git a/src/core/reference/src/coordinate_index.cpp b/src/core/reference/src/utils/coordinate_index.cpp similarity index 77% rename from src/core/reference/src/coordinate_index.cpp rename to src/core/reference/src/utils/coordinate_index.cpp index 4a5c96c2b51..a8654d49169 100644 --- a/src/core/reference/src/coordinate_index.cpp +++ b/src/core/reference/src/utils/coordinate_index.cpp @@ -2,12 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "ngraph/coordinate_index.hpp" +#include "openvino/reference/utils/coordinate_index.hpp" -#include "ngraph/coordinate.hpp" -#include "ngraph/shape.hpp" +#include "openvino/core/coordinate.hpp" +#include "openvino/core/shape.hpp" -namespace ngraph { +namespace ov { std::size_t coordinate_index(const Coordinate& c, const Shape& s) { if (c.size() < s.size()) { throw std::domain_error("Coordinate rank is less than shape rank."); @@ -25,4 +25,4 @@ std::size_t coordinate_index(const Coordinate& c, const Shape& s) { return index; } -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/coordinate_range.cpp b/src/core/reference/src/utils/coordinate_range.cpp similarity index 97% rename from src/core/reference/src/coordinate_range.cpp rename to src/core/reference/src/utils/coordinate_range.cpp index 1b90c2eab42..61c039c8090 100644 --- a/src/core/reference/src/coordinate_range.cpp +++ b/src/core/reference/src/utils/coordinate_range.cpp @@ -2,15 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "ngraph/coordinate_range.hpp" +#include "openvino/reference/utils/coordinate_range.hpp" #include #include #include -#include "ngraph/coordinate_index.hpp" +#include "openvino/reference/utils/coordinate_index.hpp" -namespace ngraph { +namespace ov { namespace coordinates { namespace impl { namespace { @@ -171,4 +171,4 @@ bool ReverseRange::increment() { } // namespace impl } // namespace coordinates -} // namespace ngraph +} // namespace ov diff --git a/src/core/reference/src/coordinate_transform.cpp b/src/core/reference/src/utils/coordinate_transform.cpp similarity index 96% rename from src/core/reference/src/coordinate_transform.cpp rename to src/core/reference/src/utils/coordinate_transform.cpp index bc825700dd4..e62f6154652 100644 --- a/src/core/reference/src/coordinate_transform.cpp +++ b/src/core/reference/src/utils/coordinate_transform.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "ngraph/coordinate_transform.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" #include #include @@ -13,13 +13,13 @@ #include "ngraph/axis_vector.hpp" #include "ngraph/coordinate_diff.hpp" -#include "ngraph/coordinate_index.hpp" #include "ngraph/except.hpp" #include "ngraph/shape.hpp" #include "ngraph/strides.hpp" #include "ngraph/util.hpp" +#include "openvino/reference/utils/coordinate_index.hpp" -using namespace ngraph; +using namespace ov; NGRAPH_SUPPRESS_DEPRECATED_START namespace { @@ -124,8 +124,9 @@ CoordinateTransform::CoordinateTransform(const Shape& source_shape, for (size_t i = 0; i < m_n_axes; i++) { NGRAPH_SUPPRESS_DEPRECATED_START - std::ptrdiff_t padded_upper_bound = subtract_or_zero(source_shape[i], size_t(1)) * target_dilation_strides[i] + - 1 + target_padding_below[i] + target_padding_above[i]; + std::ptrdiff_t padded_upper_bound = + ngraph::subtract_or_zero(source_shape[i], size_t(1)) * target_dilation_strides[i] + 1 + + target_padding_below[i] + target_padding_above[i]; NGRAPH_SUPPRESS_DEPRECATED_END if (padded_upper_bound < 0) { @@ -166,8 +167,8 @@ CoordinateTransform::CoordinateTransform(const Shape& source_shape, for (size_t axis = 0; axis < m_n_axes; axis++) { m_target_shape.push_back( - ceil_div(source_end_corner[source_axis_order[axis]] - source_start_corner[source_axis_order[axis]], - source_strides[source_axis_order[axis]])); + ngraph::ceil_div(source_end_corner[source_axis_order[axis]] - source_start_corner[source_axis_order[axis]], + source_strides[source_axis_order[axis]])); } } diff --git a/src/core/src/op/abs.cpp b/src/core/src/op/abs.cpp index bc172845c44..cb4c093fbf3 100644 --- a/src/core/src/op/abs.cpp +++ b/src/core/src/op/abs.cpp @@ -26,7 +26,7 @@ namespace { template inline bool evaluate(const ngraph::HostTensorPtr& arg0, const ngraph::HostTensorPtr& out, const size_t count) { using T = typename ov::element_type_traits::value_type; - ngraph::runtime::reference::abs((arg0->get_data_ptr()), (out->get_data_ptr()), count); + ov::reference::abs((arg0->get_data_ptr()), (out->get_data_ptr()), count); return true; } diff --git a/src/core/src/op/add.cpp b/src/core/src/op/add.cpp index cc4d2c99ae2..8be44457dc3 100644 --- a/src/core/src/op/add.cpp +++ b/src/core/src/op/add.cpp @@ -19,12 +19,12 @@ bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& arg1, const HostTensorPtr& out, const op::AutoBroadcastSpec& broadcast_spec) { - runtime::reference::add(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - broadcast_spec); + ov::reference::add(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + broadcast_spec); return true; } diff --git a/src/core/src/op/batch_to_space.cpp b/src/core/src/op/batch_to_space.cpp index 8748022406d..4e3a391675d 100644 --- a/src/core/src/op/batch_to_space.cpp +++ b/src/core/src/op/batch_to_space.cpp @@ -170,7 +170,7 @@ bool batch_to_space_evaluate(const HostTensorVector& outputs, const HostTensorVe AxisSet(), AxisSet(), AxisSet()); - runtime::reference::strided_slice(flat_data, outputs[0]->get_data_ptr(), data_shape, slice_plan, elem_size); + ov::reference::strided_slice(flat_data, outputs[0]->get_data_ptr(), data_shape, slice_plan, elem_size); OPENVINO_SUPPRESS_DEPRECATED_END return true; } diff --git a/src/core/src/op/ceiling.cpp b/src/core/src/op/ceiling.cpp index 6bbc12d21cb..29a36600f2d 100644 --- a/src/core/src/op/ceiling.cpp +++ b/src/core/src/op/ceiling.cpp @@ -31,14 +31,14 @@ namespace { template inline bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& out, const size_t count) { using T = typename element_type_traits::value_type; - runtime::reference::ceiling(arg0->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::ceiling(arg0->get_data_ptr(), out->get_data_ptr(), count); return true; } // function used by COPY_TENSOR template inline bool copy_tensor(const HostTensorPtr& arg0, const HostTensorPtr& out, const size_t count) { - runtime::reference::copy(arg0->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::copy(arg0->get_data_ptr(), out->get_data_ptr(), count); return true; } diff --git a/src/core/src/op/clamp.cpp b/src/core/src/op/clamp.cpp index a81fd279bd7..b7f7f408905 100644 --- a/src/core/src/op/clamp.cpp +++ b/src/core/src/op/clamp.cpp @@ -19,7 +19,7 @@ namespace clamp { namespace { template bool evaluate(const HostTensorPtr& arg, const HostTensorPtr& out, T min, T max, size_t count) { - runtime::reference::clamp(arg->get_data_ptr(), out->get_data_ptr(), min, max, count); + ov::reference::clamp(arg->get_data_ptr(), out->get_data_ptr(), min, max, count); return true; } diff --git a/src/core/src/op/concat.cpp b/src/core/src/op/concat.cpp index d4966640c2a..7c0595d0256 100644 --- a/src/core/src/op/concat.cpp +++ b/src/core/src/op/concat.cpp @@ -90,12 +90,12 @@ bool evaluate_concat(const HostTensorVector& args, const HostTensorPtr& out, int out_shape[concatenation_axis] += arg_shapes.back()[concatenation_axis]; } out->set_shape(out_shape); - runtime::reference::concat(arg_bufs, - out->get_data_ptr(), - arg_shapes, - out_shape, - concatenation_axis, - out->get_element_type().size()); + ov::reference::concat(arg_bufs, + out->get_data_ptr(), + arg_shapes, + out_shape, + concatenation_axis, + out->get_element_type().size()); return true; } @@ -129,12 +129,12 @@ bool op::Concat::evaluate(ov::TensorVector& outputs, const ov::TensorVector& inp out_shape[concat_axis] += arg_shapes.back()[concat_axis]; } outputs.front().set_shape(out_shape); - ngraph::runtime::reference::concat(arg_bufs, - static_cast(outputs.front().data()), - arg_shapes, - out_shape, - concat_axis, - outputs.front().get_element_type().size()); + ov::reference::concat(arg_bufs, + static_cast(outputs.front().data()), + arg_shapes, + out_shape, + concat_axis, + outputs.front().get_element_type().size()); return true; } diff --git a/src/core/src/op/convert.cpp b/src/core/src/op/convert.cpp index 6e465279bbb..d6a34741fa3 100644 --- a/src/core/src/op/convert.cpp +++ b/src/core/src/op/convert.cpp @@ -53,13 +53,13 @@ bool evaluate(const HostTensorPtr& arg, const HostTensorPtr& out) { if (((INPUT_ET == element::u1) || (OUTPUT_ET == element::u1)) || ((INPUT_ET == element::u4) || (OUTPUT_ET == element::u4)) || ((INPUT_ET == element::i4) || (OUTPUT_ET == element::i4))) { - runtime::reference::detail::lp_convert(arg->get_data_ptr(), - out->get_data_ptr(), - element_count, - INPUT_ET, - OUTPUT_ET); + ov::reference::detail::lp_convert(arg->get_data_ptr(), + out->get_data_ptr(), + element_count, + INPUT_ET, + OUTPUT_ET); } else { - runtime::reference::convert(arg->get_data_ptr(), out->get_data_ptr(), element_count); + ov::reference::convert(arg->get_data_ptr(), out->get_data_ptr(), element_count); } return true; } diff --git a/src/core/src/op/cum_sum.cpp b/src/core/src/op/cum_sum.cpp index d18765e7cb9..9cfb94a13ec 100644 --- a/src/core/src/op/cum_sum.cpp +++ b/src/core/src/op/cum_sum.cpp @@ -62,12 +62,12 @@ template bool evaluate_cum_sum(TensorVector& outputs, const TensorVector& inputs, const bool exclusive, const bool reverse) { using data_t = fundamental_type_for; using axis_t = fundamental_type_for; - ngraph::runtime::reference::cumsum(inputs[0].data(), - inputs[1].data(), - outputs[0].data(), - inputs[0].get_shape(), - exclusive, - reverse); + ov::reference::cumsum(inputs[0].data(), + inputs[1].data(), + outputs[0].data(), + inputs[0].get_shape(), + exclusive, + reverse); return true; } diff --git a/src/core/src/op/depth_to_space.cpp b/src/core/src/op/depth_to_space.cpp index 9286679cea7..ce3003ed83f 100644 --- a/src/core/src/op/depth_to_space.cpp +++ b/src/core/src/op/depth_to_space.cpp @@ -62,13 +62,13 @@ bool evaluate_depth_to_space(const HostTensorVector& outputs, if (in->get_partial_shape().is_dynamic()) { return false; } - runtime::reference::depth_to_space(in->get_data_ptr(), - in->get_shape(), - out->get_data_ptr(), - out->get_shape(), - block_size, - mode, - elem_size); + ov::reference::depth_to_space(in->get_data_ptr(), + in->get_shape(), + out->get_data_ptr(), + out->get_shape(), + block_size, + mode, + elem_size); return true; } } // namespace diff --git a/src/core/src/op/divide.cpp b/src/core/src/op/divide.cpp index f7d1c8a569c..8ab229a9a74 100644 --- a/src/core/src/op/divide.cpp +++ b/src/core/src/op/divide.cpp @@ -30,13 +30,13 @@ bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& out, const op::AutoBroadcastSpec& broadcast_spec, bool pythondiv) { - runtime::reference::divide(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - broadcast_spec, - pythondiv); + ov::reference::divide(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + broadcast_spec, + pythondiv); return true; } diff --git a/src/core/src/op/equal.cpp b/src/core/src/op/equal.cpp index 160fa974582..035a9e24227 100644 --- a/src/core/src/op/equal.cpp +++ b/src/core/src/op/equal.cpp @@ -23,12 +23,12 @@ bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& arg1, const HostTensorPtr& out, const op::AutoBroadcastSpec& broadcast_spec) { - runtime::reference::equal(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - broadcast_spec); + ov::reference::equal(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + broadcast_spec); return true; } diff --git a/src/core/src/op/erf.cpp b/src/core/src/op/erf.cpp index 7b6e73798ac..36acd027a27 100644 --- a/src/core/src/op/erf.cpp +++ b/src/core/src/op/erf.cpp @@ -34,7 +34,7 @@ namespace { template inline bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& out, const size_t count) { using T = typename element_type_traits::value_type; - runtime::reference::erf(arg0->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::erf(arg0->get_data_ptr(), out->get_data_ptr(), count); return true; } diff --git a/src/core/src/op/exp.cpp b/src/core/src/op/exp.cpp index 8726fe03c76..d5076c963e4 100644 --- a/src/core/src/op/exp.cpp +++ b/src/core/src/op/exp.cpp @@ -34,7 +34,7 @@ namespace { template inline bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& out, const size_t count) { using T = typename element_type_traits::value_type; - runtime::reference::exp(arg0->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::exp(arg0->get_data_ptr(), out->get_data_ptr(), count); return true; } diff --git a/src/core/src/op/eye.cpp b/src/core/src/op/eye.cpp index e37c0422ae7..18c3de19c19 100644 --- a/src/core/src/op/eye.cpp +++ b/src/core/src/op/eye.cpp @@ -16,7 +16,7 @@ namespace eye { namespace { template bool evaluate(const ov::HostTensorPtr& out, const int64_t diagonal_index) { - ngraph::runtime::reference::eye(out->get_data_ptr(), out->get_shape(), diagonal_index); + ov::reference::eye(out->get_data_ptr(), out->get_shape(), diagonal_index); return true; } diff --git a/src/core/src/op/fake_quantize.cpp b/src/core/src/op/fake_quantize.cpp index 7eb8fa366c2..625d0c8952f 100644 --- a/src/core/src/op/fake_quantize.cpp +++ b/src/core/src/op/fake_quantize.cpp @@ -89,19 +89,19 @@ bool evaluate(const HostTensorPtr& arg0, using T = typename element_type_traits::value_type; out->set_shape(arg0->get_shape()); out->set_element_type(arg0->get_element_type()); - runtime::reference::fake_quantize(arg0->get_data_ptr(), - arg1->get_data_ptr(), - arg2->get_data_ptr(), - arg3->get_data_ptr(), - arg4->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - arg2->get_shape(), - arg3->get_shape(), - arg4->get_shape(), - parent->get_levels(), - parent->get_auto_broadcast()); + ov::reference::fake_quantize(arg0->get_data_ptr(), + arg1->get_data_ptr(), + arg2->get_data_ptr(), + arg3->get_data_ptr(), + arg4->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + arg2->get_shape(), + arg3->get_shape(), + arg4->get_shape(), + parent->get_levels(), + parent->get_auto_broadcast()); return true; } diff --git a/src/core/src/op/floor.cpp b/src/core/src/op/floor.cpp index 7ca324baed6..ffc9f20e1b1 100644 --- a/src/core/src/op/floor.cpp +++ b/src/core/src/op/floor.cpp @@ -35,14 +35,14 @@ namespace { template inline bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& out, const size_t count) { using T = typename element_type_traits::value_type; - runtime::reference::floor(arg0->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::floor(arg0->get_data_ptr(), out->get_data_ptr(), count); return true; } // function used by COPY_TENSOR template inline bool copy_tensor(const HostTensorPtr& arg0, const HostTensorPtr& out, const size_t count) { - runtime::reference::copy(arg0->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::copy(arg0->get_data_ptr(), out->get_data_ptr(), count); return true; } diff --git a/src/core/src/op/floor_mod.cpp b/src/core/src/op/floor_mod.cpp index cc89b061349..16bc282d5b0 100644 --- a/src/core/src/op/floor_mod.cpp +++ b/src/core/src/op/floor_mod.cpp @@ -30,12 +30,12 @@ bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& arg1, const HostTensorPtr& out, const op::AutoBroadcastSpec& broadcast_spec) { - runtime::reference::floor_mod(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - broadcast_spec); + ov::reference::floor_mod(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + broadcast_spec); return true; } diff --git a/src/core/src/op/gelu.cpp b/src/core/src/op/gelu.cpp index 3fdbc7ad581..c858cb1374d 100644 --- a/src/core/src/op/gelu.cpp +++ b/src/core/src/op/gelu.cpp @@ -110,7 +110,7 @@ inline bool evaluate(const HostTensorPtr& arg0, op::GeluApproximationMode mode, const size_t count) { using T = typename element_type_traits::value_type; - runtime::reference::gelu(arg0->get_data_ptr(), out->get_data_ptr(), mode, count); + ov::reference::gelu(arg0->get_data_ptr(), out->get_data_ptr(), mode, count); return true; } diff --git a/src/core/src/op/greater.cpp b/src/core/src/op/greater.cpp index d0a32d6c0b7..25323faf0dc 100644 --- a/src/core/src/op/greater.cpp +++ b/src/core/src/op/greater.cpp @@ -19,12 +19,12 @@ bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& arg1, const HostTensorPtr& out, const op::AutoBroadcastSpec& broadcast_spec) { - runtime::reference::greater(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - broadcast_spec); + ov::reference::greater(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + broadcast_spec); return true; } diff --git a/src/core/src/op/greater_eq.cpp b/src/core/src/op/greater_eq.cpp index 2b1bf2b0568..53d6e9a9e86 100644 --- a/src/core/src/op/greater_eq.cpp +++ b/src/core/src/op/greater_eq.cpp @@ -20,12 +20,12 @@ bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& arg1, const HostTensorPtr& out, const op::AutoBroadcastSpec& broadcast_spec) { - runtime::reference::greater_eq(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - broadcast_spec); + ov::reference::greater_eq(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + broadcast_spec); return true; } diff --git a/src/core/src/op/grid_sample.cpp b/src/core/src/op/grid_sample.cpp index ab015beac40..80226db5ce9 100644 --- a/src/core/src/op/grid_sample.cpp +++ b/src/core/src/op/grid_sample.cpp @@ -81,14 +81,14 @@ bool evaluate_exec(const HostTensorPtr& output, const HostTensorPtr& data, const HostTensorPtr& grid, const op::v9::GridSample::Attributes& attributes) { - ngraph::runtime::reference::grid_sample(output->get_data_ptr(), - data->get_data_ptr(), - grid->get_data_ptr(), - data->get_shape(), - grid->get_shape(), - attributes.align_corners, - attributes.mode, - attributes.padding_mode); + ov::reference::grid_sample(output->get_data_ptr(), + data->get_data_ptr(), + grid->get_data_ptr(), + data->get_shape(), + grid->get_shape(), + attributes.align_corners, + attributes.mode, + attributes.padding_mode); return true; } diff --git a/src/core/src/op/hsigmoid.cpp b/src/core/src/op/hsigmoid.cpp index 353e73760b8..af129217739 100644 --- a/src/core/src/op/hsigmoid.cpp +++ b/src/core/src/op/hsigmoid.cpp @@ -35,7 +35,7 @@ template inline bool evaluate(const HostTensorPtr& arg, const HostTensorPtr& out, const size_t count) { using T = typename element_type_traits::value_type; - runtime::reference::hsigmoid(arg->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::hsigmoid(arg->get_data_ptr(), out->get_data_ptr(), count); return true; } diff --git a/src/core/src/op/hswish.cpp b/src/core/src/op/hswish.cpp index 0cc38a36630..bd2791541c0 100644 --- a/src/core/src/op/hswish.cpp +++ b/src/core/src/op/hswish.cpp @@ -35,7 +35,7 @@ template inline bool evaluate(const HostTensorPtr& arg, const HostTensorPtr& out, const size_t count) { using T = typename element_type_traits::value_type; - runtime::reference::hswish(arg->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::hswish(arg->get_data_ptr(), out->get_data_ptr(), count); return true; } diff --git a/src/core/src/op/interpolate.cpp b/src/core/src/op/interpolate.cpp index edc1329310b..dff8920c916 100644 --- a/src/core/src/op/interpolate.cpp +++ b/src/core/src/op/interpolate.cpp @@ -182,8 +182,8 @@ static void pad_input_data(const uint8_t* data_ptr, const ov::Shape& padded_input_shape, const std::vector& pads_begin) { NGRAPH_SUPPRESS_DEPRECATED_START - ngraph::CoordinateTransform input_transform(input_shape); - ngraph::CoordinateTransform padded_transform(padded_input_shape); + ov::CoordinateTransform input_transform(input_shape); + ov::CoordinateTransform padded_transform(padded_input_shape); for (const ngraph::Coordinate& input_coord : input_transform) { auto padded_coord = input_coord; @@ -234,49 +234,49 @@ bool ov::op::v4::Interpolate::evaluate_interpolate(TensorVector& outputs, const switch (input_et) { case element::Type_t::f32: - ngraph::runtime::reference::interpolate(reinterpret_cast(padded_data_ptr), - padded_input_shape, - scales, - *axes, - outputs[0].data(), - out_shape, - m_attrs); + ov::reference::interpolate(reinterpret_cast(padded_data_ptr), + padded_input_shape, + scales, + *axes, + outputs[0].data(), + out_shape, + m_attrs); break; case element::Type_t::f16: - ngraph::runtime::reference::interpolate(reinterpret_cast(padded_data_ptr), - padded_input_shape, - scales, - *axes, - outputs[0].data(), - out_shape, - m_attrs); + ov::reference::interpolate(reinterpret_cast(padded_data_ptr), + padded_input_shape, + scales, + *axes, + outputs[0].data(), + out_shape, + m_attrs); break; case element::Type_t::bf16: - ngraph::runtime::reference::interpolate(reinterpret_cast(padded_data_ptr), - padded_input_shape, - scales, - *axes, - outputs[0].data(), - out_shape, - m_attrs); + ov::reference::interpolate(reinterpret_cast(padded_data_ptr), + padded_input_shape, + scales, + *axes, + outputs[0].data(), + out_shape, + m_attrs); break; case element::Type_t::i8: - ngraph::runtime::reference::interpolate(reinterpret_cast(padded_data_ptr), - padded_input_shape, - scales, - *axes, - outputs[0].data(), - out_shape, - m_attrs); + ov::reference::interpolate(reinterpret_cast(padded_data_ptr), + padded_input_shape, + scales, + *axes, + outputs[0].data(), + out_shape, + m_attrs); break; case element::Type_t::u8: - ngraph::runtime::reference::interpolate(reinterpret_cast(padded_data_ptr), - padded_input_shape, - scales, - *axes, - outputs[0].data(), - out_shape, - m_attrs); + ov::reference::interpolate(reinterpret_cast(padded_data_ptr), + padded_input_shape, + scales, + *axes, + outputs[0].data(), + out_shape, + m_attrs); break; default:; } diff --git a/src/core/src/op/less.cpp b/src/core/src/op/less.cpp index 53a4833311b..9f4b15bf204 100644 --- a/src/core/src/op/less.cpp +++ b/src/core/src/op/less.cpp @@ -19,12 +19,12 @@ bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& arg1, const HostTensorPtr& out, const op::AutoBroadcastSpec& broadcast_spec) { - runtime::reference::less(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - broadcast_spec); + ov::reference::less(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + broadcast_spec); return true; } diff --git a/src/core/src/op/less_eq.cpp b/src/core/src/op/less_eq.cpp index 7125859cce9..61e90cc3c9a 100644 --- a/src/core/src/op/less_eq.cpp +++ b/src/core/src/op/less_eq.cpp @@ -34,12 +34,12 @@ bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& arg1, const HostTensorPtr& out, const op::AutoBroadcastSpec& broadcast_spec) { - runtime::reference::less_eq(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - broadcast_spec); + ov::reference::less_eq(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + broadcast_spec); return true; } diff --git a/src/core/src/op/log.cpp b/src/core/src/op/log.cpp index 77a1ce631a6..ec592957b83 100644 --- a/src/core/src/op/log.cpp +++ b/src/core/src/op/log.cpp @@ -33,7 +33,7 @@ namespace { template inline bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& out, const size_t count) { using T = typename element_type_traits::value_type; - runtime::reference::log(arg0->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::log(arg0->get_data_ptr(), out->get_data_ptr(), count); return true; } diff --git a/src/core/src/op/logical_and.cpp b/src/core/src/op/logical_and.cpp index 79c0031d7b1..6b1c87eb4b5 100644 --- a/src/core/src/op/logical_and.cpp +++ b/src/core/src/op/logical_and.cpp @@ -38,12 +38,12 @@ bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& arg1, const HostTensorPtr& out, const op::AutoBroadcastSpec& broadcast_spec) { - runtime::reference::logical_and(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - broadcast_spec); + ov::reference::logical_and(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + broadcast_spec); return true; } diff --git a/src/core/src/op/logical_not.cpp b/src/core/src/op/logical_not.cpp index 135a2e699c1..da08f6260a3 100644 --- a/src/core/src/op/logical_not.cpp +++ b/src/core/src/op/logical_not.cpp @@ -37,7 +37,7 @@ namespace { template inline bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& out, const size_t count) { using T = typename element_type_traits::value_type; - runtime::reference::logical_not(arg0->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::logical_not(arg0->get_data_ptr(), out->get_data_ptr(), count); return true; } diff --git a/src/core/src/op/logical_or.cpp b/src/core/src/op/logical_or.cpp index d7acb24f00a..fd4e35c0c50 100644 --- a/src/core/src/op/logical_or.cpp +++ b/src/core/src/op/logical_or.cpp @@ -32,12 +32,12 @@ bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& arg1, const HostTensorPtr& out, const op::AutoBroadcastSpec& broadcast_spec) { - runtime::reference::logical_or(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - broadcast_spec); + ov::reference::logical_or(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + broadcast_spec); return true; } diff --git a/src/core/src/op/loop.cpp b/src/core/src/op/loop.cpp index 5c43e7b3962..419e564b19f 100644 --- a/src/core/src/op/loop.cpp +++ b/src/core/src/op/loop.cpp @@ -350,12 +350,12 @@ Output op::v5::Loop::get_concatenated_slices(const Output& value, OPENVINO_SUPPRESS_DEPRECATED_START bool op::v5::Loop::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { OV_OP_SCOPE(v5_Loop_evaluate); - ngraph::runtime::reference::loop(m_bodies[0], - m_output_descriptions[0], - m_input_descriptions[0], - m_special_body_ports, - outputs, - inputs); + ov::reference::loop(m_bodies[0], + m_output_descriptions[0], + m_input_descriptions[0], + m_special_body_ports, + outputs, + inputs); return true; } OPENVINO_SUPPRESS_DEPRECATED_END diff --git a/src/core/src/op/matmul.cpp b/src/core/src/op/matmul.cpp index bb5579f44cf..d3fd1a30e8e 100644 --- a/src/core/src/op/matmul.cpp +++ b/src/core/src/op/matmul.cpp @@ -51,14 +51,14 @@ bool evaluate(const op::MatMul* op, const HostTensorPtr& arg0, const HostTensorP output->set_element_type(arg0->get_element_type()); output->set_shape(output_shape); - runtime::reference::matmul(arg0->get_data_ptr(), - arg1->get_data_ptr(), - output->get_data_ptr(), - arg0_shape, - arg1_shape, - output_shape, - op->get_transpose_a(), - op->get_transpose_b()); + ov::reference::matmul(arg0->get_data_ptr(), + arg1->get_data_ptr(), + output->get_data_ptr(), + arg0_shape, + arg1_shape, + output_shape, + op->get_transpose_a(), + op->get_transpose_b()); return true; } diff --git a/src/core/src/op/max_pool.cpp b/src/core/src/op/max_pool.cpp index 7c017cab6f9..6a43995896f 100644 --- a/src/core/src/op/max_pool.cpp +++ b/src/core/src/op/max_pool.cpp @@ -72,14 +72,14 @@ inline bool evaluate(const HostTensorPtr& arg, const ov::Shape& padding_above) { using T = typename element_type_traits::value_type; out->set_shape(out_shape); - runtime::reference::max_pool(arg->get_data_ptr(), - out->get_data_ptr(), - arg->get_shape(), - out_shape, - window_shape, - window_movement_strides, - padding_below, - padding_above); + ov::reference::max_pool(arg->get_data_ptr(), + out->get_data_ptr(), + arg->get_shape(), + out_shape, + window_shape, + window_movement_strides, + padding_below, + padding_above); return true; } @@ -161,17 +161,17 @@ inline bool evaluate(const HostTensorPtr& data, const int64_t axis) { using Values_t = typename element_type_traits::value_type; using Indices_t = typename element_type_traits::value_type; - runtime::reference::max_pool(data->get_data_ptr(), - values->get_data_ptr(), - indices->get_data_ptr(), - data->get_shape(), - out_shape, - kernel, - strides, - dilations, - pads_begin, - pads_end, - axis); + ov::reference::max_pool(data->get_data_ptr(), + values->get_data_ptr(), + indices->get_data_ptr(), + data->get_shape(), + out_shape, + kernel, + strides, + dilations, + pads_begin, + pads_end, + axis); return true; } diff --git a/src/core/src/op/maximum.cpp b/src/core/src/op/maximum.cpp index f1b7a98862f..55f6b83e265 100644 --- a/src/core/src/op/maximum.cpp +++ b/src/core/src/op/maximum.cpp @@ -27,12 +27,12 @@ bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& arg1, const HostTensorPtr& out, const op::AutoBroadcastSpec& broadcast_spec) { - runtime::reference::maximum(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - broadcast_spec); + ov::reference::maximum(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + broadcast_spec); return true; } diff --git a/src/core/src/op/minimum.cpp b/src/core/src/op/minimum.cpp index 0a26b2ff9b7..26725b8a059 100644 --- a/src/core/src/op/minimum.cpp +++ b/src/core/src/op/minimum.cpp @@ -25,12 +25,12 @@ bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& arg1, const HostTensorPtr& out, const op::AutoBroadcastSpec& broadcast_spec) { - runtime::reference::minimum(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - broadcast_spec); + ov::reference::minimum(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + broadcast_spec); return true; } diff --git a/src/core/src/op/mish.cpp b/src/core/src/op/mish.cpp index f118d1183b8..fc39df6e999 100644 --- a/src/core/src/op/mish.cpp +++ b/src/core/src/op/mish.cpp @@ -49,7 +49,7 @@ namespace { template inline bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& out, const size_t count) { using T = typename element_type_traits::value_type; - runtime::reference::mish(arg0->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::mish(arg0->get_data_ptr(), out->get_data_ptr(), count); return true; } diff --git a/src/core/src/op/mod.cpp b/src/core/src/op/mod.cpp index baf5a8c7dde..8e605815b88 100644 --- a/src/core/src/op/mod.cpp +++ b/src/core/src/op/mod.cpp @@ -30,12 +30,12 @@ bool evaluate(const ov::Tensor& arg0, const ov::Tensor& arg1, const ov::Tensor& out, const op::AutoBroadcastSpec& broadcast_spec) { - runtime::reference::mod(arg0.data(), - arg1.data(), - out.data(), - arg0.get_shape(), - arg1.get_shape(), - broadcast_spec); + ov::reference::mod(arg0.data(), + arg1.data(), + out.data(), + arg0.get_shape(), + arg1.get_shape(), + broadcast_spec); return true; } diff --git a/src/core/src/op/multiply.cpp b/src/core/src/op/multiply.cpp index b0808006a01..23f21549c72 100644 --- a/src/core/src/op/multiply.cpp +++ b/src/core/src/op/multiply.cpp @@ -19,12 +19,12 @@ bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& arg1, const HostTensorPtr& out, const op::AutoBroadcastSpec& broadcast_spec) { - runtime::reference::multiply(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - broadcast_spec); + ov::reference::multiply(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + broadcast_spec); return true; } diff --git a/src/core/src/op/mvn.cpp b/src/core/src/op/mvn.cpp index ea4ce675e33..bf7a0afc71c 100644 --- a/src/core/src/op/mvn.cpp +++ b/src/core/src/op/mvn.cpp @@ -141,19 +141,19 @@ bool evaluate(ov::TensorVector& outputs, AxisSet reduction_axes; auto rank = inputs[0].get_shape().size(); if (inputs[1].get_element_type() == element::i64) { - reduction_axes = runtime::reference::mvn_6_reduction_axes(inputs[1], rank); + reduction_axes = ov::reference::mvn_6_reduction_axes(inputs[1], rank); } else if (inputs[1].get_element_type() == element::i32) { - reduction_axes = runtime::reference::mvn_6_reduction_axes(inputs[1], rank); + reduction_axes = ov::reference::mvn_6_reduction_axes(inputs[1], rank); } else { OPENVINO_THROW("Unexpected indices type"); } - runtime::reference::mvn_6(inputs[0].data(), - outputs[0].data(), - inputs[0].get_shape(), - reduction_axes, - normalize_variance, - eps, - eps_mode); + ov::reference::mvn_6(inputs[0].data(), + outputs[0].data(), + inputs[0].get_shape(), + reduction_axes, + normalize_variance, + eps, + eps_mode); return true; } diff --git a/src/core/src/op/negative.cpp b/src/core/src/op/negative.cpp index 298f28b0cee..3feadeb1c75 100644 --- a/src/core/src/op/negative.cpp +++ b/src/core/src/op/negative.cpp @@ -33,7 +33,7 @@ namespace { template inline bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& out, const size_t count) { using T = typename element_type_traits::value_type; - runtime::reference::negate(arg0->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::negate(arg0->get_data_ptr(), out->get_data_ptr(), count); return true; } diff --git a/src/core/src/op/non_zero.cpp b/src/core/src/op/non_zero.cpp index c5640f620cf..b24ce5c77b3 100644 --- a/src/core/src/op/non_zero.cpp +++ b/src/core/src/op/non_zero.cpp @@ -91,7 +91,7 @@ bool evaluate_nonzero_execute(const HostTensorPtr& input, const HostTensorPtr& o ov::Shape input_shape = input->get_shape(); size_t input_rank = input_shape.size(); - size_t non_zero_count = runtime::reference::non_zero_get_count(input->get_data_ptr(), input_shape); + size_t non_zero_count = ov::reference::non_zero_get_count(input->get_data_ptr(), input_shape); ov::Shape out_shape; if (input_rank == 0 && non_zero_count > 0) { @@ -101,9 +101,7 @@ bool evaluate_nonzero_execute(const HostTensorPtr& input, const HostTensorPtr& o } output->set_shape(out_shape); - runtime::reference::non_zero(input->get_data_ptr(), - output->get_data_ptr(), - input_shape); + ov::reference::non_zero(input->get_data_ptr(), output->get_data_ptr(), input_shape); return true; } diff --git a/src/core/src/op/not_equal.cpp b/src/core/src/op/not_equal.cpp index 8d20ea862b6..89018aec9bc 100644 --- a/src/core/src/op/not_equal.cpp +++ b/src/core/src/op/not_equal.cpp @@ -20,12 +20,12 @@ bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& arg1, const HostTensorPtr& out, const op::AutoBroadcastSpec& broadcast_spec) { - runtime::reference::not_equal(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - broadcast_spec); + ov::reference::not_equal(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + broadcast_spec); return true; } diff --git a/src/core/src/op/one_hot.cpp b/src/core/src/op/one_hot.cpp index 168b66472a1..963b4980f02 100644 --- a/src/core/src/op/one_hot.cpp +++ b/src/core/src/op/one_hot.cpp @@ -80,14 +80,14 @@ bool evaluate(const HostTensorVector& output_values, const HostTensorVector& inp const auto& on_value = input_values[2]; const auto& off_value = input_values[3]; const auto& out = output_values[0]; - runtime::reference::one_hot(indices->get_data_ptr(), - indices->get_shape(), - out->get_data_ptr(), - out->get_element_type().size(), - out->get_shape()[axis], - axis, - on_value->get_data_ptr(), - off_value->get_data_ptr()); + ov::reference::one_hot(indices->get_data_ptr(), + indices->get_shape(), + out->get_data_ptr(), + out->get_element_type().size(), + out->get_shape()[axis], + axis, + on_value->get_data_ptr(), + off_value->get_data_ptr()); return true; } bool evaluate_onehot(const HostTensorVector& output_values, const HostTensorVector& input_values, const int64_t axis) { diff --git a/src/core/src/op/power.cpp b/src/core/src/op/power.cpp index 67421178978..6c6f41c78ce 100644 --- a/src/core/src/op/power.cpp +++ b/src/core/src/op/power.cpp @@ -9,7 +9,7 @@ #include "ngraph/op/log.hpp" #include "ngraph/op/multiply.hpp" #include "ngraph/runtime/host_tensor.hpp" -#include "ngraph/runtime/reference/power.hpp" +#include "openvino/reference/power.hpp" using namespace std; using namespace ngraph; @@ -22,12 +22,12 @@ bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& arg1, const HostTensorPtr& out, const op::AutoBroadcastSpec& broadcast_spec) { - runtime::reference::power(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - broadcast_spec); + ov::reference::power(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + broadcast_spec); return true; } diff --git a/src/core/src/op/prelu.cpp b/src/core/src/op/prelu.cpp index b8f6174f7b3..2bc9380e6d4 100644 --- a/src/core/src/op/prelu.cpp +++ b/src/core/src/op/prelu.cpp @@ -37,11 +37,11 @@ namespace prelu { namespace { template bool evaluate(const ngraph::HostTensorPtr& arg, const ngraph::HostTensorPtr& slope, const ngraph::HostTensorPtr& out) { - ngraph::runtime::reference::prelu(arg->get_data_ptr(), - slope->get_data_ptr(), - out->get_data_ptr(), - arg->get_shape(), - slope->get_shape()); + ov::reference::prelu(arg->get_data_ptr(), + slope->get_data_ptr(), + out->get_data_ptr(), + arg->get_shape(), + slope->get_shape()); return true; } diff --git a/src/core/src/op/prior_box.cpp b/src/core/src/op/prior_box.cpp index a0f29483bfe..e66e3ea30bf 100644 --- a/src/core/src/op/prior_box.cpp +++ b/src/core/src/op/prior_box.cpp @@ -34,7 +34,7 @@ bool evaluate(const Tensor& arg0, const Tensor& arg1, Tensor& out, const op::v0: attrs_v8.scale_all_sizes = attrs.scale_all_sizes; using T = typename element_type_traits::value_type; - ngraph::runtime::reference::prior_box(arg0.data(), arg1.data(), out.data(), out.get_shape(), attrs_v8); + ov::reference::prior_box(arg0.data(), arg1.data(), out.data(), out.get_shape(), attrs_v8); return true; } @@ -176,7 +176,7 @@ namespace { template bool evaluate(const Tensor& arg0, const Tensor& arg1, Tensor& out, const op::v8::PriorBox::Attributes& attrs) { using T = typename element_type_traits::value_type; - ngraph::runtime::reference::prior_box(arg0.data(), arg1.data(), out.data(), out.get_shape(), attrs); + ov::reference::prior_box(arg0.data(), arg1.data(), out.data(), out.get_shape(), attrs); return true; } diff --git a/src/core/src/op/prior_box_clustered.cpp b/src/core/src/op/prior_box_clustered.cpp index 85f8ae916f7..5dc0521b48c 100644 --- a/src/core/src/op/prior_box_clustered.cpp +++ b/src/core/src/op/prior_box_clustered.cpp @@ -62,11 +62,7 @@ namespace { template bool evaluate(const Tensor& arg0, const Tensor& arg1, Tensor& out, op::v0::PriorBoxClustered::Attributes attrs) { using T = fundamental_type_for; - ngraph::runtime::reference::prior_box_clustered(arg0.data(), - arg1.data(), - out.data(), - out.get_shape(), - attrs); + ov::reference::prior_box_clustered(arg0.data(), arg1.data(), out.data(), out.get_shape(), attrs); return true; } diff --git a/src/core/src/op/random_uniform.cpp b/src/core/src/op/random_uniform.cpp index ab99624471c..c22c18ae030 100644 --- a/src/core/src/op/random_uniform.cpp +++ b/src/core/src/op/random_uniform.cpp @@ -92,15 +92,15 @@ bool RandomUniform::evaluate(TensorVector& outputs, const TensorVector& inputs) const auto& t_out = get_out_type(); OPENVINO_ASSERT(validate::out_et(t_out), "Unsupported type of RandomUniform: " + t_out.get_type_name()); - auto state = ngraph::runtime::reference::random_uniform(out_dims.data(), - static_cast(inputs[1].data()), - static_cast(inputs[2].data()), - static_cast(outputs[0].data()), - inputs[0].get_shape(), - get_out_type(), - get_global_seed(), - get_op_seed(), - m_state); + auto state = ov::reference::random_uniform(out_dims.data(), + static_cast(inputs[1].data()), + static_cast(inputs[2].data()), + static_cast(outputs[0].data()), + inputs[0].get_shape(), + get_out_type(), + get_global_seed(), + get_op_seed(), + m_state); // Update RandomUniform state std::lock_guard guard(m_state_mutex); diff --git a/src/core/src/op/range.cpp b/src/core/src/op/range.cpp index 2778ca08f32..557a8882264 100644 --- a/src/core/src/op/range.cpp +++ b/src/core/src/op/range.cpp @@ -170,7 +170,7 @@ bool evaluate(const HostTensorPtr& out, } ov::Shape out_shape = ov::Shape({static_cast(out_size)}); out->set_shape(out_shape); - runtime::reference::range(&start_val, &step_val, shape_size(out_shape), out->get_data_ptr()); + ov::reference::range(&start_val, &step_val, shape_size(out_shape), out->get_data_ptr()); return true; } diff --git a/src/core/src/op/reduce_l1.cpp b/src/core/src/op/reduce_l1.cpp index bafd258eaf7..213875d00c1 100644 --- a/src/core/src/op/reduce_l1.cpp +++ b/src/core/src/op/reduce_l1.cpp @@ -35,7 +35,7 @@ bool evaluate(const HostTensorPtr& arg, const HostTensorPtr& out, const AxisSet& OPENVINO_SUPPRESS_DEPRECATED_START out->set_shape(reduce(arg->get_shape(), axes, keep_dims)); OPENVINO_SUPPRESS_DEPRECATED_END - runtime::reference::reduce_l1(arg->get_data_ptr(), out->get_data_ptr(), arg->get_shape(), axes); + ov::reference::reduce_l1(arg->get_data_ptr(), out->get_data_ptr(), arg->get_shape(), axes); return true; } diff --git a/src/core/src/op/reduce_l2.cpp b/src/core/src/op/reduce_l2.cpp index ae840ba7127..fe0d066af86 100644 --- a/src/core/src/op/reduce_l2.cpp +++ b/src/core/src/op/reduce_l2.cpp @@ -35,7 +35,7 @@ bool evaluate(const HostTensorPtr& arg, const HostTensorPtr& out, const AxisSet& OPENVINO_SUPPRESS_DEPRECATED_START out->set_shape(reduce(arg->get_shape(), axes, keep_dims)); OPENVINO_SUPPRESS_DEPRECATED_END - runtime::reference::reduce_l2(arg->get_data_ptr(), out->get_data_ptr(), arg->get_shape(), axes); + ov::reference::reduce_l2(arg->get_data_ptr(), out->get_data_ptr(), arg->get_shape(), axes); return true; } diff --git a/src/core/src/op/reduce_logical_and.cpp b/src/core/src/op/reduce_logical_and.cpp index 9d8941fcc55..59a33cb8716 100644 --- a/src/core/src/op/reduce_logical_and.cpp +++ b/src/core/src/op/reduce_logical_and.cpp @@ -39,10 +39,10 @@ bool evaluate_reduce_logical_and(const HostTensorPtr& data, OPENVINO_SUPPRESS_DEPRECATED_START out->set_shape(reduce(data->get_shape(), reduction_axes, keep_dims)); try { - runtime::reference::reduce_logical_and(data->get_data_ptr(), - out->get_data_ptr(), - data->get_shape(), - reduction_axes); + ov::reference::reduce_logical_and(data->get_data_ptr(), + out->get_data_ptr(), + data->get_shape(), + reduction_axes); return true; } catch (const ngraph_error& e) { OPENVINO_WARN << e.what(); diff --git a/src/core/src/op/reduce_logical_or.cpp b/src/core/src/op/reduce_logical_or.cpp index 9b73f7a8b57..a167d44a884 100644 --- a/src/core/src/op/reduce_logical_or.cpp +++ b/src/core/src/op/reduce_logical_or.cpp @@ -39,10 +39,10 @@ bool evaluate_reduce_logical_or(const HostTensorPtr& data, OPENVINO_SUPPRESS_DEPRECATED_START out->set_shape(reduce(data->get_shape(), reduction_axes, keep_dims)); try { - runtime::reference::reduce_logical_or(data->get_data_ptr(), - out->get_data_ptr(), - data->get_shape(), - reduction_axes); + ov::reference::reduce_logical_or(data->get_data_ptr(), + out->get_data_ptr(), + data->get_shape(), + reduction_axes); return true; } catch (const ngraph_error& e) { OPENVINO_WARN << e.what(); diff --git a/src/core/src/op/reduce_max.cpp b/src/core/src/op/reduce_max.cpp index 33ce0b170fb..e7e33b5221c 100644 --- a/src/core/src/op/reduce_max.cpp +++ b/src/core/src/op/reduce_max.cpp @@ -24,7 +24,7 @@ bool evaluate(const HostTensorPtr& arg, const HostTensorPtr& out, const AxisSet& OPENVINO_SUPPRESS_DEPRECATED_START out->set_shape(reduce(arg->get_shape(), axes, keep_dims)); OPENVINO_SUPPRESS_DEPRECATED_END - runtime::reference::max(arg->get_data_ptr(), out->get_data_ptr(), arg->get_shape(), axes); + ov::reference::max(arg->get_data_ptr(), out->get_data_ptr(), arg->get_shape(), axes); return true; } diff --git a/src/core/src/op/reduce_mean.cpp b/src/core/src/op/reduce_mean.cpp index 931c98cf7fa..734efc4d814 100644 --- a/src/core/src/op/reduce_mean.cpp +++ b/src/core/src/op/reduce_mean.cpp @@ -36,7 +36,7 @@ bool evaluate(const HostTensorPtr& arg, const HostTensorPtr& out, const AxisSet& OPENVINO_SUPPRESS_DEPRECATED_START out->set_shape(reduce(arg->get_shape(), axes, keep_dims)); OPENVINO_SUPPRESS_DEPRECATED_END - runtime::reference::mean(arg->get_data_ptr(), out->get_data_ptr(), arg->get_shape(), axes); + ov::reference::mean(arg->get_data_ptr(), out->get_data_ptr(), arg->get_shape(), axes); return true; } diff --git a/src/core/src/op/reduce_min.cpp b/src/core/src/op/reduce_min.cpp index 8b6c1f25997..f77e5236b51 100644 --- a/src/core/src/op/reduce_min.cpp +++ b/src/core/src/op/reduce_min.cpp @@ -23,7 +23,7 @@ bool evaluate(const HostTensorPtr& arg, const HostTensorPtr& out, const AxisSet& OPENVINO_SUPPRESS_DEPRECATED_START out->set_shape(reduce(arg->get_shape(), axes, keep_dims)); OPENVINO_SUPPRESS_DEPRECATED_END - runtime::reference::min(arg->get_data_ptr(), out->get_data_ptr(), arg->get_shape(), axes); + ov::reference::min(arg->get_data_ptr(), out->get_data_ptr(), arg->get_shape(), axes); return true; } diff --git a/src/core/src/op/reduce_prod.cpp b/src/core/src/op/reduce_prod.cpp index 217345c2426..14747e9b5d6 100644 --- a/src/core/src/op/reduce_prod.cpp +++ b/src/core/src/op/reduce_prod.cpp @@ -34,7 +34,7 @@ bool evaluate(const HostTensorPtr& arg, const HostTensorPtr& out, const AxisSet& OPENVINO_SUPPRESS_DEPRECATED_START out->set_shape(reduce(arg->get_shape(), axes, keep_dims)); OPENVINO_SUPPRESS_DEPRECATED_END - runtime::reference::product(arg->get_data_ptr(), out->get_data_ptr(), arg->get_shape(), axes); + ov::reference::product(arg->get_data_ptr(), out->get_data_ptr(), arg->get_shape(), axes); return true; } diff --git a/src/core/src/op/reduce_sum.cpp b/src/core/src/op/reduce_sum.cpp index 85d4cfe99d2..47da7ee137b 100644 --- a/src/core/src/op/reduce_sum.cpp +++ b/src/core/src/op/reduce_sum.cpp @@ -37,7 +37,7 @@ bool evaluate(const HostTensorPtr& arg, const HostTensorPtr& out, const AxisSet& OPENVINO_SUPPRESS_DEPRECATED_START out->set_shape(reduce(arg->get_shape(), axes, keep_dims)); OPENVINO_SUPPRESS_DEPRECATED_END - runtime::reference::sum(arg->get_data_ptr(), out->get_data_ptr(), arg->get_shape(), axes); + ov::reference::sum(arg->get_data_ptr(), out->get_data_ptr(), arg->get_shape(), axes); return true; } diff --git a/src/core/src/op/relu.cpp b/src/core/src/op/relu.cpp index 5fe56b430ad..cbaa57030ba 100644 --- a/src/core/src/op/relu.cpp +++ b/src/core/src/op/relu.cpp @@ -30,7 +30,7 @@ namespace { template inline bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& out, const size_t count) { using T = typename element_type_traits::value_type; - runtime::reference::relu(arg0->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::relu(arg0->get_data_ptr(), out->get_data_ptr(), count); return true; } diff --git a/src/core/src/op/reverse.cpp b/src/core/src/op/reverse.cpp index 5f6f4e2010f..4caaa2fb01f 100644 --- a/src/core/src/op/reverse.cpp +++ b/src/core/src/op/reverse.cpp @@ -110,12 +110,12 @@ bool op::v1::Reverse::evaluate_reverse(const HostTensorVector& outputs, const Ho } } } - ngraph::runtime::reference::reverse(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - outputs[0]->get_shape(), - axes, - inputs[0]->get_element_type().size()); + ov::reference::reverse(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + outputs[0]->get_shape(), + axes, + inputs[0]->get_element_type().size()); return true; } diff --git a/src/core/src/op/roi_align.cpp b/src/core/src/op/roi_align.cpp index 354ef48304c..c57d1d13dd3 100644 --- a/src/core/src/op/roi_align.cpp +++ b/src/core/src/op/roi_align.cpp @@ -228,20 +228,20 @@ bool evaluate(const Tensor& feature_maps, const Shape& batch_indices_shape, const v9::ROIAlign::AlignedMode& aligned_mode = v9::ROIAlign::AlignedMode::ASYMMETRIC) { using T = typename element_type_traits::value_type; - ngraph::runtime::reference::roi_align(feature_maps.data(), - rois.data(), - batch_indices_vec_scaled_up.data(), - out.data(), - feature_maps.get_shape(), - rois.get_shape(), - batch_indices_shape, - out.get_shape(), - pooled_height, - pooled_width, - sampling_ratio, - spatial_scale, - pooling_mode, - aligned_mode); + ov::reference::roi_align(feature_maps.data(), + rois.data(), + batch_indices_vec_scaled_up.data(), + out.data(), + feature_maps.get_shape(), + rois.get_shape(), + batch_indices_shape, + out.get_shape(), + pooled_height, + pooled_width, + sampling_ratio, + spatial_scale, + pooling_mode, + aligned_mode); return true; } diff --git a/src/core/src/op/scatter_elements_update.cpp b/src/core/src/op/scatter_elements_update.cpp index b0762304ea9..8fc46e66c17 100644 --- a/src/core/src/op/scatter_elements_update.cpp +++ b/src/core/src/op/scatter_elements_update.cpp @@ -108,15 +108,15 @@ bool evaluate(const HostTensorPtr& data, out->set_shape(data->get_shape()); - ngraph::runtime::reference::scatter_elem_update(data->get_data_ptr
(), - indices->get_data_ptr(), - updates->get_data_ptr
(), - normalized_axis, - out->get_data_ptr
(), - data->get_shape(), - indices->get_shape(), - reduction_type, - use_init_value); + ov::reference::scatter_elem_update(data->get_data_ptr
(), + indices->get_data_ptr(), + updates->get_data_ptr
(), + normalized_axis, + out->get_data_ptr
(), + data->get_shape(), + indices->get_shape(), + reduction_type, + use_init_value); return true; } diff --git a/src/core/src/op/scatter_nd_update.cpp b/src/core/src/op/scatter_nd_update.cpp index b2be449ba61..2d49046ea11 100644 --- a/src/core/src/op/scatter_nd_update.cpp +++ b/src/core/src/op/scatter_nd_update.cpp @@ -33,21 +33,21 @@ bool evaluate(const HostTensorPtr& arg0, out->set_shape(arg0->get_shape()); if (arg1->get_element_type() == element::i64) { - runtime::reference::scatterNdUpdate(arg0->get_data_ptr(), - arg1->get_data_ptr(), - arg2->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - arg2->get_shape()); + ov::reference::scatterNdUpdate(arg0->get_data_ptr(), + arg1->get_data_ptr(), + arg2->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + arg2->get_shape()); } else if (arg1->get_element_type() == element::i32) { - runtime::reference::scatterNdUpdate(arg0->get_data_ptr(), - arg1->get_data_ptr(), - arg2->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - arg2->get_shape()); + ov::reference::scatterNdUpdate(arg0->get_data_ptr(), + arg1->get_data_ptr(), + arg2->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + arg2->get_shape()); } else { OPENVINO_THROW("Unexpected type ", arg1->get_element_type().c_type_string(), diff --git a/src/core/src/op/scatter_update.cpp b/src/core/src/op/scatter_update.cpp index aa44aab800a..32c15992c8b 100644 --- a/src/core/src/op/scatter_update.cpp +++ b/src/core/src/op/scatter_update.cpp @@ -78,15 +78,15 @@ bool op::v3::ScatterUpdate::evaluate_scatter_update(const HostTensorVector& outp return false; } - ngraph::runtime::reference::scatter_update(data->get_data_ptr(), - indices_casted_vector.data(), - updates->get_data_ptr(), - axis_val, - out->get_data_ptr(), - elem_size, - data->get_shape(), - indices->get_shape(), - updates->get_shape()); + ov::reference::scatter_update(data->get_data_ptr(), + indices_casted_vector.data(), + updates->get_data_ptr(), + axis_val, + out->get_data_ptr(), + elem_size, + data->get_shape(), + indices->get_shape(), + updates->get_shape()); return true; } diff --git a/src/core/src/op/select.cpp b/src/core/src/op/select.cpp index 4b2b05858e5..7a4668179bf 100644 --- a/src/core/src/op/select.cpp +++ b/src/core/src/op/select.cpp @@ -74,14 +74,14 @@ bool evaluate(const HostTensorVector& output_values, const auto& out = output_values[0]; - runtime::reference::select(in_cond->get_data_ptr(), - in_then->get_data_ptr(), - in_else->get_data_ptr(), - out->get_data_ptr(), - in_cond->get_shape(), - in_then->get_shape(), - in_else->get_shape(), - autob); + ov::reference::select(in_cond->get_data_ptr(), + in_then->get_data_ptr(), + in_else->get_data_ptr(), + out->get_data_ptr(), + in_cond->get_shape(), + in_then->get_shape(), + in_else->get_shape(), + autob); return true; } diff --git a/src/core/src/op/shape_of.cpp b/src/core/src/op/shape_of.cpp index b325e724d34..673b6aa1abf 100644 --- a/src/core/src/op/shape_of.cpp +++ b/src/core/src/op/shape_of.cpp @@ -55,13 +55,13 @@ namespace shape_of { namespace { template inline bool evaluate(const ov::Shape& shape, const HostTensorPtr& output_value) { - runtime::reference::shape_of(shape, output_value->get_data_ptr()); + ov::reference::shape_of(shape, output_value->get_data_ptr()); return true; } template inline bool evaluate(const ov::Shape& shape, ov::Tensor& output_value) { - runtime::reference::shape_of(shape, output_value.data>()); + ov::reference::shape_of(shape, output_value.data>()); return true; } diff --git a/src/core/src/op/shuffle_channels.cpp b/src/core/src/op/shuffle_channels.cpp index e2f694e4e6c..30de73691bb 100644 --- a/src/core/src/op/shuffle_channels.cpp +++ b/src/core/src/op/shuffle_channels.cpp @@ -71,7 +71,7 @@ bool op::ShuffleChannels::evaluate_shuffle_channels(const HostTensorVector& outp outputs[0]->set_element_type(inputs[0]->get_element_type()); outputs[0]->set_shape(data_shape); - ngraph::runtime::reference::shuffle_channels(arg, out, data_shape, elem_size, m_axis, m_group); + ov::reference::shuffle_channels(arg, out, data_shape, elem_size, m_axis, m_group); return true; } diff --git a/src/core/src/op/sigmoid.cpp b/src/core/src/op/sigmoid.cpp index 56d5ffdf7c1..4eb8b4e02d6 100644 --- a/src/core/src/op/sigmoid.cpp +++ b/src/core/src/op/sigmoid.cpp @@ -31,7 +31,7 @@ namespace { template inline bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& out, const size_t count) { using T = typename element_type_traits::value_type; - runtime::reference::sigmoid(arg0->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::sigmoid(arg0->get_data_ptr(), out->get_data_ptr(), count); return true; } diff --git a/src/core/src/op/sign.cpp b/src/core/src/op/sign.cpp index 18ed0b856d7..a9e9d51b946 100644 --- a/src/core/src/op/sign.cpp +++ b/src/core/src/op/sign.cpp @@ -33,7 +33,7 @@ namespace { template inline bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& out, const size_t count) { using T = typename element_type_traits::value_type; - runtime::reference::sign(arg0->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::sign(arg0->get_data_ptr(), out->get_data_ptr(), count); return true; } diff --git a/src/core/src/op/slice.cpp b/src/core/src/op/slice.cpp index ca87c73a705..f08a885bea2 100644 --- a/src/core/src/op/slice.cpp +++ b/src/core/src/op/slice.cpp @@ -181,14 +181,14 @@ bool op::v8::Slice::evaluate(const HostTensorVector& outputs, const HostTensorVe outputs[0]->set_shape(output_shapes.front().to_shape()); outputs[0]->set_element_type(inputs[0]->get_element_type()); - ngraph::runtime::reference::slice(inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - outputs[0]->get_data_ptr(), - outputs[0]->get_shape(), - inputs[0]->get_element_type().size(), - starts, - steps, - axes); + ov::reference::slice(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + outputs[0]->get_data_ptr(), + outputs[0]->get_shape(), + inputs[0]->get_element_type().size(), + starts, + steps, + axes); return true; } OPENVINO_SUPPRESS_DEPRECATED_END diff --git a/src/core/src/op/softmax.cpp b/src/core/src/op/softmax.cpp index 8bdb1954abd..975a83dd932 100644 --- a/src/core/src/op/softmax.cpp +++ b/src/core/src/op/softmax.cpp @@ -10,7 +10,7 @@ #include "itt.hpp" #include "ngraph/attribute_visitor.hpp" #include "ngraph/op/util/op_types.hpp" -#include "ngraph/runtime/reference/softmax.hpp" +#include "openvino/reference/softmax.hpp" using namespace std; using namespace ngraph; @@ -19,7 +19,7 @@ OPENVINO_SUPPRESS_DEPRECATED_START namespace { template inline bool evaluate(const HostTensorPtr& arg, const HostTensorPtr& out, const ov::Shape& shape, const AxisSet& axes) { - runtime::reference::softmax(arg->get_data_ptr(), out->get_data_ptr(), shape, axes); + ov::reference::softmax(arg->get_data_ptr(), out->get_data_ptr(), shape, axes); return true; } diff --git a/src/core/src/op/softplus.cpp b/src/core/src/op/softplus.cpp index 811ea65006f..ee59d23623b 100644 --- a/src/core/src/op/softplus.cpp +++ b/src/core/src/op/softplus.cpp @@ -48,7 +48,7 @@ namespace { template inline bool evaluate(const HostTensorPtr& arg, const HostTensorPtr& out, const size_t count) { using T = typename element_type_traits::value_type; - runtime::reference::softplus(arg->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::softplus(arg->get_data_ptr(), out->get_data_ptr(), count); return true; } diff --git a/src/core/src/op/softsign.cpp b/src/core/src/op/softsign.cpp index d30456f37fd..98e63984a8f 100644 --- a/src/core/src/op/softsign.cpp +++ b/src/core/src/op/softsign.cpp @@ -15,7 +15,7 @@ namespace { template inline bool evaluate(const ov::Tensor& arg, const ov::Tensor& out, const size_t count) { using T = typename ov::element_type_traits::value_type; - ngraph::runtime::reference::softsign(arg.data(), out.data(), count); + ov::reference::softsign(arg.data(), out.data(), count); return true; } diff --git a/src/core/src/op/space_to_batch.cpp b/src/core/src/op/space_to_batch.cpp index 4f383a28411..634a0163f08 100644 --- a/src/core/src/op/space_to_batch.cpp +++ b/src/core/src/op/space_to_batch.cpp @@ -128,15 +128,15 @@ bool ngraph::op::v1::SpaceToBatch::evaluate_space_to_batch(const HostTensorVecto } std::vector padded_data(shape_size(padded_shape) * elem_size); - ngraph::runtime::reference::pad(data->get_data_ptr(), - pad_value, - padded_data.data(), - elem_size, - data_shape, - padded_shape, - pads_begin_vec, - pads_end_vec, - ngraph::op::PadMode::CONSTANT); + ov::reference::pad(data->get_data_ptr(), + pad_value, + padded_data.data(), + elem_size, + data_shape, + padded_shape, + pads_begin_vec, + pads_end_vec, + ngraph::op::PadMode::CONSTANT); data_shape = padded_shape; ov::Shape dispersed_shape(block_values_size + 1); diff --git a/src/core/src/op/space_to_depth.cpp b/src/core/src/op/space_to_depth.cpp index 1885dff9259..ccaa4d43c0d 100644 --- a/src/core/src/op/space_to_depth.cpp +++ b/src/core/src/op/space_to_depth.cpp @@ -66,13 +66,13 @@ bool evaluate_space_to_depth(const HostTensorVector& outputs, return false; } - runtime::reference::space_to_depth(in->get_data_ptr(), - in->get_shape(), - out->get_data_ptr(), - out->get_shape(), - block_size, - mode, - elem_size); + ov::reference::space_to_depth(in->get_data_ptr(), + in->get_shape(), + out->get_data_ptr(), + out->get_shape(), + block_size, + mode, + elem_size); return true; } } // namespace diff --git a/src/core/src/op/split.cpp b/src/core/src/op/split.cpp index f9369af1463..dc2ac72b509 100644 --- a/src/core/src/op/split.cpp +++ b/src/core/src/op/split.cpp @@ -91,12 +91,12 @@ bool op::v1::Split::evaluate(const HostTensorVector& outputs, const HostTensorVe axis = normalize_axis(this, axis, data_tensor->get_partial_shape().rank()); OPENVINO_SUPPRESS_DEPRECATED_END - ngraph::runtime::reference::split(data_tensor->get_data_ptr(), - data_tensor->get_shape(), - data_tensor->get_element_type().size(), - axis, - m_num_splits, - outputs_data.data()); + ov::reference::split(data_tensor->get_data_ptr(), + data_tensor->get_shape(), + data_tensor->get_element_type().size(), + axis, + m_num_splits, + outputs_data.data()); return true; } return false; diff --git a/src/core/src/op/sqrt.cpp b/src/core/src/op/sqrt.cpp index 3c1f25eeab7..4758be3442b 100644 --- a/src/core/src/op/sqrt.cpp +++ b/src/core/src/op/sqrt.cpp @@ -34,7 +34,7 @@ namespace { template inline bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& out, const size_t count) { using T = typename element_type_traits::value_type; - runtime::reference::sqrt(arg0->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::sqrt(arg0->get_data_ptr(), out->get_data_ptr(), count); return true; } diff --git a/src/core/src/op/squeeze.cpp b/src/core/src/op/squeeze.cpp index 195e306046e..f96f628413a 100644 --- a/src/core/src/op/squeeze.cpp +++ b/src/core/src/op/squeeze.cpp @@ -77,9 +77,9 @@ bool op::v0::Squeeze::evaluate(const HostTensorVector& outputs, const HostTensor auto out_shape = output_shapes[0].get_shape(); outputs[0]->set_shape(out_shape); - ngraph::runtime::reference::copy(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - shape_size(out_shape) * outputs[0]->get_element_type().size()); + ov::reference::copy(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + shape_size(out_shape) * outputs[0]->get_element_type().size()); return true; } diff --git a/src/core/src/op/strided_slice.cpp b/src/core/src/op/strided_slice.cpp index 5fe80b615be..0e5a459ef00 100644 --- a/src/core/src/op/strided_slice.cpp +++ b/src/core/src/op/strided_slice.cpp @@ -198,11 +198,11 @@ inline bool evaluate(const HostTensorPtr& in, const SlicePlan& sp, const HostTen { auto in_shape = in->get_shape(); out->set_shape(sp.reshape_out_shape); - runtime::reference::strided_slice(in->get_data_ptr(), - out->get_data_ptr(), - in_shape, - sp, - in->get_element_type().size()); + ov::reference::strided_slice(in->get_data_ptr(), + out->get_data_ptr(), + in_shape, + sp, + in->get_element_type().size()); return true; } diff --git a/src/core/src/op/subtract.cpp b/src/core/src/op/subtract.cpp index 57604264971..7986bb060d0 100644 --- a/src/core/src/op/subtract.cpp +++ b/src/core/src/op/subtract.cpp @@ -21,12 +21,12 @@ bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& arg1, const HostTensorPtr& out, const op::AutoBroadcastSpec& broadcast_spec) { - runtime::reference::subtract(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - broadcast_spec); + ov::reference::subtract(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + broadcast_spec); return true; } diff --git a/src/core/src/op/swish.cpp b/src/core/src/op/swish.cpp index 8ea05d007a0..b6f2e91be34 100644 --- a/src/core/src/op/swish.cpp +++ b/src/core/src/op/swish.cpp @@ -81,12 +81,9 @@ inline bool evaluate(const HostTensorPtr& arg0, const size_t count) { using T = typename element_type_traits::value_type; if (arg1 != nullptr) { - runtime::reference::swish(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - count); + ov::reference::swish(arg0->get_data_ptr(), arg1->get_data_ptr(), out->get_data_ptr(), count); } else { - runtime::reference::swish(arg0->get_data_ptr(), nullptr, out->get_data_ptr(), count); + ov::reference::swish(arg0->get_data_ptr(), nullptr, out->get_data_ptr(), count); } return true; } diff --git a/src/core/src/op/tile.cpp b/src/core/src/op/tile.cpp index 8fb80a1ca3d..de6ced0e97a 100644 --- a/src/core/src/op/tile.cpp +++ b/src/core/src/op/tile.cpp @@ -66,12 +66,12 @@ bool op::v0::Tile::evaluate_tile(const HostTensorVector& outputs, const HostTens output->set_shape(output_shape); } repeats_val.insert(repeats_val.begin(), output_shape.size() - repeats_rank, 1); - ngraph::runtime::reference::tile(data->get_data_ptr(), - output->get_data_ptr(), - data->get_shape(), - output_shape, - data->get_element_type().size(), - repeats_val); + ov::reference::tile(data->get_data_ptr(), + output->get_data_ptr(), + data->get_shape(), + output_shape, + data->get_element_type().size(), + repeats_val); return true; } @@ -89,12 +89,12 @@ bool op::v0::Tile::evaluate(ov::TensorVector& output_values, const ov::TensorVec const auto& output_shape = shape_infer(this, input_shapes, make_tensor_accessor(input_values)).front().to_shape(); output.set_shape(output_shape); repeats_val.insert(repeats_val.begin(), output_shape.size() - repeats_rank, 1); - ngraph::runtime::reference::tile(static_cast(data.data()), - static_cast(output.data()), - data.get_shape(), - output_shape, - data.get_element_type().size(), - repeats_val); + ov::reference::tile(static_cast(data.data()), + static_cast(output.data()), + data.get_shape(), + output_shape, + data.get_element_type().size(), + repeats_val); return true; } diff --git a/src/core/src/op/topk.cpp b/src/core/src/op/topk.cpp index d650ecfece4..36ba74a7977 100644 --- a/src/core/src/op/topk.cpp +++ b/src/core/src/op/topk.cpp @@ -42,15 +42,15 @@ inline bool evaluate_execute(const HostTensorPtr& arg0, out_values->set_shape(out_shape); out_values->set_element_type(arg0->get_element_type()); - runtime::reference::topk(arg0->get_data_ptr(), - out_indices->get_data_ptr(), - out_values->get_data_ptr(), - in_shape, - out_shape, - axis, - k, - compute_max, - sort); + ov::reference::topk(arg0->get_data_ptr(), + out_indices->get_data_ptr(), + out_values->get_data_ptr(), + in_shape, + out_shape, + axis, + k, + compute_max, + sort); return true; } diff --git a/src/core/src/op/transpose.cpp b/src/core/src/op/transpose.cpp index e0e8a0625a5..c0a5a4dd141 100644 --- a/src/core/src/op/transpose.cpp +++ b/src/core/src/op/transpose.cpp @@ -70,12 +70,12 @@ bool op::v1::Transpose::evaluate(const HostTensorVector& output_values, const Ho auto& out = output_values[ARG_T]; out->set_shape(out_shape); out->set_element_type(arg->get_element_type()); - ngraph::runtime::reference::transpose(arg->get_data_ptr(), - out->get_data_ptr(), - arg->get_shape(), - arg->get_element_type().size(), - axes_order.data(), - out_shape); + ov::reference::transpose(arg->get_data_ptr(), + out->get_data_ptr(), + arg->get_shape(), + arg->get_element_type().size(), + axes_order.data(), + out_shape); return true; } OPENVINO_SUPPRESS_DEPRECATED_END diff --git a/src/core/src/op/unique.cpp b/src/core/src/op/unique.cpp index df179127b5b..3361d02b2b4 100644 --- a/src/core/src/op/unique.cpp +++ b/src/core/src/op/unique.cpp @@ -17,16 +17,16 @@ int64_t extract_axis(const std::shared_ptr& axis_constant) { return axis_vec.at(0); } -struct Evaluate : element::NotSupported> { - using NotSupported>::visit; +struct Evaluate : element::NotSupported> { + using NotSupported>::visit; template static result_type visit(const Tensor& input, std::unique_ptr axis, const bool sorted) { using T = fundamental_type_for; - return ngraph::runtime::reference::find_unique_elements(input.data(), - input.get_shape(), - std::move(axis), - sorted); + return ov::reference::find_unique_elements(input.data(), + input.get_shape(), + std::move(axis), + sorted); } }; @@ -51,9 +51,7 @@ std::tuple calculate_static_output_shapes(const Tensor& inp std::move(axis), op.get_sorted()); - return ngraph::runtime::reference::make_tensor_shapes(unique_elements, - input_data.get_shape(), - maybe_extract_axis()); + return ov::reference::make_tensor_shapes(unique_elements, input_data.get_shape(), maybe_extract_axis()); } } // namespace diff --git a/src/core/src/op/unsqueeze.cpp b/src/core/src/op/unsqueeze.cpp index c45900c4739..78587dd9423 100644 --- a/src/core/src/op/unsqueeze.cpp +++ b/src/core/src/op/unsqueeze.cpp @@ -55,7 +55,7 @@ struct Evaluate : element::NoAction { template static result_type visit(const HostTensorPtr& arg0, const HostTensorPtr& out, const size_t count) { - ngraph::runtime::reference::copy(arg0->get_data_ptr(), out->get_data_ptr(), count); + ov::reference::copy(arg0->get_data_ptr(), out->get_data_ptr(), count); return true; } }; diff --git a/src/core/src/op/util/broadcast_base.cpp b/src/core/src/op/util/broadcast_base.cpp index f16647cecd2..e37836ad33b 100644 --- a/src/core/src/op/util/broadcast_base.cpp +++ b/src/core/src/op/util/broadcast_base.cpp @@ -327,12 +327,12 @@ bool ov::op::util::BroadcastBase::evaluate_broadcast(const HostTensorPtr& arg0, if (arg0_shape.size() == 0) { arg0_shape = Shape{1}; } - ngraph::runtime::reference::broadcast(arg0->get_data_ptr(), - out->get_data_ptr(), - arg0_shape, - out->get_shape(), - broadcast_axes, - arg0->get_element_type().size()); + ov::reference::broadcast(arg0->get_data_ptr(), + out->get_data_ptr(), + arg0_shape, + out->get_shape(), + broadcast_axes, + arg0->get_element_type().size()); return true; } diff --git a/src/core/src/op/util/gather_base.cpp b/src/core/src/op/util/gather_base.cpp index acdbad1e8e5..d89b6c8c30d 100644 --- a/src/core/src/op/util/gather_base.cpp +++ b/src/core/src/op/util/gather_base.cpp @@ -85,23 +85,23 @@ bool evaluate(const ngraph::HostTensorPtr& arg0, out->set_shape(out_shape); if (arg1->get_element_type() == ov::element::i64) { - ngraph::runtime::reference::gather(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - out->get_shape(), - axis, - batch_dims); + ov::reference::gather(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + out->get_shape(), + axis, + batch_dims); } else if (arg1->get_element_type() == ov::element::i32) { - ngraph::runtime::reference::gather(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - out->get_shape(), - axis, - batch_dims); + ov::reference::gather(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + out->get_shape(), + axis, + batch_dims); } else { OPENVINO_THROW("Unexpected type ", arg1->get_element_type().c_type_string(), " for Gather evaluate method."); } diff --git a/src/core/src/op/util/pad_base.cpp b/src/core/src/op/util/pad_base.cpp index 31c9fb17ad2..8fcbbbf12a9 100644 --- a/src/core/src/op/util/pad_base.cpp +++ b/src/core/src/op/util/pad_base.cpp @@ -132,15 +132,15 @@ bool op::util::PadBase::evaluate_pad(TensorVector& outputs, const TensorVector& } outputs[0].set_shape(padded_shape); - ngraph::runtime::reference::pad(static_cast(inputs[0].data()), - pad_value, - static_cast(outputs[0].data()), - elem_size, - data_shape, - padded_shape, - pads_begin_coord, - pads_end_coord, - get_pad_mode()); + ov::reference::pad(static_cast(inputs[0].data()), + pad_value, + static_cast(outputs[0].data()), + elem_size, + data_shape, + padded_shape, + pads_begin_coord, + pads_end_coord, + get_pad_mode()); return true; } diff --git a/src/core/src/op/variadic_split.cpp b/src/core/src/op/variadic_split.cpp index 1b8c6279b1a..4b29c594e75 100644 --- a/src/core/src/op/variadic_split.cpp +++ b/src/core/src/op/variadic_split.cpp @@ -62,14 +62,14 @@ inline bool evaluate(const HostTensorPtr& in, const auto has_nonzero_dims = std::none_of(output_shape.begin(), output_shape.end(), ov::cmp::Equal(0)); if (has_nonzero_dims) { - runtime::reference::slice(in->get_data_ptr(), - out->get_data_ptr(), - in->get_shape(), - lower_bounds, - upper_bounds, - Strides(lower_bounds.size(), 1), - out->get_shape(), - in->get_element_type().size()); + ov::reference::slice(in->get_data_ptr(), + out->get_data_ptr(), + in->get_shape(), + lower_bounds, + upper_bounds, + Strides(lower_bounds.size(), 1), + out->get_shape(), + in->get_element_type().size()); return true; } return false; diff --git a/src/core/src/op/xor.cpp b/src/core/src/op/xor.cpp index 846e0714166..7fd85e8600f 100644 --- a/src/core/src/op/xor.cpp +++ b/src/core/src/op/xor.cpp @@ -33,12 +33,12 @@ bool evaluate(const HostTensorPtr& arg0, const HostTensorPtr& arg1, const HostTensorPtr& out, const op::AutoBroadcastSpec& broadcast_spec) { - runtime::reference::logical_xor(arg0->get_data_ptr(), - arg1->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - arg1->get_shape(), - broadcast_spec); + ov::reference::logical_xor(arg0->get_data_ptr(), + arg1->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + arg1->get_shape(), + broadcast_spec); return true; } diff --git a/src/core/src/pass/serialize.cpp b/src/core/src/pass/serialize.cpp index a78ad5dbc48..de2fcd8c46b 100644 --- a/src/core/src/pass/serialize.cpp +++ b/src/core/src/pass/serialize.cpp @@ -157,7 +157,7 @@ private: auto new_ptr = std::unique_ptr(new char[*compressed_size]); auto dst_data = reinterpret_cast(new_ptr.get()); auto src_data = reinterpret_cast(ptr); - ngraph::runtime::reference::convert_from_f32_to_f16_with_clamp(src_data, dst_data, num_src_elements); + ov::reference::convert_from_f32_to_f16_with_clamp(src_data, dst_data, num_src_elements); return new_ptr; } else if (src_type == ov::element::f64) { auto new_ptr = std::unique_ptr(new char[*compressed_size]); diff --git a/src/core/tests/coordinate.cpp b/src/core/tests/coordinate.cpp index 2fcb6bc8a79..f7cc7e18b8a 100644 --- a/src/core/tests/coordinate.cpp +++ b/src/core/tests/coordinate.cpp @@ -11,14 +11,14 @@ #include "common_test_utils/ndarray.hpp" #include "common_test_utils/test_tools.hpp" #include "gtest/gtest.h" -#include "ngraph/coordinate_transform.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" using namespace std; using namespace ov; OPENVINO_SUPPRESS_DEPRECATED_START TEST(coordinate, shape0d) { - auto ct = ngraph::CoordinateTransform({}); + auto ct = ov::CoordinateTransform({}); ASSERT_EQ(shape_size(ct.get_target_shape()), 1); auto it = ct.begin(); EXPECT_EQ(*it++, ov::Coordinate({})); @@ -26,7 +26,7 @@ TEST(coordinate, shape0d) { } TEST(coordinate, shape1d) { - auto ct = ngraph::CoordinateTransform({3}); + auto ct = ov::CoordinateTransform({3}); ASSERT_EQ(shape_size(ct.get_target_shape()), 3); auto it = ct.begin(); EXPECT_EQ(*it++, Coordinate({0})); @@ -36,7 +36,7 @@ TEST(coordinate, shape1d) { } TEST(coordinate, shape2d) { - auto ct = ngraph::CoordinateTransform({2, 3}); + auto ct = ov::CoordinateTransform({2, 3}); ASSERT_EQ(shape_size(ct.get_target_shape()), 6); auto it = ct.begin(); EXPECT_EQ(*it++, Coordinate({0, 0})); @@ -49,7 +49,7 @@ TEST(coordinate, shape2d) { } TEST(coordinate, shape3d) { - auto ct = ngraph::CoordinateTransform({2, 3, 4}); + auto ct = ov::CoordinateTransform({2, 3, 4}); ASSERT_EQ(shape_size(ct.get_target_shape()), 24); auto it = ct.begin(); EXPECT_EQ(*it++, Coordinate({0, 0, 0})); @@ -80,7 +80,7 @@ TEST(coordinate, shape3d) { } TEST(coordinate, zero_sized_axis) { - auto ct = ngraph::CoordinateTransform({2, 0, 4}); + auto ct = ov::CoordinateTransform({2, 0, 4}); ASSERT_EQ(shape_size(ct.get_target_shape()), 0); auto it = ct.begin(); EXPECT_TRUE(it == ct.end()); @@ -97,14 +97,14 @@ TEST(coordinate, corner) { CoordinateDiff target_padding_above = CoordinateDiff(source_shape.size(), 0); Strides source_dilation_strides = Strides(source_shape.size(), 1); - auto ct = ngraph::CoordinateTransform(source_shape, - source_start_corner, - source_end_corner, - source_strides, - source_axis_order, - target_padding_below, - target_padding_above, - source_dilation_strides); + auto ct = ov::CoordinateTransform(source_shape, + source_start_corner, + source_end_corner, + source_strides, + source_axis_order, + target_padding_below, + target_padding_above, + source_dilation_strides); ASSERT_EQ(shape_size(ct.get_target_shape()), 9); auto it = ct.begin(); @@ -131,14 +131,14 @@ TEST(coordinate, strides) { CoordinateDiff target_padding_above = CoordinateDiff(source_shape.size(), 0); Strides source_dilation_strides = Strides(source_shape.size(), 1); - auto ct = ngraph::CoordinateTransform(source_shape, - source_start_corner, - source_end_corner, - source_strides, - source_axis_order, - target_padding_below, - target_padding_above, - source_dilation_strides); + auto ct = ov::CoordinateTransform(source_shape, + source_start_corner, + source_end_corner, + source_strides, + source_axis_order, + target_padding_below, + target_padding_above, + source_dilation_strides); ASSERT_EQ(shape_size(ct.get_target_shape()), 20); auto it = ct.begin(); @@ -175,14 +175,14 @@ TEST(coordinate, axis_order) { CoordinateDiff target_padding_above = CoordinateDiff(source_shape.size(), 0); Strides source_dilation_strides = Strides(source_shape.size(), 1); - auto ct = ngraph::CoordinateTransform(source_shape, - source_start_corner, - source_end_corner, - source_strides, - source_axis_order, - target_padding_below, - target_padding_above, - source_dilation_strides); + auto ct = ov::CoordinateTransform(source_shape, + source_start_corner, + source_end_corner, + source_strides, + source_axis_order, + target_padding_below, + target_padding_above, + source_dilation_strides); ASSERT_EQ(shape_size(ct.get_target_shape()), 24); auto it = ct.begin(); diff --git a/src/core/tests/coordinate_range.cpp b/src/core/tests/coordinate_range.cpp index f8218f98f1e..502de728270 100644 --- a/src/core/tests/coordinate_range.cpp +++ b/src/core/tests/coordinate_range.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "ngraph/coordinate_range.hpp" +#include "openvino/reference/utils/coordinate_range.hpp" #include #include @@ -25,7 +25,7 @@ TEST(coordinate_range, slice_range_shape0d) { const Shape s; const Coordinate start_corner(s.size()); - auto slice_range = ngraph::coordinates::slice(s, start_corner, s); + auto slice_range = ov::coordinates::slice(s, start_corner, s); auto it = slice_range.begin(); EXPECT_EQ(it, begin(slice_range)); EXPECT_FALSE(it == slice_range.end()); @@ -42,7 +42,7 @@ TEST(coordinate_range, slice_range_shape1d) { ASSERT_EQ(expected.size(), shape_size(s)) << "check epxected data"; auto expected_val = begin(expected); - for (auto slice_range : ngraph::coordinates::slice(s, start_corner, s)) { + for (auto slice_range : ov::coordinates::slice(s, start_corner, s)) { auto index = slice_range.begin_index; for (size_t i = 0; i < slice_range.element_number; index += slice_range.step, ++i) { EXPECT_EQ(index, expected_val->first); @@ -65,7 +65,7 @@ TEST(coordinate_range, slice_range_shape2d) { ASSERT_EQ(expected.size(), shape_size(s)) << "check epxected data"; auto expected_val = begin(expected); - for (auto slice_range : ngraph::coordinates::slice(s, start_corner, s)) { + for (auto slice_range : ov::coordinates::slice(s, start_corner, s)) { auto index = slice_range.begin_index; for (size_t i = 0; i < slice_range.element_number; index += slice_range.step, ++i) { EXPECT_EQ(index, expected_val->first); @@ -92,7 +92,7 @@ TEST(coordinate_range, slice_range_shape3d) { ASSERT_EQ(expected.size(), shape_size(s)) << "check epxected data"; auto expected_val = begin(expected); - for (auto slice_range : ngraph::coordinates::slice(s, start_corner, s)) { + for (auto slice_range : ov::coordinates::slice(s, start_corner, s)) { auto index = slice_range.begin_index; for (size_t i = 0; i < slice_range.element_number; index += slice_range.step, ++i) { EXPECT_EQ(index, expected_val->first); @@ -106,7 +106,7 @@ TEST(coordinate_range, slice_range_zero_sized_axis) { const Shape s{2, 0, 4}; const Coordinate start_corner(s.size()); - auto slice_range = ngraph::coordinates::slice(s, start_corner, s); + auto slice_range = ov::coordinates::slice(s, start_corner, s); auto it = slice_range.begin(); EXPECT_TRUE(it == slice_range.end()) << "Expect empyt range"; } @@ -116,10 +116,10 @@ TEST(coordinate_range, slice_range_zero_sized_axis) { /// TEST(coordinate_range, slice_range_input_validataion) { const Shape s{10, 10, 10}; - EXPECT_THROW(ngraph::coordinates::slice(s, {1}, {1}), std::domain_error); - EXPECT_THROW(ngraph::coordinates::slice(s, s, {1}), std::domain_error); - EXPECT_THROW(ngraph::coordinates::slice(s, {1}, s), std::domain_error); - EXPECT_THROW(ngraph::coordinates::slice(s, s, s, {}), std::domain_error); + EXPECT_THROW(ov::coordinates::slice(s, {1}, {1}), std::domain_error); + EXPECT_THROW(ov::coordinates::slice(s, s, {1}), std::domain_error); + EXPECT_THROW(ov::coordinates::slice(s, {1}, s), std::domain_error); + EXPECT_THROW(ov::coordinates::slice(s, s, s, {}), std::domain_error); } namespace { @@ -165,7 +165,7 @@ TEST(coordinate_range, slice_range_corner) { << "check epxected data"; auto expected_val = begin(expected); - for (auto slice_range : ngraph::coordinates::slice(s, source_start_corner, source_end_corner)) { + for (auto slice_range : ov::coordinates::slice(s, source_start_corner, source_end_corner)) { auto index = slice_range.begin_index; for (size_t i = 0; i < slice_range.element_number; index += slice_range.step, ++i) { EXPECT_EQ(index, expected_val->first); @@ -195,7 +195,7 @@ TEST(coordinate_range, slice_range_strides) { << "check epxected data"; auto expected_val = begin(expected); - for (auto slice_range : ngraph::coordinates::slice(s, source_start_corner, source_end_corner, source_strides)) { + for (auto slice_range : ov::coordinates::slice(s, source_start_corner, source_end_corner, source_strides)) { auto index = slice_range.begin_index; for (size_t i = 0; i < slice_range.element_number; index += slice_range.step, ++i) { EXPECT_EQ(index, expected_val->first); @@ -216,7 +216,7 @@ TEST(coordinate_range, reverse_range_shape0d) { const Shape s; const AxisSet reverset_axis{}; - auto reverse_range = ngraph::coordinates::reverse(s, reverset_axis); + auto reverse_range = ov::coordinates::reverse(s, reverset_axis); auto it = reverse_range.begin(); EXPECT_EQ(it, begin(reverse_range)); auto v = *it; // if it is not end it has to be dereferencable; @@ -232,9 +232,9 @@ TEST(coordinate_range, reverse_range_shape1d) { EXPECT_EQ(expected.size(), shape_size(s)) << "check epxected data"; auto expected_val = begin(expected); - for (auto reverse_range : ngraph::coordinates::reverse(s, reverset_axis)) { + for (auto reverse_range : ov::coordinates::reverse(s, reverset_axis)) { auto index = reverse_range.begin_index; - ASSERT_EQ(reverse_range.direction, ngraph::coordinates::Direction::forward); + ASSERT_EQ(reverse_range.direction, ov::coordinates::Direction::forward); for (size_t i = 0; i < reverse_range.element_number; index += reverse_range.step, ++i) { EXPECT_EQ(index, expected_val->first); ++expected_val; @@ -257,9 +257,9 @@ TEST(coordinate_range, reverse_range_shape2d) { EXPECT_EQ(expected.size(), shape_size(s)) << "check epxected data"; auto expected_val = begin(expected); - for (auto reverse_range : ngraph::coordinates::reverse(s, reverset_axis)) { + for (auto reverse_range : ov::coordinates::reverse(s, reverset_axis)) { auto index = reverse_range.begin_index; - ASSERT_EQ(reverse_range.direction, ngraph::coordinates::Direction::forward); + ASSERT_EQ(reverse_range.direction, ov::coordinates::Direction::forward); for (size_t i = 0; i < reverse_range.element_number; index += reverse_range.step, ++i) { EXPECT_EQ(index, expected_val->first); ++expected_val; @@ -286,9 +286,9 @@ TEST(coordinate_range, reverse_range_shape3d) { EXPECT_EQ(expected.size(), shape_size(s)) << "check epxected data"; auto expected_val = begin(expected); - for (auto reverse_range : ngraph::coordinates::reverse(s, reverset_axis)) { + for (auto reverse_range : ov::coordinates::reverse(s, reverset_axis)) { auto index = reverse_range.begin_index; - ASSERT_EQ(reverse_range.direction, ngraph::coordinates::Direction::forward); + ASSERT_EQ(reverse_range.direction, ov::coordinates::Direction::forward); for (size_t i = 0; i < reverse_range.element_number; index += reverse_range.step, ++i) { EXPECT_EQ(index, expected_val->first); ++expected_val; @@ -302,7 +302,7 @@ TEST(coordinate_range, reverse_range_shape3d) { TEST(coordinate_range, reverse_range_zero_sized_axis) { const Shape s{2, 0, 4}; - auto reverse_range = ngraph::coordinates::reverse(s, {}); + auto reverse_range = ov::coordinates::reverse(s, {}); auto it = reverse_range.begin(); EXPECT_TRUE(it == reverse_range.end()) << "Expect empyt range"; } @@ -312,7 +312,7 @@ TEST(coordinate_range, reverse_range_zero_sized_axis) { /// TEST(coordinate_range, reverse_range_input_validataion) { const Shape s{10, 10, 10}; - EXPECT_THROW(ngraph::coordinates::reverse(s, {10}), std::domain_error); + EXPECT_THROW(ov::coordinates::reverse(s, {10}), std::domain_error); } TEST(coordinate_range, reverse_range_2d) { @@ -326,9 +326,9 @@ TEST(coordinate_range, reverse_range_2d) { {29, {2, 9}}, {28, {2, 8}}, {27, {2, 7}}, {26, {2, 6}}, {25, {2, 5}}, {24, {2, 4}}, {23, {2, 3}}, {22, {2, 2}}, {21, {2, 1}}, {20, {2, 0}}}; // clang-format on auto expected_val = begin(expected); - for (auto reverse_range : ngraph::coordinates::reverse(s, reverset_axis)) { + for (auto reverse_range : ov::coordinates::reverse(s, reverset_axis)) { auto index = reverse_range.begin_index; - ASSERT_EQ(reverse_range.direction, ngraph::coordinates::Direction::reverse); + ASSERT_EQ(reverse_range.direction, ov::coordinates::Direction::reverse); for (size_t i = 0; i < reverse_range.element_number; index -= reverse_range.step, ++i) { EXPECT_EQ(index, expected_val->first); ++expected_val; @@ -359,9 +359,9 @@ TEST(coordinate_range, reverse_1_range_3d) { // clang-format on auto expected_val = begin(expected); - for (auto reverse_range : ngraph::coordinates::reverse(s, reverset_axis)) { + for (auto reverse_range : ov::coordinates::reverse(s, reverset_axis)) { auto index = reverse_range.begin_index; - ASSERT_EQ(reverse_range.direction, ngraph::coordinates::Direction::forward); + ASSERT_EQ(reverse_range.direction, ov::coordinates::Direction::forward); for (size_t i = 0; i < reverse_range.element_number; index += reverse_range.step, ++i) { EXPECT_EQ(index, expected_val->first); ++expected_val; @@ -392,9 +392,9 @@ TEST(coordinate_range, reverse_2_range_3d) { // clang-format on auto expected_val = begin(expected); - for (auto reverse_range : ngraph::coordinates::reverse(s, reverset_axis)) { + for (auto reverse_range : ov::coordinates::reverse(s, reverset_axis)) { auto index = reverse_range.begin_index; - ASSERT_EQ(reverse_range.direction, ngraph::coordinates::Direction::reverse); + ASSERT_EQ(reverse_range.direction, ov::coordinates::Direction::reverse); for (size_t i = 0; i < reverse_range.element_number; index -= reverse_range.step, ++i) { EXPECT_EQ(index, expected_val->first); ++expected_val; diff --git a/src/core/tests/ov_tensor_test.cpp b/src/core/tests/ov_tensor_test.cpp index 4c67940c872..6a7eb090444 100644 --- a/src/core/tests/ov_tensor_test.cpp +++ b/src/core/tests/ov_tensor_test.cpp @@ -12,11 +12,11 @@ #include #include -#include "ngraph/coordinate_transform.hpp" #include "openvino/core/except.hpp" #include "openvino/core/partial_shape.hpp" #include "openvino/core/type/element_type_traits.hpp" #include "openvino/op/parameter.hpp" +#include "openvino/reference/utils/coordinate_transform.hpp" #include "openvino/runtime/allocator.hpp" #include "openvino/runtime/remote_tensor.hpp" #include "openvino/runtime/tensor.hpp" @@ -358,7 +358,7 @@ TEST_F(OVTensorTest, readRangeRoiBlob) { const std::uint8_t* roi = reinterpret_cast(roi_tensor.data()); ASSERT_NE(nullptr, roi); auto strides = roi_tensor.get_strides(); - for (auto&& c : ngraph::CoordinateTransformBasic{roi_tensor.get_shape()}) { + for (auto&& c : ov::CoordinateTransformBasic{roi_tensor.get_shape()}) { auto actual_addr = roi + c[3] * strides[3] + c[2] * strides[2] + c[1] * strides[1] + c[0] * strides[0]; auto expected_addr = t.data() + ((c[3] + 4) * strides[3] + (c[2] + 2) * strides[2] + (c[1] + 0) * strides[1] + (c[0] + 0) * strides[0]) / @@ -383,7 +383,7 @@ std::vector fill_data(const ov::Tensor& tensor) { std::vector actual; const T* data = tensor.data(); auto strides = tensor.get_strides(); - for (auto&& c : ngraph::CoordinateTransformBasic{tensor.get_shape()}) { + for (auto&& c : ov::CoordinateTransformBasic{tensor.get_shape()}) { size_t offset = 0; for (size_t i = 0; i < strides.size(); i++) offset += c[i] * strides[i]; @@ -550,7 +550,7 @@ INSTANTIATE_TEST_SUITE_P(copy_tests, ), ::testing::Values( TestParams { - ov::Shape{1, 3, 4, 8}, {}, + ov::Shape{1, 3, 4, 8}, {}, {0}, {} }, TestParams { @@ -566,15 +566,15 @@ INSTANTIATE_TEST_SUITE_P(copy_tests, ov::Shape{3, 2, 2}, ov::Strides{128, 24, 8} }, TestParams { - ov::Shape{}, {}, + ov::Shape{}, {}, {}, {} }, TestParams { - ov::Shape{1}, {}, + ov::Shape{1}, {}, {}, {} }, TestParams { - ov::Shape{}, {}, + ov::Shape{}, {}, {1}, {} } ))); diff --git a/src/core/tests/span.cpp b/src/core/tests/span.cpp index 529965b1fc3..e4bdb449bd1 100644 --- a/src/core/tests/span.cpp +++ b/src/core/tests/span.cpp @@ -10,7 +10,7 @@ #include "gtest/gtest.h" -using namespace ngraph::runtime::reference; +using namespace ov::reference; TEST(span_util, create_from_vector) { std::vector data{1, 2, 3, 4}; diff --git a/src/plugins/intel_gpu/tests/unit/dynamic_execution/priorbox_test.cpp b/src/plugins/intel_gpu/tests/unit/dynamic_execution/priorbox_test.cpp index 4c027f8b236..3516b4f7f20 100644 --- a/src/plugins/intel_gpu/tests/unit/dynamic_execution/priorbox_test.cpp +++ b/src/plugins/intel_gpu/tests/unit/dynamic_execution/priorbox_test.cpp @@ -153,7 +153,7 @@ TEST(priorbox_constant_propagation_test, basic) { std::vector ref(28800); std::vector output_size = {30, 30}; std::vector image_size = {224, 224}; - ngraph::runtime::reference::prior_box(output_size.data(), image_size.data(), ref.data(), ov::Shape{2,14400}, attrs); + ov::reference::prior_box(output_size.data(), image_size.data(), ref.data(), ov::Shape{2, 14400}, attrs); std::vector ref_concat = ref; ref_concat.insert(ref_concat.end(), ref.begin(), ref.end()); diff --git a/src/plugins/intel_gpu/tests/unit/test_cases/adaptive_avg_pooling_gpu_test.cpp b/src/plugins/intel_gpu/tests/unit/test_cases/adaptive_avg_pooling_gpu_test.cpp index 2e234751438..70478709e12 100644 --- a/src/plugins/intel_gpu/tests/unit/test_cases/adaptive_avg_pooling_gpu_test.cpp +++ b/src/plugins/intel_gpu/tests/unit/test_cases/adaptive_avg_pooling_gpu_test.cpp @@ -72,7 +72,7 @@ void generateTestData(const AdaptiveAvgPoolingParams& p, const format fmt, const const auto inShape = tensorToShape(p.inputTensor, fmt); const auto outShape = tensorToShape(p.outputTensor, fmt); - ngraph::runtime::reference::adaptive_avg_pool(random_inputs.data(), out.data(), inShape, outShape); + ov::reference::adaptive_avg_pool(random_inputs.data(), out.data(), inShape, outShape); inputs = getValues(random_inputs); outputs = getValues(out); diff --git a/src/plugins/intel_gpu/tests/unit/test_cases/adaptive_max_pooling_gpu_test.cpp b/src/plugins/intel_gpu/tests/unit/test_cases/adaptive_max_pooling_gpu_test.cpp index f964cb03597..649d933db70 100644 --- a/src/plugins/intel_gpu/tests/unit/test_cases/adaptive_max_pooling_gpu_test.cpp +++ b/src/plugins/intel_gpu/tests/unit/test_cases/adaptive_max_pooling_gpu_test.cpp @@ -76,7 +76,7 @@ void generateTestData(const AdaptiveMaxPoolingParams& p, const format fmt, const const auto inShape = tensorToShape(p.inputTensor, fmt); const auto outShape = tensorToShape(p.outputTensor, fmt); - ngraph::runtime::reference::adaptive_max_pool(random_inputs.data(), out.data(), ind.data(), inShape, outShape); + ov::reference::adaptive_max_pool(random_inputs.data(), out.data(), ind.data(), inShape, outShape); inputs = getValues(random_inputs); outputs = getValues(out); diff --git a/src/plugins/intel_gpu/tests/unit/test_cases/broadcast_gpu_test.cpp b/src/plugins/intel_gpu/tests/unit/test_cases/broadcast_gpu_test.cpp index 3b8f70d928b..cdc17779d9a 100644 --- a/src/plugins/intel_gpu/tests/unit/test_cases/broadcast_gpu_test.cpp +++ b/src/plugins/intel_gpu/tests/unit/test_cases/broadcast_gpu_test.cpp @@ -29,9 +29,12 @@ void start_broadcast_test(format cldnn_format, data_types cldnn_data_type, std:: size_t output_data_size = accumulate(output_shape.rbegin(), output_shape.rend(), (size_t)1, std::multiplies()); ASSERT_GE(output_data_size, (size_t)1); std::vector output_data(output_data_size); - ngraph::runtime::reference::broadcast(reinterpret_cast(input_data.data()), reinterpret_cast(output_data.data()), - ov::Shape(input_shape.begin(), input_shape.end()), ov::Shape(output_shape.begin(), output_shape.end()), - ov::AxisSet(broadcast_axes), sizeof(T)); + ov::reference::broadcast(reinterpret_cast(input_data.data()), + reinterpret_cast(output_data.data()), + ov::Shape(input_shape.begin(), input_shape.end()), + ov::Shape(output_shape.begin(), output_shape.end()), + ov::AxisSet(broadcast_axes), + sizeof(T)); ASSERT_EQ(output_data.size(), accumulate(output_shape.rbegin(), output_shape.rend(), (size_t)1, std::multiplies())); @@ -101,9 +104,12 @@ void start_broadcast_test_dynamic(format input_format, size_t output_data_size = accumulate(output_shape.rbegin(), output_shape.rend(), (size_t)1, std::multiplies()); ASSERT_GE(output_data_size, (size_t)1); std::vector output_data(output_data_size); - ngraph::runtime::reference::broadcast(reinterpret_cast(input_data.data()), reinterpret_cast(output_data.data()), - ov::Shape(input_data_shape.begin(), input_data_shape.end()), ov::Shape(output_shape.begin(), output_shape.end()), - ov::AxisSet(broadcast_axes), sizeof(T)); + ov::reference::broadcast(reinterpret_cast(input_data.data()), + reinterpret_cast(output_data.data()), + ov::Shape(input_data_shape.begin(), input_data_shape.end()), + ov::Shape(output_shape.begin(), output_shape.end()), + ov::AxisSet(broadcast_axes), + sizeof(T)); ASSERT_EQ(output_data.size(), accumulate(output_shape.rbegin(), output_shape.rend(), (size_t)1, std::multiplies())); @@ -192,9 +198,12 @@ void start_broadcast_test_5d(format cldnn_format, data_types cldnn_data_type, st size_t output_data_size = accumulate(output_shape.rbegin(), output_shape.rend(), (size_t)1, std::multiplies()); ASSERT_GE(output_data_size, (size_t)1); std::vector output_data(output_data_size); - ngraph::runtime::reference::broadcast(reinterpret_cast(input_data.data()), reinterpret_cast(output_data.data()), - ov::Shape(input_shape.begin(), input_shape.end()), ov::Shape(output_shape.begin(), output_shape.end()), - ov::AxisSet(broadcast_axes), sizeof(T)); + ov::reference::broadcast(reinterpret_cast(input_data.data()), + reinterpret_cast(output_data.data()), + ov::Shape(input_shape.begin(), input_shape.end()), + ov::Shape(output_shape.begin(), output_shape.end()), + ov::AxisSet(broadcast_axes), + sizeof(T)); ASSERT_EQ(output_data.size(), accumulate(output_shape.rbegin(), output_shape.rend(), (size_t)1, std::multiplies())); diff --git a/src/plugins/intel_gpu/tests/unit/test_cases/gemm_gpu_test.cpp b/src/plugins/intel_gpu/tests/unit/test_cases/gemm_gpu_test.cpp index a35295c5f6e..ef6031465d2 100644 --- a/src/plugins/intel_gpu/tests/unit/test_cases/gemm_gpu_test.cpp +++ b/src/plugins/intel_gpu/tests/unit/test_cases/gemm_gpu_test.cpp @@ -194,15 +194,14 @@ class GemmGPUTestRandom : public GemmGPUTest { } void calculate_output_data() { - ngraph::runtime::reference::matmul( - input_data[0].data(), - input_data[1].data(), - out_data.data(), - input0_shape, - input1_shape, - output_shape, - transpose_input0, - transpose_input1); + ov::reference::matmul(input_data[0].data(), + input_data[1].data(), + out_data.data(), + input0_shape, + input1_shape, + output_shape, + transpose_input0, + transpose_input1); } protected: diff --git a/src/plugins/intel_gpu/tests/unit/test_cases/non_zero_gpu_test.cpp b/src/plugins/intel_gpu/tests/unit/test_cases/non_zero_gpu_test.cpp index 1944255ee09..b3aee2a31d6 100644 --- a/src/plugins/intel_gpu/tests/unit/test_cases/non_zero_gpu_test.cpp +++ b/src/plugins/intel_gpu/tests/unit/test_cases/non_zero_gpu_test.cpp @@ -42,7 +42,7 @@ template void test_count_non_zero(layout in_layout, std::vector in_data) { auto& engine = get_test_engine(); auto input_mem = engine.allocate_memory(in_layout); - auto count_non_zero = ngraph::runtime::reference::non_zero_get_count(in_data.data(), in_layout.get_shape()); + auto count_non_zero = ov::reference::non_zero_get_count(in_data.data(), in_layout.get_shape()); set_values(input_mem, in_data); @@ -154,7 +154,7 @@ TEST(test_count_non_zero, dynamic_2d_f32_bfyx) { auto output = outputs.at("count_nonzero").get_memory(); cldnn::mem_lock output_ptr(output, get_test_stream()); - auto count_non_zero = ngraph::runtime::reference::non_zero_get_count(in_data.data(), in_layout.get_shape()); + auto count_non_zero = ov::reference::non_zero_get_count(in_data.data(), in_layout.get_shape()); ASSERT_EQ(count_non_zero, output_ptr[0]); } } @@ -163,10 +163,10 @@ template void test_gather_non_zero(layout in_layout, std::vector in_data) { auto& engine = get_test_engine(); auto input_mem = engine.allocate_memory(in_layout); - auto count_non_zero = ngraph::runtime::reference::non_zero_get_count(in_data.data(), in_layout.get_shape()); + auto count_non_zero = ov::reference::non_zero_get_count(in_data.data(), in_layout.get_shape()); auto in_rank = in_layout.get_shape().size(); std::vector expected_results(count_non_zero * in_rank); - ngraph::runtime::reference::non_zero(in_data.data(), expected_results.data(), in_layout.get_shape()); + ov::reference::non_zero(in_data.data(), expected_results.data(), in_layout.get_shape()); auto output_shape_layout = layout{ov::PartialShape{1}, data_types::i32, format::bfyx}; auto output_shape_mem = engine.allocate_memory(output_shape_layout); @@ -324,10 +324,10 @@ template void test_non_zero(layout in_layout, std::vector in_data) { auto& engine = get_test_engine(); auto input_mem = engine.allocate_memory(in_layout); - auto count_non_zero = ngraph::runtime::reference::non_zero_get_count(in_data.data(), in_layout.get_shape()); + auto count_non_zero = ov::reference::non_zero_get_count(in_data.data(), in_layout.get_shape()); auto in_rank = in_layout.get_shape().size(); std::vector expected_results(count_non_zero * in_rank); - ngraph::runtime::reference::non_zero(in_data.data(), expected_results.data(), in_layout.get_shape()); + ov::reference::non_zero(in_data.data(), expected_results.data(), in_layout.get_shape()); set_values(input_mem, in_data); @@ -479,7 +479,7 @@ TEST(test_gather_non_zero, not_use_local_mem) { cldnn::mem_lock output_ptr(output, get_test_stream()); std::vector expected_results(max_local_mem_size); - ngraph::runtime::reference::non_zero(in_data.data(), expected_results.data(), in_layout.get_shape()); + ov::reference::non_zero(in_data.data(), expected_results.data(), in_layout.get_shape()); for (size_t i = 0; i < expected_results.size(); ++i) { ASSERT_EQ(expected_results[i], output_ptr[i]); diff --git a/src/plugins/intel_gpu/tests/unit/test_cases/scatter_nd_update_gpu_test.cpp b/src/plugins/intel_gpu/tests/unit/test_cases/scatter_nd_update_gpu_test.cpp index c489c1fb86a..115aa700688 100644 --- a/src/plugins/intel_gpu/tests/unit/test_cases/scatter_nd_update_gpu_test.cpp +++ b/src/plugins/intel_gpu/tests/unit/test_cases/scatter_nd_update_gpu_test.cpp @@ -154,13 +154,13 @@ struct scatter_nd_update_random_test : testing::TestWithParam outputs_ptr(output, get_test_stream()); auto outputs_ref = std::vector(params.input_size.count()); - ngraph::runtime::reference::scatterNdUpdate(input_data.data(), - indices_data.data(), - updates_data.data(), - outputs_ref.data(), - ov::Shape(input_vec.begin(), input_vec.end()), - ov::Shape(indices_vec.begin(), indices_vec.end()), - ov::Shape(updates_vec.begin(), updates_vec.end())); + ov::reference::scatterNdUpdate(input_data.data(), + indices_data.data(), + updates_data.data(), + outputs_ref.data(), + ov::Shape(input_vec.begin(), input_vec.end()), + ov::Shape(indices_vec.begin(), indices_vec.end()), + ov::Shape(updates_vec.begin(), updates_vec.end())); for (size_t i = 0; i < outputs_ref.size(); ++i) { ASSERT_EQ(outputs_ref[i], half_to_float(outputs_ptr[i])); @@ -224,13 +224,13 @@ struct scatter_nd_update_random_test : testing::TestWithParam outputs_ptr(output, get_test_stream()); auto outputs_ref = std::vector(params.input_size.count()); - ngraph::runtime::reference::scatterNdUpdate(input_data.data(), - indices_data.data(), - updates_data.data(), - outputs_ref.data(), - ov::Shape(input_vec.begin(), input_vec.end()), - ov::Shape(indices_vec.begin(), indices_vec.end()), - ov::Shape(updates_vec.begin(), updates_vec.end())); + ov::reference::scatterNdUpdate(input_data.data(), + indices_data.data(), + updates_data.data(), + outputs_ref.data(), + ov::Shape(input_vec.begin(), input_vec.end()), + ov::Shape(indices_vec.begin(), indices_vec.end()), + ov::Shape(updates_vec.begin(), updates_vec.end())); for (size_t i = 0; i < outputs_ref.size(); ++i) { ASSERT_EQ(outputs_ref[i], outputs_ptr[i]); @@ -4486,13 +4486,13 @@ TEST(scatter_nd_update_gpu, dynamic_5d) { ov::Shape updates_shape) -> std::vector { size_t count = std::accumulate(input_shape.begin(), input_shape.end(), static_cast(1), std::multiplies()); auto outputs_ref = std::vector(count); - ngraph::runtime::reference::scatterNdUpdate(input.data(), - indices.data(), - updates.data(), - outputs_ref.data(), - input_shape, - indices_shape, - updates_shape); + ov::reference::scatterNdUpdate(input.data(), + indices.data(), + updates.data(), + outputs_ref.data(), + input_shape, + indices_shape, + updates_shape); return outputs_ref; }; diff --git a/src/plugins/template/backend/ops/abs.cpp b/src/plugins/template/backend/ops/abs.cpp index b71fb5ebadc..b72163d1bb8 100644 --- a/src/plugins/template/backend/ops/abs.cpp +++ b/src/plugins/template/backend/ops/abs.cpp @@ -12,9 +12,9 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::abs(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::abs(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); return true; } diff --git a/src/plugins/template/backend/ops/adaptive_avg_pool.cpp b/src/plugins/template/backend/ops/adaptive_avg_pool.cpp index 7c9f888b120..789460103b9 100644 --- a/src/plugins/template/backend/ops/adaptive_avg_pool.cpp +++ b/src/plugins/template/backend/ops/adaptive_avg_pool.cpp @@ -11,10 +11,10 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::adaptive_avg_pool(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - op->get_output_shape(0)); + ov::reference::adaptive_avg_pool(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + op->get_output_shape(0)); return true; } diff --git a/src/plugins/template/backend/ops/adaptive_max_pool.cpp b/src/plugins/template/backend/ops/adaptive_max_pool.cpp index 03afdd840cd..e70fc9195a2 100644 --- a/src/plugins/template/backend/ops/adaptive_max_pool.cpp +++ b/src/plugins/template/backend/ops/adaptive_max_pool.cpp @@ -14,17 +14,17 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; if (op->get_index_element_type() == ngraph::element::i32) { - ngraph::runtime::reference::adaptive_max_pool(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - outputs[1]->get_data_ptr(), - inputs[0]->get_shape(), - op->get_output_shape(0)); + ov::reference::adaptive_max_pool(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + inputs[0]->get_shape(), + op->get_output_shape(0)); } else if (op->get_index_element_type() == ngraph::element::i64) { - ngraph::runtime::reference::adaptive_max_pool(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - outputs[1]->get_data_ptr(), - inputs[0]->get_shape(), - op->get_output_shape(0)); + ov::reference::adaptive_max_pool(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + inputs[0]->get_shape(), + op->get_output_shape(0)); } return true; } diff --git a/src/plugins/template/backend/ops/avg_pool.cpp b/src/plugins/template/backend/ops/avg_pool.cpp index 3fa7191a812..b6f3a6a9803 100644 --- a/src/plugins/template/backend/ops/avg_pool.cpp +++ b/src/plugins/template/backend/ops/avg_pool.cpp @@ -11,15 +11,15 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::avg_pool(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - op->get_output_shape(0), - op->get_kernel(), - op->get_strides(), - op->get_pads_begin(), - op->get_pads_end(), - !op->get_exclude_pad()); + ov::reference::avg_pool(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + op->get_output_shape(0), + op->get_kernel(), + op->get_strides(), + op->get_pads_begin(), + op->get_pads_end(), + !op->get_exclude_pad()); return true; } diff --git a/src/plugins/template/backend/ops/batch_norm.cpp b/src/plugins/template/backend/ops/batch_norm.cpp index 50e977ab5fe..012fc449186 100644 --- a/src/plugins/template/backend/ops/batch_norm.cpp +++ b/src/plugins/template/backend/ops/batch_norm.cpp @@ -11,14 +11,14 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::batch_norm_inference(static_cast(op->get_eps_value()), - inputs[2]->get_data_ptr(), - inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - inputs[3]->get_data_ptr(), - inputs[4]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[2]->get_shape()); + ov::reference::batch_norm_inference(static_cast(op->get_eps_value()), + inputs[2]->get_data_ptr(), + inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[3]->get_data_ptr(), + inputs[4]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[2]->get_shape()); return true; } @@ -27,14 +27,14 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::batch_norm_inference(static_cast(static_cast(op->get_eps_value())), - inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - inputs[2]->get_data_ptr(), - inputs[3]->get_data_ptr(), - inputs[4]->get_data_ptr(), - outputs[0]->get_data_ptr(), - op->get_input_shape(0)); + ov::reference::batch_norm_inference(static_cast(static_cast(op->get_eps_value())), + inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + inputs[3]->get_data_ptr(), + inputs[4]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0)); return true; } diff --git a/src/plugins/template/backend/ops/binary_convolution.cpp b/src/plugins/template/backend/ops/binary_convolution.cpp index 2ba068811fd..4b09df85a80 100644 --- a/src/plugins/template/backend/ops/binary_convolution.cpp +++ b/src/plugins/template/backend/ops/binary_convolution.cpp @@ -21,17 +21,17 @@ inline void evaluate(const std::shared_ptr& o const auto filter_shape = inputs[1]->get_shape(); const auto out_shape = outputs[0]->get_shape(); - ngraph::runtime::reference::binary_convolution(in_data_ptr, - filter_data_ptr, - out_data_ptr, - in_shape, - filter_shape, - out_shape, - op->get_strides(), - op->get_dilations(), - op->get_pads_begin(), - op->get_pads_end(), - op->get_pad_value()); + ov::reference::binary_convolution(in_data_ptr, + filter_data_ptr, + out_data_ptr, + in_shape, + filter_shape, + out_shape, + op->get_strides(), + op->get_dilations(), + op->get_pads_begin(), + op->get_pads_end(), + op->get_pad_value()); } } // namespace bin_conv_v1 diff --git a/src/plugins/template/backend/ops/bucketize.cpp b/src/plugins/template/backend/ops/bucketize.cpp index 5252540d52e..b55f7cda250 100644 --- a/src/plugins/template/backend/ops/bucketize.cpp +++ b/src/plugins/template/backend/ops/bucketize.cpp @@ -15,12 +15,12 @@ inline void evaluate(const std::shared_ptr& op, using T2 = typename ngraph::element_type_traits::value_type; using T3 = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::bucketize(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - outputs[0]->get_data_ptr(), - op->get_input_shape(0), - op->get_input_shape(1), - op->get_with_right_bound()); + ov::reference::bucketize(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_with_right_bound()); } static inline constexpr uint16_t getElementMask(ngraph::element::Type_t type1, ngraph::element::Type_t type2) { diff --git a/src/plugins/template/backend/ops/ceiling.cpp b/src/plugins/template/backend/ops/ceiling.cpp index 0328d26a294..19c3127a43c 100644 --- a/src/plugins/template/backend/ops/ceiling.cpp +++ b/src/plugins/template/backend/ops/ceiling.cpp @@ -11,9 +11,9 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::ceiling(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::ceiling(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); return true; } diff --git a/src/plugins/template/backend/ops/convert.cpp b/src/plugins/template/backend/ops/convert.cpp index 23ed105059a..319818a5727 100644 --- a/src/plugins/template/backend/ops/convert.cpp +++ b/src/plugins/template/backend/ops/convert.cpp @@ -17,15 +17,13 @@ inline void evaluate(const std::shared_ptr& op, if (((ti == ngraph::element::u1) || (to == ngraph::element::u1)) || ((ti == ngraph::element::u4) || (to == ngraph::element::u4)) || ((ti == ngraph::element::i4) || (to == ngraph::element::i4))) { - ngraph::runtime::reference::detail::lp_convert(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - element_count, - ti, - to); + ov::reference::detail::lp_convert(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + element_count, + ti, + to); } else { - ngraph::runtime::reference::convert(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - element_count); + ov::reference::convert(inputs[0]->get_data_ptr(), outputs[0]->get_data_ptr(), element_count); } } } // namespace convert_like_v1 diff --git a/src/plugins/template/backend/ops/convert_color_nv12.cpp b/src/plugins/template/backend/ops/convert_color_nv12.cpp index 0f925696644..3b9996da285 100644 --- a/src/plugins/template/backend/ops/convert_color_nv12.cpp +++ b/src/plugins/template/backend/ops/convert_color_nv12.cpp @@ -10,44 +10,40 @@ template inline bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { - return ngraph::runtime::reference::color_convert_nv12( - op, - outputs, - inputs, - ov::op::util::ConvertColorNV12Base::ColorConversion::NV12_TO_RGB); + return ov::reference::color_convert_nv12(op, + outputs, + inputs, + ov::op::util::ConvertColorNV12Base::ColorConversion::NV12_TO_RGB); } template inline bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { - return ngraph::runtime::reference::color_convert_nv12( - op, - outputs, - inputs, - ov::op::util::ConvertColorNV12Base::ColorConversion::NV12_TO_BGR); + return ov::reference::color_convert_nv12(op, + outputs, + inputs, + ov::op::util::ConvertColorNV12Base::ColorConversion::NV12_TO_BGR); } template inline bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { - return ngraph::runtime::reference::color_convert_i420( - op, - outputs, - inputs, - ov::op::util::ConvertColorI420Base::ColorConversion::I420_TO_RGB); + return ov::reference::color_convert_i420(op, + outputs, + inputs, + ov::op::util::ConvertColorI420Base::ColorConversion::I420_TO_RGB); } template inline bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { - return ngraph::runtime::reference::color_convert_i420( - op, - outputs, - inputs, - ov::op::util::ConvertColorI420Base::ColorConversion::I420_TO_BGR); + return ov::reference::color_convert_i420(op, + outputs, + inputs, + ov::op::util::ConvertColorI420Base::ColorConversion::I420_TO_BGR); } template <> diff --git a/src/plugins/template/backend/ops/convolution.cpp b/src/plugins/template/backend/ops/convolution.cpp index a8108354061..1af78054950 100644 --- a/src/plugins/template/backend/ops/convolution.cpp +++ b/src/plugins/template/backend/ops/convolution.cpp @@ -16,16 +16,16 @@ bool evaluate(const std::shared_ptr& op, const auto& out_shape = outputs[0]->get_shape(); const auto& in_shape = inputs[0]->get_shape(); const auto& filter_shape = inputs[1]->get_shape(); - ngraph::runtime::reference::convolution::value_type>(in_data_ptr, - filter_data, - out_data_ptr, - in_shape, - filter_shape, - out_shape, - op->get_strides(), - op->get_dilations(), - op->get_pads_begin(), - op->get_pads_end()); + ov::reference::convolution::value_type>(in_data_ptr, + filter_data, + out_data_ptr, + in_shape, + filter_shape, + out_shape, + op->get_strides(), + op->get_dilations(), + op->get_pads_begin(), + op->get_pads_end()); return true; } diff --git a/src/plugins/template/backend/ops/convolution_backprop_data.cpp b/src/plugins/template/backend/ops/convolution_backprop_data.cpp index 0be67743941..e0d7d7aafcb 100644 --- a/src/plugins/template/backend/ops/convolution_backprop_data.cpp +++ b/src/plugins/template/backend/ops/convolution_backprop_data.cpp @@ -18,7 +18,7 @@ bool evaluate(const std::shared_ptr& op const auto& filter_shape = inputs[1]->get_shape(); ngraph::Strides in_dilation(std::vector(in_shape.size() - 2)); std::fill(in_dilation.begin(), in_dilation.end(), 1); - ngraph::runtime::reference::convolution_backprop_in::value_type>( + ov::reference::convolution_backprop_in::value_type>( in_data_ptr, filter_data, out_data_ptr, diff --git a/src/plugins/template/backend/ops/ctc_greedy_decoder.cpp b/src/plugins/template/backend/ops/ctc_greedy_decoder.cpp index 22e802f1b69..b0bbeffd5a0 100644 --- a/src/plugins/template/backend/ops/ctc_greedy_decoder.cpp +++ b/src/plugins/template/backend/ops/ctc_greedy_decoder.cpp @@ -11,13 +11,13 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::ctc_greedy_decoder(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_shape(), - outputs[0]->get_shape(), - op->get_ctc_merge_repeated()); + ov::reference::ctc_greedy_decoder(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + outputs[0]->get_shape(), + op->get_ctc_merge_repeated()); return true; } diff --git a/src/plugins/template/backend/ops/ctc_greedy_decoder_seq_len.cpp b/src/plugins/template/backend/ops/ctc_greedy_decoder_seq_len.cpp index cc876cba2b1..7cff484d99e 100644 --- a/src/plugins/template/backend/ops/ctc_greedy_decoder_seq_len.cpp +++ b/src/plugins/template/backend/ops/ctc_greedy_decoder_seq_len.cpp @@ -20,23 +20,23 @@ inline void evaluate(const std::shared_ptrget_data_ptr(); } if (op->get_sequence_length_type() == ngraph::element::i32) { - ngraph::runtime::reference::ctc_greedy_decoder_seq_len(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - blank_index, - outputs[0]->get_data_ptr(), - outputs[1]->get_data_ptr(), - inputs[0]->get_shape(), - outputs[0]->get_shape(), - op->get_merge_repeated()); + ov::reference::ctc_greedy_decoder_seq_len(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + blank_index, + outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + inputs[0]->get_shape(), + outputs[0]->get_shape(), + op->get_merge_repeated()); } else if (op->get_sequence_length_type() == ngraph::element::i64) { - ngraph::runtime::reference::ctc_greedy_decoder_seq_len(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - blank_index, - outputs[0]->get_data_ptr(), - outputs[1]->get_data_ptr(), - inputs[0]->get_shape(), - outputs[0]->get_shape(), - op->get_merge_repeated()); + ov::reference::ctc_greedy_decoder_seq_len(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + blank_index, + outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + inputs[0]->get_shape(), + outputs[0]->get_shape(), + op->get_merge_repeated()); } } } // namespace ctc_greedy_decoder_v6 diff --git a/src/plugins/template/backend/ops/ctc_loss.cpp b/src/plugins/template/backend/ops/ctc_loss.cpp index 37ac857486e..41b009be635 100644 --- a/src/plugins/template/backend/ops/ctc_loss.cpp +++ b/src/plugins/template/backend/ops/ctc_loss.cpp @@ -35,16 +35,16 @@ inline void evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& inputs) { using T1 = typename ngraph::element_type_traits::value_type; using T2 = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::CTCLoss(inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_data_ptr(), - inputs[2]->get_data_ptr(), - inputs[3]->get_data_ptr(), - inputs[4]->get_data_ptr(), - op->get_preprocess_collapse_repeated(), - op->get_ctc_merge_repeated(), - op->get_unique(), - outputs[0]->get_data_ptr()); + ov::reference::CTCLoss(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + inputs[3]->get_data_ptr(), + inputs[4]->get_data_ptr(), + op->get_preprocess_collapse_repeated(), + op->get_ctc_merge_repeated(), + op->get_unique(), + outputs[0]->get_data_ptr()); } } // namespace ctc_loss_v4 diff --git a/src/plugins/template/backend/ops/cum_sum.cpp b/src/plugins/template/backend/ops/cum_sum.cpp index 87fabe4c222..a0d23e50563 100644 --- a/src/plugins/template/backend/ops/cum_sum.cpp +++ b/src/plugins/template/backend/ops/cum_sum.cpp @@ -14,12 +14,12 @@ inline void evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& inputs) { using T1 = typename ngraph::element_type_traits::value_type; using T2 = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::cumsum(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - op->is_exclusive(), - op->is_reverse()); + ov::reference::cumsum(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + op->is_exclusive(), + op->is_reverse()); } } // namespace cum_sum_v0 diff --git a/src/plugins/template/backend/ops/deformable_convolution.cpp b/src/plugins/template/backend/ops/deformable_convolution.cpp index 2ba9f60ae29..d4b96062b84 100644 --- a/src/plugins/template/backend/ops/deformable_convolution.cpp +++ b/src/plugins/template/backend/ops/deformable_convolution.cpp @@ -19,7 +19,7 @@ bool evaluate(const std::shared_ptr& op, const auto& offset_shape = inputs[1]->get_shape(); const auto& filter_shape = inputs[2]->get_shape(); if (inputs.size() == 3) { - ngraph::runtime::reference::deformable_convolution::value_type>( + ov::reference::deformable_convolution::value_type>( in_data_ptr, offset_data_ptr, filter_data_ptr, @@ -38,7 +38,7 @@ bool evaluate(const std::shared_ptr& op, } else { const auto mask_data_ptr = inputs[3]->get_data_ptr(); const auto& mask_shape = inputs[3]->get_shape(); - ngraph::runtime::reference::deformable_convolution::value_type>( + ov::reference::deformable_convolution::value_type>( in_data_ptr, offset_data_ptr, filter_data_ptr, @@ -72,7 +72,7 @@ bool evaluate(const std::shared_ptr& op, const auto& in_shape = inputs[0]->get_shape(); const auto& offset_shape = inputs[1]->get_shape(); const auto& filter_shape = inputs[2]->get_shape(); - ngraph::runtime::reference::deformable_convolution::value_type>( + ov::reference::deformable_convolution::value_type>( in_data_ptr, offset_data_ptr, filter_data_ptr, diff --git a/src/plugins/template/backend/ops/deformable_psroi_pooling.cpp b/src/plugins/template/backend/ops/deformable_psroi_pooling.cpp index e2e4d0e1ec5..78a0ed95612 100644 --- a/src/plugins/template/backend/ops/deformable_psroi_pooling.cpp +++ b/src/plugins/template/backend/ops/deformable_psroi_pooling.cpp @@ -20,35 +20,35 @@ bool evaluate(const std::shared_ptr& op, const bool has_offset_intput = inputs.size() == 3; if (has_offset_intput) { - ngraph::runtime::reference::deformable_psroi_pooling(inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_data_ptr(), - inputs[1]->get_shape(), - inputs[2]->get_data_ptr(), - inputs[2]->get_shape(), - outputs[0]->get_data_ptr(), - outputs[0]->get_shape(), - op->get_mode(), - op->get_spatial_scale(), - op->get_spatial_bins_x(), - op->get_spatial_bins_y(), - op->get_trans_std(), - op->get_part_size()); + ov::reference::deformable_psroi_pooling(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + inputs[2]->get_data_ptr(), + inputs[2]->get_shape(), + outputs[0]->get_data_ptr(), + outputs[0]->get_shape(), + op->get_mode(), + op->get_spatial_scale(), + op->get_spatial_bins_x(), + op->get_spatial_bins_y(), + op->get_trans_std(), + op->get_part_size()); } else { - ngraph::runtime::reference::deformable_psroi_pooling(inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_data_ptr(), - inputs[1]->get_shape(), - nullptr, - ngraph::Shape(), - outputs[0]->get_data_ptr(), - outputs[0]->get_shape(), - op->get_mode(), - op->get_spatial_scale(), - op->get_spatial_bins_x(), - op->get_spatial_bins_y(), - op->get_trans_std(), - op->get_part_size()); + ov::reference::deformable_psroi_pooling(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + nullptr, + ngraph::Shape(), + outputs[0]->get_data_ptr(), + outputs[0]->get_shape(), + op->get_mode(), + op->get_spatial_scale(), + op->get_spatial_bins_x(), + op->get_spatial_bins_y(), + op->get_trans_std(), + op->get_part_size()); } return true; } diff --git a/src/plugins/template/backend/ops/detection_output.cpp b/src/plugins/template/backend/ops/detection_output.cpp index b3ed8745367..42ea79e14ab 100644 --- a/src/plugins/template/backend/ops/detection_output.cpp +++ b/src/plugins/template/backend/ops/detection_output.cpp @@ -11,11 +11,11 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::referenceDetectionOutput refDetOut(op->get_attrs(), - op->get_input_shape(0), - op->get_input_shape(1), - op->get_input_shape(2), - op->get_output_shape(0)); + ov::reference::referenceDetectionOutput refDetOut(op->get_attrs(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_input_shape(2), + op->get_output_shape(0)); if (op->get_input_size() == 3) { refDetOut.run(inputs[0]->get_data_ptr(), inputs[1]->get_data_ptr(), @@ -41,11 +41,11 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::referenceDetectionOutput refDetOut(op->get_attrs(), - op->get_input_shape(0), - op->get_input_shape(1), - op->get_input_shape(2), - op->get_output_shape(0)); + ov::reference::referenceDetectionOutput refDetOut(op->get_attrs(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_input_shape(2), + op->get_output_shape(0)); if (op->get_input_size() == 3) { refDetOut.run(inputs[0]->get_data_ptr(), inputs[1]->get_data_ptr(), diff --git a/src/plugins/template/backend/ops/einsum.cpp b/src/plugins/template/backend/ops/einsum.cpp index 7eef0390980..70ac9c66be9 100644 --- a/src/plugins/template/backend/ops/einsum.cpp +++ b/src/plugins/template/backend/ops/einsum.cpp @@ -11,7 +11,7 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { const auto equation = op->get_equation(); - ngraph::runtime::reference::einsum(outputs, inputs, equation); + ov::reference::einsum(outputs, inputs, equation); return true; } diff --git a/src/plugins/template/backend/ops/elu.cpp b/src/plugins/template/backend/ops/elu.cpp index dcda6cb1374..3da9d8f8362 100644 --- a/src/plugins/template/backend/ops/elu.cpp +++ b/src/plugins/template/backend/ops/elu.cpp @@ -11,10 +11,10 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::elu(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape()), - op->get_alpha()); + ov::reference::elu(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape()), + op->get_alpha()); return true; } diff --git a/src/plugins/template/backend/ops/embedding_bag_offsets_sum.cpp b/src/plugins/template/backend/ops/embedding_bag_offsets_sum.cpp index a16c2134d17..a58340a56b1 100644 --- a/src/plugins/template/backend/ops/embedding_bag_offsets_sum.cpp +++ b/src/plugins/template/backend/ops/embedding_bag_offsets_sum.cpp @@ -13,15 +13,14 @@ inline void evaluate(const std::shared_ptr::value_type; using T2 = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::embeddingBagOffsetsSum( - inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - inputs[2]->get_data_ptr(), - inputs.size() > 3 ? inputs[3]->get_data_ptr() : nullptr, - inputs.size() > 4 ? inputs[4]->get_data_ptr() : nullptr, - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[1]->get_shape()), - outputs[0]->get_shape()); + ov::reference::embeddingBagOffsetsSum(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + inputs.size() > 3 ? inputs[3]->get_data_ptr() : nullptr, + inputs.size() > 4 ? inputs[4]->get_data_ptr() : nullptr, + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[1]->get_shape()), + outputs[0]->get_shape()); } } // namespace embedding_bag_offsets_sum_v3 diff --git a/src/plugins/template/backend/ops/embedding_bag_packed_sum.cpp b/src/plugins/template/backend/ops/embedding_bag_packed_sum.cpp index 71b15ef42eb..4a9e764bc8d 100644 --- a/src/plugins/template/backend/ops/embedding_bag_packed_sum.cpp +++ b/src/plugins/template/backend/ops/embedding_bag_packed_sum.cpp @@ -14,13 +14,12 @@ inline void evaluate(const std::shared_ptr::value_type; using T2 = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::embeddingBagPackedSum( - inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - inputs.size() > 2 ? inputs[2]->get_data_ptr() : nullptr, - outputs[0]->get_data_ptr(), - inputs[1]->get_shape(), - outputs[0]->get_shape()); + ov::reference::embeddingBagPackedSum(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs.size() > 2 ? inputs[2]->get_data_ptr() : nullptr, + outputs[0]->get_data_ptr(), + inputs[1]->get_shape(), + outputs[0]->get_shape()); } } // namespace embedding_bag_packed_sum_v3 diff --git a/src/plugins/template/backend/ops/embedding_segments_sum.cpp b/src/plugins/template/backend/ops/embedding_segments_sum.cpp index 6267897f8a5..1d67090fd9c 100644 --- a/src/plugins/template/backend/ops/embedding_segments_sum.cpp +++ b/src/plugins/template/backend/ops/embedding_segments_sum.cpp @@ -13,16 +13,15 @@ inline void evaluate(const std::shared_ptr const ngraph::HostTensorVector& inputs) { using T1 = typename ngraph::element_type_traits::value_type; using T2 = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::embeddingSegmentsSum( - inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - inputs[2]->get_data_ptr(), - inputs.size() > 4 ? inputs[4]->get_data_ptr() : nullptr, - inputs.size() > 5 ? inputs[5]->get_data_ptr() : nullptr, - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_shape(), - outputs[0]->get_shape()); + ov::reference::embeddingSegmentsSum(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + inputs.size() > 4 ? inputs[4]->get_data_ptr() : nullptr, + inputs.size() > 5 ? inputs[5]->get_data_ptr() : nullptr, + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + outputs[0]->get_shape()); } } // namespace embedding_offsets_sum_v3 diff --git a/src/plugins/template/backend/ops/equal.cpp b/src/plugins/template/backend/ops/equal.cpp index 10f2cbe7de7..a6773c15c8a 100644 --- a/src/plugins/template/backend/ops/equal.cpp +++ b/src/plugins/template/backend/ops/equal.cpp @@ -16,14 +16,14 @@ bool evaluate(const std::shared_ptr& op, const auto in0_shape = inputs[0]->get_shape(); const auto in1_shape = inputs[1]->get_shape(); const auto broadcast_spec = op->get_autob(); - ngraph::runtime::reference::equal< - typename ngraph::element_type_traits::value_type, - typename ngraph::element_type_traits::value_type>(in0_data_ptr, - in1_data_ptr, - out_data_ptr, - in0_shape, - in1_shape, - broadcast_spec); + ov::reference::equal::value_type, + typename ngraph::element_type_traits::value_type>( + in0_data_ptr, + in1_data_ptr, + out_data_ptr, + in0_shape, + in1_shape, + broadcast_spec); return true; } diff --git a/src/plugins/template/backend/ops/exp.cpp b/src/plugins/template/backend/ops/exp.cpp index 05fc2f56e17..4d3fd3402b5 100644 --- a/src/plugins/template/backend/ops/exp.cpp +++ b/src/plugins/template/backend/ops/exp.cpp @@ -11,9 +11,9 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::exp(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::exp(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); return true; } diff --git a/src/plugins/template/backend/ops/experimental_detectron_detection_output.cpp b/src/plugins/template/backend/ops/experimental_detectron_detection_output.cpp index 6657926577a..9c6199637c8 100644 --- a/src/plugins/template/backend/ops/experimental_detectron_detection_output.cpp +++ b/src/plugins/template/backend/ops/experimental_detectron_detection_output.cpp @@ -36,25 +36,25 @@ bool evaluate(const std::shared_ptrset_element_type(output_type); outputs[2]->set_shape(output_scores_shape); - ngraph::runtime::reference::experimental_detectron_detection_output(boxes_data.data(), - input_deltas_data.data(), - input_scores_data.data(), - input_im_info_data.data(), - attrs, - output_boxes.data(), - output_scores.data(), - output_classes.data()); + ov::reference::experimental_detectron_detection_output(boxes_data.data(), + input_deltas_data.data(), + input_scores_data.data(), + input_im_info_data.data(), + attrs, + output_boxes.data(), + output_scores.data(), + output_classes.data()); - ngraph::runtime::reference::experimental_detectron_detection_output_postprocessing(outputs[0]->get_data_ptr(), - outputs[1]->get_data_ptr(), - outputs[2]->get_data_ptr(), - output_type, - output_boxes, - output_classes, - output_scores, - output_boxes_shape, - output_classes_shape, - output_scores_shape); + ov::reference::experimental_detectron_detection_output_postprocessing(outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + outputs[2]->get_data_ptr(), + output_type, + output_boxes, + output_classes, + output_scores, + output_boxes_shape, + output_classes_shape, + output_scores_shape); return true; } diff --git a/src/plugins/template/backend/ops/experimental_detectron_prior_grid_generator.cpp b/src/plugins/template/backend/ops/experimental_detectron_prior_grid_generator.cpp index 1c6e7ebf3bf..cff1eb49322 100644 --- a/src/plugins/template/backend/ops/experimental_detectron_prior_grid_generator.cpp +++ b/src/plugins/template/backend/ops/experimental_detectron_prior_grid_generator.cpp @@ -75,15 +75,15 @@ bool evaluate(const std::shared_ptr::value_type; outputs[0]->set_shape(info.output_shape); - ngraph::runtime::reference::experimental_detectron_prior_grid_generator(inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_shape(), - inputs[2]->get_shape(), - outputs[0]->get_data_ptr(), - info.grid_h, - info.grid_w, - info.stride_h, - info.stride_w); + ov::reference::experimental_detectron_prior_grid_generator(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + inputs[2]->get_shape(), + outputs[0]->get_data_ptr(), + info.grid_h, + info.grid_w, + info.stride_h, + info.stride_w); return true; } diff --git a/src/plugins/template/backend/ops/experimental_detectron_proposal_single_image.cpp b/src/plugins/template/backend/ops/experimental_detectron_proposal_single_image.cpp index e5608fc289c..df064504a28 100644 --- a/src/plugins/template/backend/ops/experimental_detectron_proposal_single_image.cpp +++ b/src/plugins/template/backend/ops/experimental_detectron_proposal_single_image.cpp @@ -45,24 +45,24 @@ bool evaluate(const std::shared_ptrset_element_type(output_type); outputs[1]->set_shape(output_scores_shape); - ngraph::runtime::reference::experimental_detectron_proposals_single_image(im_info_data.data(), - anchors_data.data(), - deltas_data.data(), - scores_data.data(), - attrs, - im_info_shape, - anchors_shape, - deltas_shape, - scores_shape, - output_rois.data(), - output_scores.data()); - ngraph::runtime::reference::experimental_detectron_proposals_single_image_postprocessing(outputs[0]->get_data_ptr(), - outputs[1]->get_data_ptr(), - output_type, - output_rois, - output_scores, - output_rois_shape, - output_scores_shape); + ov::reference::experimental_detectron_proposals_single_image(im_info_data.data(), + anchors_data.data(), + deltas_data.data(), + scores_data.data(), + attrs, + im_info_shape, + anchors_shape, + deltas_shape, + scores_shape, + output_rois.data(), + output_scores.data()); + ov::reference::experimental_detectron_proposals_single_image_postprocessing(outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + output_type, + output_rois, + output_scores, + output_rois_shape, + output_scores_shape); return true; } diff --git a/src/plugins/template/backend/ops/experimental_detectron_roi_feature_extractor.cpp b/src/plugins/template/backend/ops/experimental_detectron_roi_feature_extractor.cpp index 7db3d3a6231..4aaac9f3815 100644 --- a/src/plugins/template/backend/ops/experimental_detectron_roi_feature_extractor.cpp +++ b/src/plugins/template/backend/ops/experimental_detectron_roi_feature_extractor.cpp @@ -65,19 +65,19 @@ bool evaluate(const std::shared_ptr output_rois_features(ngraph::shape_size(output_rois_features_shape)); std::vector output_rois(ngraph::shape_size(output_rois_shape)); - ngraph::runtime::reference::experimental_detectron_roi_feature_extractor(input_data, - input_shapes, - attrs, - output_rois_features.data(), - output_rois.data()); + ov::reference::experimental_detectron_roi_feature_extractor(input_data, + input_shapes, + attrs, + output_rois_features.data(), + output_rois.data()); - ngraph::runtime::reference::experimental_detectron_roi_feature_extractor_postprocessing(outputs[0]->get_data_ptr(), - outputs[1]->get_data_ptr(), - output_type, - output_rois_features, - output_rois, - output_rois_features_shape, - output_rois_shape); + ov::reference::experimental_detectron_roi_feature_extractor_postprocessing(outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + output_type, + output_rois_features, + output_rois, + output_rois_features_shape, + output_rois_shape); return true; } diff --git a/src/plugins/template/backend/ops/experimental_detectron_topk_rois.cpp b/src/plugins/template/backend/ops/experimental_detectron_topk_rois.cpp index e33c631cf2e..cd03df2f38c 100644 --- a/src/plugins/template/backend/ops/experimental_detectron_topk_rois.cpp +++ b/src/plugins/template/backend/ops/experimental_detectron_topk_rois.cpp @@ -13,12 +13,12 @@ bool evaluate(const std::shared_ptr::value_type; size_t max_rois = op->get_max_rois(); outputs[0]->set_shape(ngraph::Shape{max_rois, 4}); - ngraph::runtime::reference::experimental_detectron_topk_rois(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_shape(), - max_rois, - outputs[0]->get_data_ptr()); + ov::reference::experimental_detectron_topk_rois(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + max_rois, + outputs[0]->get_data_ptr()); return true; } diff --git a/src/plugins/template/backend/ops/extract_image_patches.cpp b/src/plugins/template/backend/ops/extract_image_patches.cpp index a4e43db96da..d78a21e984b 100644 --- a/src/plugins/template/backend/ops/extract_image_patches.cpp +++ b/src/plugins/template/backend/ops/extract_image_patches.cpp @@ -11,11 +11,11 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::extract_image_patches(op, - inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - outputs[0]->get_shape()); + ov::reference::extract_image_patches(op, + inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + outputs[0]->get_shape()); return true; } diff --git a/src/plugins/template/backend/ops/fft.cpp b/src/plugins/template/backend/ops/fft.cpp index 1b920b42497..db4620270fa 100644 --- a/src/plugins/template/backend/ops/fft.cpp +++ b/src/plugins/template/backend/ops/fft.cpp @@ -28,9 +28,8 @@ InfoForFFT7 get_info_for_fft7_eval(const std::vector(result.input_data_shape.size()); int64_t complex_data_rank = input_rank - 1; - auto canonicalized_axes = ngraph::runtime::reference::canonicalize_axes(result.axes_data.data(), - result.axes_data_shape, - complex_data_rank); + auto canonicalized_axes = + ov::reference::canonicalize_axes(result.axes_data.data(), result.axes_data_shape, complex_data_rank); size_t num_of_axes = result.axes_data.size(); auto signal_size = get_signal_size(inputs, num_of_axes); @@ -57,16 +56,16 @@ bool evaluate(const std::shared_ptr& op, outputs[0]->set_shape(info.output_shape); std::vector fft_result(ngraph::shape_size(info.output_shape), 0.0f); - ngraph::runtime::reference::fft(info.input_data.data(), - info.input_data_shape, - info.axes_data.data(), - info.axes_data_shape, - fft_result.data(), - info.output_shape, - ngraph::runtime::reference::FFTKind::Forward); + ov::reference::fft(info.input_data.data(), + info.input_data_shape, + info.axes_data.data(), + info.axes_data_shape, + fft_result.data(), + info.output_shape, + ov::reference::FFTKind::Forward); const auto output_type = op->get_input_element_type(0); - ngraph::runtime::reference::fft_postprocessing(outputs, output_type, fft_result); + ov::reference::fft_postprocessing(outputs, output_type, fft_result); return true; } @@ -78,16 +77,16 @@ bool evaluate(const std::shared_ptr& op, outputs[0]->set_shape(info.output_shape); std::vector fft_result(ngraph::shape_size(info.output_shape), 0.0f); - ngraph::runtime::reference::fft(info.input_data.data(), - info.input_data_shape, - info.axes_data.data(), - info.axes_data_shape, - fft_result.data(), - info.output_shape, - ngraph::runtime::reference::FFTKind::Inverse); + ov::reference::fft(info.input_data.data(), + info.input_data_shape, + info.axes_data.data(), + info.axes_data_shape, + fft_result.data(), + info.output_shape, + ov::reference::FFTKind::Inverse); const auto output_type = op->get_input_element_type(0); - ngraph::runtime::reference::fft_postprocessing(outputs, output_type, fft_result); + ov::reference::fft_postprocessing(outputs, output_type, fft_result); return true; } diff --git a/src/plugins/template/backend/ops/gather.cpp b/src/plugins/template/backend/ops/gather.cpp index ee209f2b745..9bb9799dc0d 100644 --- a/src/plugins/template/backend/ops/gather.cpp +++ b/src/plugins/template/backend/ops/gather.cpp @@ -12,23 +12,23 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; if (op->get_input_element_type(1) == ngraph::element::i64) { - ngraph::runtime::reference::gather(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - outputs[0]->get_data_ptr(), - op->get_input_shape(0), - op->get_input_shape(1), - op->get_output_shape(0), - op->get_axis(), - op->get_batch_dims()); + ov::reference::gather(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_output_shape(0), + op->get_axis(), + op->get_batch_dims()); } else if (op->get_input_element_type(1) == ngraph::element::i32) { - ngraph::runtime::reference::gather(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - outputs[0]->get_data_ptr(), - op->get_input_shape(0), - op->get_input_shape(1), - op->get_output_shape(0), - op->get_axis(), - op->get_batch_dims()); + ov::reference::gather(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_output_shape(0), + op->get_axis(), + op->get_batch_dims()); } else { OPENVINO_THROW("Unexpected indices type for Gather operation"); } diff --git a/src/plugins/template/backend/ops/gather_elements.cpp b/src/plugins/template/backend/ops/gather_elements.cpp index b0ef056d57a..9c7ac6e892c 100644 --- a/src/plugins/template/backend/ops/gather_elements.cpp +++ b/src/plugins/template/backend/ops/gather_elements.cpp @@ -17,21 +17,21 @@ bool evaluate(const std::shared_ptr& op, outputs[0]->set_shape(indices_shape); if (inputs[1]->get_element_type() == ngraph::element::i64) { - ngraph::runtime::reference::gather_elements(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_shape(), - outputs[0]->get_shape(), - op->get_axis()); + ov::reference::gather_elements(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + outputs[0]->get_shape(), + op->get_axis()); } else if (inputs[1]->get_element_type() == ngraph::element::i32) { - ngraph::runtime::reference::gather_elements(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_shape(), - outputs[0]->get_shape(), - op->get_axis()); + ov::reference::gather_elements(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + outputs[0]->get_shape(), + op->get_axis()); } else { OPENVINO_THROW("Unexpected indices type"); } diff --git a/src/plugins/template/backend/ops/gather_nd.cpp b/src/plugins/template/backend/ops/gather_nd.cpp index 2cb22deec74..97127a297d2 100644 --- a/src/plugins/template/backend/ops/gather_nd.cpp +++ b/src/plugins/template/backend/ops/gather_nd.cpp @@ -12,21 +12,21 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; if (op->get_input_element_type(1) == ngraph::element::i64) { - ngraph::runtime::reference::gather_nd(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_shape(), - outputs[0]->get_shape(), - static_cast(op->get_batch_dims())); + ov::reference::gather_nd(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + outputs[0]->get_shape(), + static_cast(op->get_batch_dims())); } else if (op->get_input_element_type(1) == ngraph::element::i32) { - ngraph::runtime::reference::gather_nd(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_shape(), - outputs[0]->get_shape(), - static_cast(op->get_batch_dims())); + ov::reference::gather_nd(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + outputs[0]->get_shape(), + static_cast(op->get_batch_dims())); } else { OPENVINO_THROW("Unexpected indices type for GatherND operation"); } @@ -39,21 +39,21 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; if (op->get_input_element_type(1) == ngraph::element::i64) { - ngraph::runtime::reference::gather_nd(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_shape(), - outputs[0]->get_shape(), - static_cast(op->get_batch_dims())); + ov::reference::gather_nd(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + outputs[0]->get_shape(), + static_cast(op->get_batch_dims())); } else if (op->get_input_element_type(1) == ngraph::element::i32) { - ngraph::runtime::reference::gather_nd(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_shape(), - outputs[0]->get_shape(), - static_cast(op->get_batch_dims())); + ov::reference::gather_nd(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + outputs[0]->get_shape(), + static_cast(op->get_batch_dims())); } else { OPENVINO_THROW("Unexpected indices type for GatherND operation"); } diff --git a/src/plugins/template/backend/ops/gather_tree.cpp b/src/plugins/template/backend/ops/gather_tree.cpp index ee09ea58db6..1aec9368d7c 100644 --- a/src/plugins/template/backend/ops/gather_tree.cpp +++ b/src/plugins/template/backend/ops/gather_tree.cpp @@ -10,16 +10,16 @@ template bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { - ngraph::runtime::reference::gather_tree(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - inputs[2]->get_data_ptr(), - inputs[3]->get_data_ptr(), - outputs[0]->get_data_ptr(), - op->get_input_shape(0), - op->get_input_shape(1), - op->get_input_shape(2), - op->get_input_shape(3), - inputs[1]->get_element_type()); + ov::reference::gather_tree(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + inputs[3]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_input_shape(2), + op->get_input_shape(3), + inputs[1]->get_element_type()); return true; } diff --git a/src/plugins/template/backend/ops/gelu.cpp b/src/plugins/template/backend/ops/gelu.cpp index 04c59206fdc..0b994fedca4 100644 --- a/src/plugins/template/backend/ops/gelu.cpp +++ b/src/plugins/template/backend/ops/gelu.cpp @@ -11,10 +11,10 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::gelu(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::op::GeluApproximationMode::ERF, - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::gelu(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::op::GeluApproximationMode::ERF, + ngraph::shape_size(inputs[0]->get_shape())); return true; } @@ -23,10 +23,10 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::gelu(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - op->get_approximation_mode(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::gelu(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_approximation_mode(), + ngraph::shape_size(inputs[0]->get_shape())); return true; } diff --git a/src/plugins/template/backend/ops/generate_proposal.cpp b/src/plugins/template/backend/ops/generate_proposal.cpp index 811463f2e66..53571e113e9 100644 --- a/src/plugins/template/backend/ops/generate_proposal.cpp +++ b/src/plugins/template/backend/ops/generate_proposal.cpp @@ -35,18 +35,18 @@ bool evaluate(const std::shared_ptr& op, std::vector output_scores; std::vector output_num; - ngraph::runtime::reference::generate_proposals(im_info_data, - anchors_data, - deltas_data, - scores_data, - attrs, - im_info_shape, - anchors_shape, - deltas_shape, - scores_shape, - output_rois, - output_scores, - output_num); + ov::reference::generate_proposals(im_info_data, + anchors_data, + deltas_data, + scores_data, + attrs, + im_info_shape, + anchors_shape, + deltas_shape, + scores_shape, + output_rois, + output_scores, + output_num); size_t num_selected = static_cast(std::accumulate(output_num.begin(), output_num.end(), 0)); @@ -63,16 +63,16 @@ bool evaluate(const std::shared_ptr& op, outputs[2]->set_element_type(roi_num_type); outputs[2]->set_shape(output_roi_num_shape); - ngraph::runtime::reference::generate_proposals_postprocessing(outputs[0]->get_data_ptr(), - outputs[1]->get_data_ptr(), - outputs[2]->get_data_ptr(), - output_type, - roi_num_type, - output_rois, - output_scores, - output_num, - output_rois_shape, - output_scores_shape); + ov::reference::generate_proposals_postprocessing(outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + outputs[2]->get_data_ptr(), + output_type, + roi_num_type, + output_rois, + output_scores, + output_num, + output_rois_shape, + output_scores_shape); return true; } diff --git a/src/plugins/template/backend/ops/greater.cpp b/src/plugins/template/backend/ops/greater.cpp index c20db3d024d..6df8f4c73e3 100644 --- a/src/plugins/template/backend/ops/greater.cpp +++ b/src/plugins/template/backend/ops/greater.cpp @@ -16,14 +16,14 @@ bool evaluate(const std::shared_ptr& op, const auto in0_shape = inputs[0]->get_shape(); const auto in1_shape = inputs[1]->get_shape(); const auto broadcast_spec = op->get_autob(); - ngraph::runtime::reference::greater< - typename ngraph::element_type_traits::value_type, - typename ngraph::element_type_traits::value_type>(in0_data_ptr, - in1_data_ptr, - out_data_ptr, - in0_shape, - in1_shape, - broadcast_spec); + ov::reference::greater::value_type, + typename ngraph::element_type_traits::value_type>( + in0_data_ptr, + in1_data_ptr, + out_data_ptr, + in0_shape, + in1_shape, + broadcast_spec); return true; } diff --git a/src/plugins/template/backend/ops/grid_sample.cpp b/src/plugins/template/backend/ops/grid_sample.cpp index bd84b0aac83..20e74f5699a 100644 --- a/src/plugins/template/backend/ops/grid_sample.cpp +++ b/src/plugins/template/backend/ops/grid_sample.cpp @@ -14,14 +14,14 @@ bool evaluate(const std::shared_ptr& op, ngraph::element::Type grid_et = op->get_input_element_type(1); switch (grid_et) { case ngraph::element::Type_t::f32: - ngraph::runtime::reference::grid_sample(outputs[0]->get_data_ptr(), - inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_shape(), - attributes.align_corners, - attributes.mode, - attributes.padding_mode); + ov::reference::grid_sample(outputs[0]->get_data_ptr(), + inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + attributes.align_corners, + attributes.mode, + attributes.padding_mode); break; default: return false; diff --git a/src/plugins/template/backend/ops/grn.cpp b/src/plugins/template/backend/ops/grn.cpp index 2429752b68f..74a5fceaa23 100644 --- a/src/plugins/template/backend/ops/grn.cpp +++ b/src/plugins/template/backend/ops/grn.cpp @@ -11,10 +11,10 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::grn(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - op->get_bias(), - inputs[0]->get_shape()); + ov::reference::grn(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_bias(), + inputs[0]->get_shape()); return true; } diff --git a/src/plugins/template/backend/ops/group_convolution.cpp b/src/plugins/template/backend/ops/group_convolution.cpp index 0993cf6816c..6dc851171d2 100644 --- a/src/plugins/template/backend/ops/group_convolution.cpp +++ b/src/plugins/template/backend/ops/group_convolution.cpp @@ -16,17 +16,16 @@ bool evaluate(const std::shared_ptr& op, const auto& out_shape = outputs[0]->get_shape(); const auto& in_shape = inputs[0]->get_shape(); const auto& filter_shape = inputs[1]->get_shape(); - ngraph::runtime::reference::group_convolution::value_type>( - in_data_ptr, - filter_data, - out_data_ptr, - in_shape, - filter_shape, - out_shape, - op->get_strides(), - op->get_dilations(), - op->get_pads_begin(), - op->get_pads_end()); + ov::reference::group_convolution::value_type>(in_data_ptr, + filter_data, + out_data_ptr, + in_shape, + filter_shape, + out_shape, + op->get_strides(), + op->get_dilations(), + op->get_pads_begin(), + op->get_pads_end()); return true; } diff --git a/src/plugins/template/backend/ops/group_convolution_backprop_data.cpp b/src/plugins/template/backend/ops/group_convolution_backprop_data.cpp index d09d219e389..ec58d1efdb8 100644 --- a/src/plugins/template/backend/ops/group_convolution_backprop_data.cpp +++ b/src/plugins/template/backend/ops/group_convolution_backprop_data.cpp @@ -16,7 +16,7 @@ bool evaluate(const std::shared_ptrget_shape(); const auto filter_shape = inputs[1]->get_shape(); const auto out_shape = outputs[0]->get_shape(); - ngraph::runtime::reference::group_convolution_backprop_data::value_type>( + ov::reference::group_convolution_backprop_data::value_type>( in_data_ptr, filter_data_ptr, out_data_ptr, diff --git a/src/plugins/template/backend/ops/gru_cell.cpp b/src/plugins/template/backend/ops/gru_cell.cpp index 28579fbe807..b34b5ea9459 100644 --- a/src/plugins/template/backend/ops/gru_cell.cpp +++ b/src/plugins/template/backend/ops/gru_cell.cpp @@ -12,21 +12,21 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::gru_cell(inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_data_ptr(), - inputs[1]->get_shape(), - inputs[2]->get_data_ptr(), - inputs[2]->get_shape(), - inputs[3]->get_data_ptr(), - inputs[3]->get_shape(), - inputs[4]->get_data_ptr(), - inputs[4]->get_shape(), - outputs[0]->get_data_ptr(), - op->get_activations()[0], - op->get_activations()[1], - op->get_clip(), - op->get_linear_before_reset()); + ov::reference::gru_cell(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + inputs[2]->get_data_ptr(), + inputs[2]->get_shape(), + inputs[3]->get_data_ptr(), + inputs[3]->get_shape(), + inputs[4]->get_data_ptr(), + inputs[4]->get_shape(), + outputs[0]->get_data_ptr(), + op->get_activations()[0], + op->get_activations()[1], + op->get_clip(), + op->get_linear_before_reset()); return true; } @@ -35,22 +35,22 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::gru_cell(inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_data_ptr(), - inputs[1]->get_shape(), - inputs[2]->get_data_ptr(), - inputs[2]->get_shape(), - inputs[3]->get_data_ptr(), - inputs[3]->get_shape(), - inputs[4]->get_data_ptr(), - inputs[4]->get_shape(), - outputs[0]->get_data_ptr(), - op->get_activations()[0], - op->get_activations()[1], - op->get_clip(), - op->get_linear_before_reset(), - inputs[5]->get_data_ptr()); + ov::reference::gru_cell(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + inputs[2]->get_data_ptr(), + inputs[2]->get_shape(), + inputs[3]->get_data_ptr(), + inputs[3]->get_shape(), + inputs[4]->get_data_ptr(), + inputs[4]->get_shape(), + outputs[0]->get_data_ptr(), + op->get_activations()[0], + op->get_activations()[1], + op->get_clip(), + op->get_linear_before_reset(), + inputs[5]->get_data_ptr()); return true; } diff --git a/src/plugins/template/backend/ops/hard_sigmoid.cpp b/src/plugins/template/backend/ops/hard_sigmoid.cpp index 8f238660502..9cf2a16f5da 100644 --- a/src/plugins/template/backend/ops/hard_sigmoid.cpp +++ b/src/plugins/template/backend/ops/hard_sigmoid.cpp @@ -12,11 +12,11 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::hard_sigmoid(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr()[0], - inputs[2]->get_data_ptr()[0], - outputs[0]->get_data_ptr(), - ngraph::shape_size(outputs[0]->get_shape())); + ov::reference::hard_sigmoid(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr()[0], + inputs[2]->get_data_ptr()[0], + outputs[0]->get_data_ptr(), + ngraph::shape_size(outputs[0]->get_shape())); return true; } diff --git a/src/plugins/template/backend/ops/if.cpp b/src/plugins/template/backend/ops/if.cpp index 07ad281f3e6..df93652d103 100644 --- a/src/plugins/template/backend/ops/if.cpp +++ b/src/plugins/template/backend/ops/if.cpp @@ -163,7 +163,7 @@ bool evaluate(const std::shared_ptr& op, out_descs.emplace_back(op->get_output_descriptions(static_cast(i))); } try { - ngraph::runtime::reference::if_reference(bodies, out_descs, in_descs, outputs, inputs); + ov::reference::if_reference(bodies, out_descs, in_descs, outputs, inputs); } catch (...) { if_op::if_reference(bodies, out_descs, in_descs, outputs, inputs); } diff --git a/src/plugins/template/backend/ops/interpolate.cpp b/src/plugins/template/backend/ops/interpolate.cpp index cbd1e71bc9d..c2f760c0052 100644 --- a/src/plugins/template/backend/ops/interpolate.cpp +++ b/src/plugins/template/backend/ops/interpolate.cpp @@ -14,32 +14,32 @@ bool evaluate(const std::shared_ptr& op, ngraph::element::Type input_et = op->get_input_element_type(0); switch (input_et) { case ngraph::element::Type_t::f64: - ngraph::runtime::reference::interpolate(inputs[0]->get_data_ptr(), - op->get_input_partial_shape(0), - outputs[0]->get_data_ptr(), - op->get_output_shape(0), - op->get_attrs()); + ov::reference::interpolate(inputs[0]->get_data_ptr(), + op->get_input_partial_shape(0), + outputs[0]->get_data_ptr(), + op->get_output_shape(0), + op->get_attrs()); break; case ngraph::element::Type_t::f32: - ngraph::runtime::reference::interpolate(inputs[0]->get_data_ptr(), - op->get_input_partial_shape(0), - outputs[0]->get_data_ptr(), - op->get_output_shape(0), - op->get_attrs()); + ov::reference::interpolate(inputs[0]->get_data_ptr(), + op->get_input_partial_shape(0), + outputs[0]->get_data_ptr(), + op->get_output_shape(0), + op->get_attrs()); break; case ngraph::element::Type_t::f16: - ngraph::runtime::reference::interpolate(inputs[0]->get_data_ptr(), - op->get_input_partial_shape(0), - outputs[0]->get_data_ptr(), - op->get_output_shape(0), - op->get_attrs()); + ov::reference::interpolate(inputs[0]->get_data_ptr(), + op->get_input_partial_shape(0), + outputs[0]->get_data_ptr(), + op->get_output_shape(0), + op->get_attrs()); break; case ngraph::element::Type_t::bf16: - ngraph::runtime::reference::interpolate(inputs[0]->get_data_ptr(), - op->get_input_partial_shape(0), - outputs[0]->get_data_ptr(), - op->get_output_shape(0), - op->get_attrs()); + ov::reference::interpolate(inputs[0]->get_data_ptr(), + op->get_input_partial_shape(0), + outputs[0]->get_data_ptr(), + op->get_output_shape(0), + op->get_attrs()); break; default:; } @@ -209,8 +209,8 @@ static void pad_input_data(const uint8_t* data_ptr, const ov::Shape& padded_input_shape, const std::vector& pads_begin) { NGRAPH_SUPPRESS_DEPRECATED_START - ngraph::CoordinateTransform input_transform(input_shape); - ngraph::CoordinateTransform padded_transform(padded_input_shape); + ov::CoordinateTransform input_transform(input_shape); + ov::CoordinateTransform padded_transform(padded_input_shape); for (const ngraph::Coordinate& input_coord : input_transform) { auto padded_coord = input_coord; @@ -278,58 +278,58 @@ bool evaluate_interpolate(const std::shared_ptr& op, switch (input_et) { case element::Type_t::f32: - ngraph::runtime::reference::interpolate(reinterpret_cast(padded_data_ptr), - padded_input_shape, - scales, - axes, - outputs[0]->get_data_ptr(), - out_shape, - m_attrs); + ov::reference::interpolate(reinterpret_cast(padded_data_ptr), + padded_input_shape, + scales, + axes, + outputs[0]->get_data_ptr(), + out_shape, + m_attrs); break; case element::Type_t::bf16: - ngraph::runtime::reference::interpolate(reinterpret_cast(padded_data_ptr), - padded_input_shape, - scales, - axes, - outputs[0]->get_data_ptr(), - out_shape, - m_attrs); + ov::reference::interpolate(reinterpret_cast(padded_data_ptr), + padded_input_shape, + scales, + axes, + outputs[0]->get_data_ptr(), + out_shape, + m_attrs); break; case element::Type_t::f16: - ngraph::runtime::reference::interpolate(reinterpret_cast(padded_data_ptr), - padded_input_shape, - scales, - axes, - outputs[0]->get_data_ptr(), - out_shape, - m_attrs); + ov::reference::interpolate(reinterpret_cast(padded_data_ptr), + padded_input_shape, + scales, + axes, + outputs[0]->get_data_ptr(), + out_shape, + m_attrs); break; case element::Type_t::u8: - ngraph::runtime::reference::interpolate(reinterpret_cast(padded_data_ptr), - padded_input_shape, - scales, - axes, - outputs[0]->get_data_ptr(), - out_shape, - m_attrs); + ov::reference::interpolate(reinterpret_cast(padded_data_ptr), + padded_input_shape, + scales, + axes, + outputs[0]->get_data_ptr(), + out_shape, + m_attrs); break; case element::Type_t::i8: - ngraph::runtime::reference::interpolate(reinterpret_cast(padded_data_ptr), - padded_input_shape, - scales, - axes, - outputs[0]->get_data_ptr(), - out_shape, - m_attrs); + ov::reference::interpolate(reinterpret_cast(padded_data_ptr), + padded_input_shape, + scales, + axes, + outputs[0]->get_data_ptr(), + out_shape, + m_attrs); break; case element::Type_t::i32: - ngraph::runtime::reference::interpolate(reinterpret_cast(padded_data_ptr), - padded_input_shape, - scales, - axes, - outputs[0]->get_data_ptr(), - out_shape, - m_attrs); + ov::reference::interpolate(reinterpret_cast(padded_data_ptr), + padded_input_shape, + scales, + axes, + outputs[0]->get_data_ptr(), + out_shape, + m_attrs); break; default:; } diff --git a/src/plugins/template/backend/ops/irdft.cpp b/src/plugins/template/backend/ops/irdft.cpp index c46c74d6b99..65a6093a2fd 100644 --- a/src/plugins/template/backend/ops/irdft.cpp +++ b/src/plugins/template/backend/ops/irdft.cpp @@ -32,9 +32,8 @@ InfoForIRFFT9 get_info_for_irfft9_eval(const std::vector(result.input_data_shape.size()); int64_t complex_data_rank = input_rank - 1; - auto canonicalized_axes = ngraph::runtime::reference::canonicalize_axes(result.axes_data.data(), - result.axes_data_shape, - complex_data_rank); + auto canonicalized_axes = + ov::reference::canonicalize_axes(result.axes_data.data(), result.axes_data_shape, complex_data_rank); size_t num_of_axes = result.axes_data.size(); auto signal_size = get_signal_size(inputs, num_of_axes); @@ -73,16 +72,16 @@ bool evaluate(const std::shared_ptr& op, outputs[0]->set_shape(info.output_shape); std::vector irfft_result(ngraph::shape_size(info.output_shape), 0.0f); - ngraph::runtime::reference::irdft(info.input_data, - info.input_data_shape, - info.axes_data, - irfft_result.data(), - info.fft_output_shape, - info.output_shape, - info.last_signal_size); + ov::reference::irdft(info.input_data, + info.input_data_shape, + info.axes_data, + irfft_result.data(), + info.fft_output_shape, + info.output_shape, + info.last_signal_size); const auto output_type = op->get_input_element_type(0); - ngraph::runtime::reference::fft_postprocessing(outputs, output_type, irfft_result); + ov::reference::fft_postprocessing(outputs, output_type, irfft_result); return true; } diff --git a/src/plugins/template/backend/ops/is_finite.cpp b/src/plugins/template/backend/ops/is_finite.cpp index a8c5331a87a..2ec4826a50b 100644 --- a/src/plugins/template/backend/ops/is_finite.cpp +++ b/src/plugins/template/backend/ops/is_finite.cpp @@ -14,26 +14,24 @@ bool evaluate(const std::shared_ptr& op, ngraph::element::Type input_et = op->get_input_element_type(0); switch (input_et) { case ngraph::element::Type_t::f64: - ngraph::runtime::reference::is_finite(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::is_finite(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); break; case ngraph::element::Type_t::f32: - ngraph::runtime::reference::is_finite(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::is_finite(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); break; case ngraph::element::Type_t::f16: - ngraph::runtime::reference::is_finite( - inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::is_finite(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); break; case ngraph::element::Type_t::bf16: - ngraph::runtime::reference::is_finite( - inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::is_finite(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); break; default: return false; diff --git a/src/plugins/template/backend/ops/is_inf.cpp b/src/plugins/template/backend/ops/is_inf.cpp index 44556fb18dc..4509ced2544 100644 --- a/src/plugins/template/backend/ops/is_inf.cpp +++ b/src/plugins/template/backend/ops/is_inf.cpp @@ -14,28 +14,28 @@ bool evaluate(const std::shared_ptr& op, ngraph::element::Type input_et = op->get_input_element_type(0); switch (input_et) { case ngraph::element::Type_t::f64: - ngraph::runtime::reference::is_inf(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape()), - op->get_attributes()); + ov::reference::is_inf(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape()), + op->get_attributes()); break; case ngraph::element::Type_t::f32: - ngraph::runtime::reference::is_inf(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape()), - op->get_attributes()); + ov::reference::is_inf(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape()), + op->get_attributes()); break; case ngraph::element::Type_t::f16: - ngraph::runtime::reference::is_inf(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape()), - op->get_attributes()); + ov::reference::is_inf(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape()), + op->get_attributes()); break; case ngraph::element::Type_t::bf16: - ngraph::runtime::reference::is_inf(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape()), - op->get_attributes()); + ov::reference::is_inf(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape()), + op->get_attributes()); break; default: return false; diff --git a/src/plugins/template/backend/ops/is_nan.cpp b/src/plugins/template/backend/ops/is_nan.cpp index ab3f9b4fa51..87ba4c34328 100644 --- a/src/plugins/template/backend/ops/is_nan.cpp +++ b/src/plugins/template/backend/ops/is_nan.cpp @@ -14,24 +14,24 @@ bool evaluate(const std::shared_ptr& op, ngraph::element::Type input_et = op->get_input_element_type(0); switch (input_et) { case ngraph::element::Type_t::f64: - ngraph::runtime::reference::is_nan(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::is_nan(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); break; case ngraph::element::Type_t::f32: - ngraph::runtime::reference::is_nan(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::is_nan(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); break; case ngraph::element::Type_t::f16: - ngraph::runtime::reference::is_nan(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::is_nan(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); break; case ngraph::element::Type_t::bf16: - ngraph::runtime::reference::is_nan(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::is_nan(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); break; default: return false; diff --git a/src/plugins/template/backend/ops/log.cpp b/src/plugins/template/backend/ops/log.cpp index b3bd2a77ce5..c6b988dc66a 100644 --- a/src/plugins/template/backend/ops/log.cpp +++ b/src/plugins/template/backend/ops/log.cpp @@ -11,9 +11,9 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::log(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::log(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); return true; } diff --git a/src/plugins/template/backend/ops/log_softmax.cpp b/src/plugins/template/backend/ops/log_softmax.cpp index 93586209661..415171d1db6 100644 --- a/src/plugins/template/backend/ops/log_softmax.cpp +++ b/src/plugins/template/backend/ops/log_softmax.cpp @@ -15,10 +15,10 @@ bool evaluate(const std::shared_ptr& op, if (i_axis < 0) { i_axis += inputs[0]->get_partial_shape().rank().get_length(); } - ngraph::runtime::reference::log_softmax(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - op->get_output_shape(0), - ngraph::AxisSet{(size_t)i_axis}); + ov::reference::log_softmax(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_output_shape(0), + ngraph::AxisSet{(size_t)i_axis}); return true; } diff --git a/src/plugins/template/backend/ops/lrn.cpp b/src/plugins/template/backend/ops/lrn.cpp index 82514f59a4f..5522a695bea 100644 --- a/src/plugins/template/backend/ops/lrn.cpp +++ b/src/plugins/template/backend/ops/lrn.cpp @@ -11,14 +11,14 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::lrn(inputs[0]->get_data_ptr(), - op->get_reduction_axes(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - op->get_alpha(), - op->get_beta(), - op->get_bias(), - op->get_nsize()); + ov::reference::lrn(inputs[0]->get_data_ptr(), + op->get_reduction_axes(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + op->get_alpha(), + op->get_beta(), + op->get_bias(), + op->get_nsize()); return true; } diff --git a/src/plugins/template/backend/ops/lstm_cell.cpp b/src/plugins/template/backend/ops/lstm_cell.cpp index 7fc186ec8c2..12f81d29a26 100644 --- a/src/plugins/template/backend/ops/lstm_cell.cpp +++ b/src/plugins/template/backend/ops/lstm_cell.cpp @@ -12,24 +12,24 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::lstm_cell(inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_data_ptr(), - inputs[1]->get_shape(), - inputs[2]->get_data_ptr(), - inputs[2]->get_shape(), - inputs[3]->get_data_ptr(), - inputs[3]->get_shape(), - inputs[4]->get_data_ptr(), - inputs[4]->get_shape(), - inputs[5]->get_data_ptr(), - inputs[5]->get_shape(), - outputs[0]->get_data_ptr(), - outputs[1]->get_data_ptr(), - op->get_activations()[0], - op->get_activations()[1], - op->get_activations()[2], - op->get_clip()); + ov::reference::lstm_cell(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + inputs[2]->get_data_ptr(), + inputs[2]->get_shape(), + inputs[3]->get_data_ptr(), + inputs[3]->get_shape(), + inputs[4]->get_data_ptr(), + inputs[4]->get_shape(), + inputs[5]->get_data_ptr(), + inputs[5]->get_shape(), + outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + op->get_activations()[0], + op->get_activations()[1], + op->get_activations()[2], + op->get_clip()); return true; } @@ -38,28 +38,28 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::lstm_cell_v1(inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_data_ptr(), - inputs[1]->get_shape(), - inputs[2]->get_data_ptr(), - inputs[2]->get_shape(), - inputs[3]->get_data_ptr(), - inputs[3]->get_shape(), - inputs[4]->get_data_ptr(), - inputs[4]->get_shape(), - inputs[5]->get_data_ptr(), - inputs[5]->get_shape(), - inputs[6]->get_data_ptr(), - inputs[6]->get_shape(), - outputs[0]->get_data_ptr(), - outputs[1]->get_data_ptr(), - op->get_activations()[0], - op->get_activations()[1], - op->get_activations()[2], - op->get_clip(), - op->get_weights_format(), - op->get_input_forget()); + ov::reference::lstm_cell_v1(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + inputs[2]->get_data_ptr(), + inputs[2]->get_shape(), + inputs[3]->get_data_ptr(), + inputs[3]->get_shape(), + inputs[4]->get_data_ptr(), + inputs[4]->get_shape(), + inputs[5]->get_data_ptr(), + inputs[5]->get_shape(), + inputs[6]->get_data_ptr(), + inputs[6]->get_shape(), + outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + op->get_activations()[0], + op->get_activations()[1], + op->get_activations()[2], + op->get_clip(), + op->get_weights_format(), + op->get_input_forget()); return true; } diff --git a/src/plugins/template/backend/ops/matrix_nms.cpp b/src/plugins/template/backend/ops/matrix_nms.cpp index 8fcf4f9517d..3e13c542ec4 100644 --- a/src/plugins/template/backend/ops/matrix_nms.cpp +++ b/src/plugins/template/backend/ops/matrix_nms.cpp @@ -100,16 +100,16 @@ bool evaluate(const std::shared_ptr& op, std::vector selected_indices(info.selected_indices_shape_size); std::vector valid_outputs(info.boxes_shape[0]); - ngraph::runtime::reference::matrix_nms(info.boxes_data.data(), - info.boxes_shape, - info.scores_data.data(), - info.scores_shape, - op->get_attrs(), - selected_outputs.data(), - info.selected_outputs_shape, - selected_indices.data(), - info.selected_indices_shape, - valid_outputs.data()); + ov::reference::matrix_nms(info.boxes_data.data(), + info.boxes_shape, + info.scores_data.data(), + info.scores_shape, + op->get_attrs(), + selected_outputs.data(), + info.selected_outputs_shape, + selected_indices.data(), + info.selected_indices_shape, + valid_outputs.data()); void* pscores = nullptr; void* pselected_num = nullptr; @@ -127,14 +127,14 @@ bool evaluate(const std::shared_ptr& op, pselected_num = outputs[2]->get_data_ptr(); } - ngraph::runtime::reference::nms_common::nms_common_postprocessing(prois, - pscores, - pselected_num, - op->get_attrs().output_type, - selected_outputs, - selected_indices, - valid_outputs, - op->get_input_element_type(0)); + ov::reference::nms_common::nms_common_postprocessing(prois, + pscores, + pselected_num, + op->get_attrs().output_type, + selected_outputs, + selected_indices, + valid_outputs, + op->get_input_element_type(0)); return true; } diff --git a/src/plugins/template/backend/ops/mod.cpp b/src/plugins/template/backend/ops/mod.cpp index ab7cbbea291..e84ef8ffe01 100644 --- a/src/plugins/template/backend/ops/mod.cpp +++ b/src/plugins/template/backend/ops/mod.cpp @@ -11,12 +11,12 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::mod(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_shape(), - op->get_autob()); + ov::reference::mod(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + op->get_autob()); return true; } diff --git a/src/plugins/template/backend/ops/multiclass_nms.cpp b/src/plugins/template/backend/ops/multiclass_nms.cpp index 3550a8a2a8c..e4a3e7f1d5a 100644 --- a/src/plugins/template/backend/ops/multiclass_nms.cpp +++ b/src/plugins/template/backend/ops/multiclass_nms.cpp @@ -94,18 +94,18 @@ bool evaluate(const std::shared_ptr& op, std::vector selected_indices(info.selected_indices_shape_size); std::vector valid_outputs(info.selected_numrois_shape_size); - ngraph::runtime::reference::multiclass_nms(info.boxes_data.data(), - info.boxes_shape, - info.scores_data.data(), - info.scores_shape, - nullptr, - ngraph::Shape(), // won't be used - op->get_attrs(), - selected_outputs.data(), - info.selected_outputs_shape, - selected_indices.data(), - info.selected_indices_shape, - valid_outputs.data()); + ov::reference::multiclass_nms(info.boxes_data.data(), + info.boxes_shape, + info.scores_data.data(), + info.scores_shape, + nullptr, + ngraph::Shape(), // won't be used + op->get_attrs(), + selected_outputs.data(), + info.selected_outputs_shape, + selected_indices.data(), + info.selected_indices_shape, + valid_outputs.data()); void* pscores = nullptr; void* pselected_num = nullptr; @@ -123,14 +123,14 @@ bool evaluate(const std::shared_ptr& op, pselected_num = outputs[2]->get_data_ptr(); } - ngraph::runtime::reference::nms_common::nms_common_postprocessing(prois, - pscores, - pselected_num, - op->get_attrs().output_type, - selected_outputs, - selected_indices, - valid_outputs, - op->get_input_element_type(0)); + ov::reference::nms_common::nms_common_postprocessing(prois, + pscores, + pselected_num, + op->get_attrs().output_type, + selected_outputs, + selected_indices, + valid_outputs, + op->get_input_element_type(0)); return true; } @@ -145,18 +145,18 @@ bool evaluate(const std::shared_ptr& op, std::vector selected_indices(info.selected_indices_shape_size); std::vector valid_outputs(info.selected_numrois_shape_size); - ngraph::runtime::reference::multiclass_nms(info.boxes_data.data(), - info.boxes_shape, - info.scores_data.data(), - info.scores_shape, - info.roisnum_data.data(), - info.roisnum_shape, - op->get_attrs(), - selected_outputs.data(), - info.selected_outputs_shape, - selected_indices.data(), - info.selected_indices_shape, - valid_outputs.data()); + ov::reference::multiclass_nms(info.boxes_data.data(), + info.boxes_shape, + info.scores_data.data(), + info.scores_shape, + info.roisnum_data.data(), + info.roisnum_shape, + op->get_attrs(), + selected_outputs.data(), + info.selected_outputs_shape, + selected_indices.data(), + info.selected_indices_shape, + valid_outputs.data()); void* pscores = nullptr; void* pselected_num = nullptr; @@ -174,14 +174,14 @@ bool evaluate(const std::shared_ptr& op, pselected_num = outputs[2]->get_data_ptr(); } - ngraph::runtime::reference::nms_common::nms_common_postprocessing(prois, - pscores, - pselected_num, - op->get_attrs().output_type, - selected_outputs, - selected_indices, - valid_outputs, - op->get_input_element_type(0)); + ov::reference::nms_common::nms_common_postprocessing(prois, + pscores, + pselected_num, + op->get_attrs().output_type, + selected_outputs, + selected_indices, + valid_outputs, + op->get_input_element_type(0)); return true; } diff --git a/src/plugins/template/backend/ops/mvn.cpp b/src/plugins/template/backend/ops/mvn.cpp index cca797a58c8..325016eef88 100644 --- a/src/plugins/template/backend/ops/mvn.cpp +++ b/src/plugins/template/backend/ops/mvn.cpp @@ -11,12 +11,12 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::mvn(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - op->get_normalize_variance(), - op->get_reduction_axes(), - op->get_eps()); + ov::reference::mvn(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + op->get_normalize_variance(), + op->get_reduction_axes(), + op->get_eps()); return true; } @@ -54,13 +54,13 @@ bool evaluate(const std::shared_ptr& op, } else { OPENVINO_THROW("Unexpected indices type"); } - ngraph::runtime::reference::mvn_6(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - reduction_axes, - op->get_normalize_variance(), - op->get_eps(), - op->get_eps_mode()); + ov::reference::mvn_6(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + reduction_axes, + op->get_normalize_variance(), + op->get_eps(), + op->get_eps_mode()); return true; } diff --git a/src/plugins/template/backend/ops/non_max_suppression.cpp b/src/plugins/template/backend/ops/non_max_suppression.cpp index 69fb75ab4b5..e99f6d6c85a 100644 --- a/src/plugins/template/backend/ops/non_max_suppression.cpp +++ b/src/plugins/template/backend/ops/non_max_suppression.cpp @@ -154,29 +154,29 @@ bool evaluate(const std::shared_ptr& op, std::vector selected_scores(info.out_shape_size); int64_t valid_outputs = 0; - ngraph::runtime::reference::non_max_suppression(info.boxes_data.data(), - info.boxes_shape, - info.scores_data.data(), - info.scores_shape, - info.max_output_boxes_per_class, - info.iou_threshold, - info.score_threshold, - info.soft_nms_sigma, - selected_indices.data(), - info.out_shape, - selected_scores.data(), - info.out_shape, - &valid_outputs, - info.sort_result_descending); + ov::reference::non_max_suppression(info.boxes_data.data(), + info.boxes_shape, + info.scores_data.data(), + info.scores_shape, + info.max_output_boxes_per_class, + info.iou_threshold, + info.score_threshold, + info.soft_nms_sigma, + selected_indices.data(), + info.out_shape, + selected_scores.data(), + info.out_shape, + &valid_outputs, + info.sort_result_descending); auto selected_scores_type = (outputs.size() < 3) ? ngraph::element::f32 : outputs[1]->get_element_type(); - ngraph::runtime::reference::nms_postprocessing(outputs, - info.output_type, - selected_indices, - selected_scores, - valid_outputs, - selected_scores_type); + ov::reference::nms_postprocessing(outputs, + info.output_type, + selected_indices, + selected_scores, + valid_outputs, + selected_scores_type); return true; } @@ -326,29 +326,29 @@ bool evaluate(const std::shared_ptr& op, std::vector selected_scores(info.out_shape_size); int64_t valid_outputs = 0; - ngraph::runtime::reference::non_max_suppression(info.boxes_data.data(), - info.boxes_shape, - info.scores_data.data(), - info.scores_shape, - info.max_output_boxes_per_class, - info.iou_threshold, - info.score_threshold, - info.soft_nms_sigma, - selected_indices.data(), - info.out_shape, - selected_scores.data(), - info.out_shape, - &valid_outputs, - info.sort_result_descending); + ov::reference::non_max_suppression(info.boxes_data.data(), + info.boxes_shape, + info.scores_data.data(), + info.scores_shape, + info.max_output_boxes_per_class, + info.iou_threshold, + info.score_threshold, + info.soft_nms_sigma, + selected_indices.data(), + info.out_shape, + selected_scores.data(), + info.out_shape, + &valid_outputs, + info.sort_result_descending); auto selected_scores_type = (inputs.size() < 4) ? ngraph::element::f32 : inputs[3]->get_element_type(); - ngraph::runtime::reference::nms_postprocessing(outputs, - info.output_type, - selected_indices, - selected_scores, - valid_outputs, - selected_scores_type); + ov::reference::nms_postprocessing(outputs, + info.output_type, + selected_indices, + selected_scores, + valid_outputs, + selected_scores_type); return true; } @@ -498,29 +498,29 @@ bool evaluate(const std::shared_ptr& op, std::vector selected_scores(info.out_shape_size); int64_t valid_outputs = 0; - ngraph::runtime::reference::non_max_suppression(info.boxes_data.data(), - info.boxes_shape, - info.scores_data.data(), - info.scores_shape, - info.max_output_boxes_per_class, - info.iou_threshold, - info.score_threshold, - info.soft_nms_sigma, - selected_indices.data(), - info.out_shape, - selected_scores.data(), - info.out_shape, - &valid_outputs, - info.sort_result_descending); + ov::reference::non_max_suppression(info.boxes_data.data(), + info.boxes_shape, + info.scores_data.data(), + info.scores_shape, + info.max_output_boxes_per_class, + info.iou_threshold, + info.score_threshold, + info.soft_nms_sigma, + selected_indices.data(), + info.out_shape, + selected_scores.data(), + info.out_shape, + &valid_outputs, + info.sort_result_descending); auto selected_scores_type = (inputs.size() < 4) ? ngraph::element::f32 : inputs[3]->get_element_type(); - ngraph::runtime::reference::nms_postprocessing(outputs, - info.output_type, - selected_indices, - selected_scores, - valid_outputs, - selected_scores_type); + ov::reference::nms_postprocessing(outputs, + info.output_type, + selected_indices, + selected_scores, + valid_outputs, + selected_scores_type); return true; } @@ -670,29 +670,29 @@ bool evaluate(const std::shared_ptr& op, std::vector selected_scores(info.out_shape_size); int64_t valid_outputs = 0; - ngraph::runtime::reference::non_max_suppression(info.boxes_data.data(), - info.boxes_shape, - info.scores_data.data(), - info.scores_shape, - info.max_output_boxes_per_class, - info.iou_threshold, - info.score_threshold, - info.soft_nms_sigma, - selected_indices.data(), - info.out_shape, - selected_scores.data(), - info.out_shape, - &valid_outputs, - info.sort_result_descending); + ov::reference::non_max_suppression(info.boxes_data.data(), + info.boxes_shape, + info.scores_data.data(), + info.scores_shape, + info.max_output_boxes_per_class, + info.iou_threshold, + info.score_threshold, + info.soft_nms_sigma, + selected_indices.data(), + info.out_shape, + selected_scores.data(), + info.out_shape, + &valid_outputs, + info.sort_result_descending); auto selected_scores_type = (inputs.size() < 4) ? ngraph::element::f32 : inputs[3]->get_element_type(); - ngraph::runtime::reference::nms_postprocessing(outputs, - info.output_type, - selected_indices, - selected_scores, - valid_outputs, - selected_scores_type); + ov::reference::nms_postprocessing(outputs, + info.output_type, + selected_indices, + selected_scores, + valid_outputs, + selected_scores_type); return true; } @@ -842,29 +842,29 @@ bool evaluate(const std::shared_ptr& op, std::vector selected_scores(info.out_shape_size); int64_t valid_outputs = 0; - ngraph::runtime::reference::non_max_suppression5(info.boxes_data.data(), - info.boxes_shape, - info.scores_data.data(), - info.scores_shape, - info.max_output_boxes_per_class, - info.iou_threshold, - info.score_threshold, - info.soft_nms_sigma, - selected_indices.data(), - info.out_shape, - selected_scores.data(), - info.out_shape, - &valid_outputs, - info.sort_result_descending); + ov::reference::non_max_suppression5(info.boxes_data.data(), + info.boxes_shape, + info.scores_data.data(), + info.scores_shape, + info.max_output_boxes_per_class, + info.iou_threshold, + info.score_threshold, + info.soft_nms_sigma, + selected_indices.data(), + info.out_shape, + selected_scores.data(), + info.out_shape, + &valid_outputs, + info.sort_result_descending); auto selected_scores_type = (outputs.size() < 3) ? ngraph::element::f32 : outputs[1]->get_element_type(); - ngraph::runtime::reference::nms_postprocessing(outputs, - info.output_type, - selected_indices, - selected_scores, - valid_outputs, - selected_scores_type); + ov::reference::nms_postprocessing(outputs, + info.output_type, + selected_indices, + selected_scores, + valid_outputs, + selected_scores_type); return true; } diff --git a/src/plugins/template/backend/ops/normalize_l2.cpp b/src/plugins/template/backend/ops/normalize_l2.cpp index 26358c3e3f1..c2eb3691755 100644 --- a/src/plugins/template/backend/ops/normalize_l2.cpp +++ b/src/plugins/template/backend/ops/normalize_l2.cpp @@ -11,12 +11,12 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::normalize_l2(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - op->get_input_shape(0), - op->get_reduction_axes(), - op->get_eps(), - op->get_eps_mode()); + ov::reference::normalize_l2(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_reduction_axes(), + op->get_eps(), + op->get_eps_mode()); return true; } diff --git a/src/plugins/template/backend/ops/pad.cpp b/src/plugins/template/backend/ops/pad.cpp index db4ec0646b2..e5fdee71c10 100644 --- a/src/plugins/template/backend/ops/pad.cpp +++ b/src/plugins/template/backend/ops/pad.cpp @@ -10,15 +10,15 @@ template bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { - ngraph::runtime::reference::pad(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape()), - inputs[1]->get_shape(), - outputs[0]->get_shape(), - op->get_pads_end(), - op->get_pads_begin(), - op->get_pad_mode()); + ov::reference::pad(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape()), + inputs[1]->get_shape(), + outputs[0]->get_shape(), + op->get_pads_end(), + op->get_pads_begin(), + op->get_pad_mode()); return true; } diff --git a/src/plugins/template/backend/ops/prelu.cpp b/src/plugins/template/backend/ops/prelu.cpp index 5150950f15b..914feb94f6a 100644 --- a/src/plugins/template/backend/ops/prelu.cpp +++ b/src/plugins/template/backend/ops/prelu.cpp @@ -11,11 +11,11 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::prelu(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_shape()); + ov::reference::prelu(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape()); return true; } diff --git a/src/plugins/template/backend/ops/proposal.cpp b/src/plugins/template/backend/ops/proposal.cpp index ad5ad166a79..b94c06379a1 100644 --- a/src/plugins/template/backend/ops/proposal.cpp +++ b/src/plugins/template/backend/ops/proposal.cpp @@ -11,15 +11,15 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::proposal_v0(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - inputs[2]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_shape(), - inputs[2]->get_shape(), - outputs[0]->get_shape(), - op.get()->get_attrs()); + ov::reference::proposal_v0(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + inputs[2]->get_shape(), + outputs[0]->get_shape(), + op.get()->get_attrs()); return true; } @@ -28,17 +28,17 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::proposal_v4(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - inputs[2]->get_data_ptr(), - outputs[0]->get_data_ptr(), - outputs[1]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_shape(), - inputs[2]->get_shape(), - outputs[0]->get_shape(), - outputs[1]->get_shape(), - op.get()->get_attrs()); + ov::reference::proposal_v4(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + inputs[2]->get_shape(), + outputs[0]->get_shape(), + outputs[1]->get_shape(), + op.get()->get_attrs()); return true; } diff --git a/src/plugins/template/backend/ops/psroi_pooling.cpp b/src/plugins/template/backend/ops/psroi_pooling.cpp index f048d188b13..c2bf72bcb62 100644 --- a/src/plugins/template/backend/ops/psroi_pooling.cpp +++ b/src/plugins/template/backend/ops/psroi_pooling.cpp @@ -11,16 +11,16 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::psroi_pooling(inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_data_ptr(), - inputs[1]->get_shape(), - outputs[0]->get_data_ptr(), - outputs[0]->get_shape(), - op->get_mode(), - op->get_spatial_scale(), - op->get_spatial_bins_x(), - op->get_spatial_bins_y()); + ov::reference::psroi_pooling(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + outputs[0]->get_data_ptr(), + outputs[0]->get_shape(), + op->get_mode(), + op->get_spatial_scale(), + op->get_spatial_bins_x(), + op->get_spatial_bins_y()); return true; } diff --git a/src/plugins/template/backend/ops/rdft.cpp b/src/plugins/template/backend/ops/rdft.cpp index 590e74e69f6..0f3623876e9 100644 --- a/src/plugins/template/backend/ops/rdft.cpp +++ b/src/plugins/template/backend/ops/rdft.cpp @@ -31,7 +31,7 @@ InfoForRFFT9 get_info_for_rfft9_eval(const std::vector(result.input_data_shape.size()); auto canonicalized_axes = - ngraph::runtime::reference::canonicalize_axes(result.axes_data.data(), result.axes_data_shape, input_rank); + ov::reference::canonicalize_axes(result.axes_data.data(), result.axes_data_shape, input_rank); size_t num_of_axes = result.axes_data.size(); auto signal_size = get_signal_size(inputs, num_of_axes); @@ -66,14 +66,14 @@ bool evaluate(const std::shared_ptr& op, outputs[0]->set_shape(info.output_shape); std::vector rfft_result(ngraph::shape_size(info.output_shape), 0.0f); - ngraph::runtime::reference::rdft(info.input_data, - info.input_data_shape, - info.axes_data, - info.fft_output_shape, - rfft_result.data()); + ov::reference::rdft(info.input_data, + info.input_data_shape, + info.axes_data, + info.fft_output_shape, + rfft_result.data()); const auto output_type = op->get_input_element_type(0); - ngraph::runtime::reference::fft_postprocessing(outputs, output_type, rfft_result); + ov::reference::fft_postprocessing(outputs, output_type, rfft_result); return true; } diff --git a/src/plugins/template/backend/ops/region_yolo.cpp b/src/plugins/template/backend/ops/region_yolo.cpp index 40a802fad04..7d3ae597194 100644 --- a/src/plugins/template/backend/ops/region_yolo.cpp +++ b/src/plugins/template/backend/ops/region_yolo.cpp @@ -11,14 +11,14 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::region_yolo(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - static_cast(op->get_num_coords()), - static_cast(op->get_num_classes()), - static_cast(op->get_num_regions()), - op->get_do_softmax(), - op->get_mask()); + ov::reference::region_yolo(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + static_cast(op->get_num_coords()), + static_cast(op->get_num_classes()), + static_cast(op->get_num_regions()), + op->get_do_softmax(), + op->get_mask()); return true; } diff --git a/src/plugins/template/backend/ops/relu.cpp b/src/plugins/template/backend/ops/relu.cpp index 77a7bcd61df..ce570e1a65c 100644 --- a/src/plugins/template/backend/ops/relu.cpp +++ b/src/plugins/template/backend/ops/relu.cpp @@ -11,9 +11,9 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::relu(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::relu(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); return true; } diff --git a/src/plugins/template/backend/ops/reorg_yolo.cpp b/src/plugins/template/backend/ops/reorg_yolo.cpp index a5a437d588d..05730f4279d 100644 --- a/src/plugins/template/backend/ops/reorg_yolo.cpp +++ b/src/plugins/template/backend/ops/reorg_yolo.cpp @@ -10,11 +10,11 @@ template bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { - ngraph::runtime::reference::reorg_yolo(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - op->get_strides().at(0), - inputs[0]->get_element_type().size()); + ov::reference::reorg_yolo(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + op->get_strides().at(0), + inputs[0]->get_element_type().size()); return true; } diff --git a/src/plugins/template/backend/ops/reverse_sequence.cpp b/src/plugins/template/backend/ops/reverse_sequence.cpp index cf010611836..d00ba0b0fc2 100644 --- a/src/plugins/template/backend/ops/reverse_sequence.cpp +++ b/src/plugins/template/backend/ops/reverse_sequence.cpp @@ -13,12 +13,12 @@ inline void evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& inputs) { using T1 = typename ngraph::element_type_traits::value_type; using T2 = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::reverse_sequence(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - op->get_batch_axis(), - op->get_sequence_axis(), - inputs[1]->get_data_ptr()); + ov::reference::reverse_sequence(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + op->get_batch_axis(), + op->get_sequence_axis(), + inputs[1]->get_data_ptr()); } } // namespace reverse_sequence_v0 diff --git a/src/plugins/template/backend/ops/rnn_cell.cpp b/src/plugins/template/backend/ops/rnn_cell.cpp index f216c15e32b..8b52ff0275e 100644 --- a/src/plugins/template/backend/ops/rnn_cell.cpp +++ b/src/plugins/template/backend/ops/rnn_cell.cpp @@ -11,19 +11,19 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::rnn_cell(inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_data_ptr(), - inputs[1]->get_shape(), - inputs[2]->get_data_ptr(), - inputs[2]->get_shape(), - inputs[3]->get_data_ptr(), - inputs[3]->get_shape(), - inputs[4]->get_data_ptr(), - inputs[4]->get_shape(), - outputs[0]->get_data_ptr(), - op->get_activations().front(), - op->get_clip()); + ov::reference::rnn_cell(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + inputs[2]->get_data_ptr(), + inputs[2]->get_shape(), + inputs[3]->get_data_ptr(), + inputs[3]->get_shape(), + inputs[4]->get_data_ptr(), + inputs[4]->get_shape(), + outputs[0]->get_data_ptr(), + op->get_activations().front(), + op->get_clip()); return true; } diff --git a/src/plugins/template/backend/ops/roi_align.cpp b/src/plugins/template/backend/ops/roi_align.cpp index 09793b3d254..ae1fc3d9b83 100644 --- a/src/plugins/template/backend/ops/roi_align.cpp +++ b/src/plugins/template/backend/ops/roi_align.cpp @@ -26,20 +26,20 @@ bool evaluate(const std::shared_ptr& op, NGRAPH_CHECK(false, "unsupported PoolingMode "); } } - ngraph::runtime::reference::roi_align(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - batch_indices_vec_scaled_up.data(), - outputs[0]->get_data_ptr(), - op->get_input_shape(0), - op->get_input_shape(1), - op->get_input_shape(2), - op->get_output_shape(0), - op->get_pooled_h(), - op->get_pooled_w(), - op->get_sampling_ratio(), - op->get_spatial_scale(), - m_mode_v3, - op->get_aligned_mode()); + ov::reference::roi_align(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + batch_indices_vec_scaled_up.data(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_input_shape(2), + op->get_output_shape(0), + op->get_pooled_h(), + op->get_pooled_w(), + op->get_sampling_ratio(), + op->get_spatial_scale(), + m_mode_v3, + op->get_aligned_mode()); return true; } diff --git a/src/plugins/template/backend/ops/roi_pooling.cpp b/src/plugins/template/backend/ops/roi_pooling.cpp index 5c483dc2069..a10fe0b06ba 100644 --- a/src/plugins/template/backend/ops/roi_pooling.cpp +++ b/src/plugins/template/backend/ops/roi_pooling.cpp @@ -12,14 +12,14 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::roi_pooling(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - outputs[0]->get_data_ptr(), - op->get_input_shape(0), - op->get_input_shape(1), - op->get_output_shape(0), - op->get_spatial_scale(), - op->get_method()); + ov::reference::roi_pooling(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_output_shape(0), + op->get_spatial_scale(), + op->get_method()); return true; } diff --git a/src/plugins/template/backend/ops/roll.cpp b/src/plugins/template/backend/ops/roll.cpp index 8d1755aefa7..69caac63c73 100644 --- a/src/plugins/template/backend/ops/roll.cpp +++ b/src/plugins/template/backend/ops/roll.cpp @@ -34,7 +34,7 @@ bool evaluate(const std::shared_ptr& op, return static_cast(elem); }); } - ngraph::runtime::reference::roll( + ov::reference::roll( inputs[0]->get_data_ptr(), inputs[1]->get_element_type() != ngraph::element::Type_t::i64 ? shift_int64.data() : inputs[1]->get_data_ptr(), diff --git a/src/plugins/template/backend/ops/scatter_nd_update.cpp b/src/plugins/template/backend/ops/scatter_nd_update.cpp index ea347de5d6d..d55cac83087 100644 --- a/src/plugins/template/backend/ops/scatter_nd_update.cpp +++ b/src/plugins/template/backend/ops/scatter_nd_update.cpp @@ -13,21 +13,21 @@ bool evaluate(const std::shared_ptr& op, using T = typename ngraph::element_type_traits::value_type; auto idxType = op->get_input_element_type(1); if (idxType == ngraph::element::i32) { - ngraph::runtime::reference::scatterNdUpdate(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - inputs[2]->get_data_ptr(), - outputs[0]->get_data_ptr(), - op->get_input_shape(0), - op->get_input_shape(1), - op->get_input_shape(2)); + ov::reference::scatterNdUpdate(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_input_shape(2)); } else if (idxType == ngraph::element::i64) { - ngraph::runtime::reference::scatterNdUpdate(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - inputs[2]->get_data_ptr(), - outputs[0]->get_data_ptr(), - op->get_input_shape(0), - op->get_input_shape(1), - op->get_input_shape(2)); + ov::reference::scatterNdUpdate(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_input_shape(2)); } else { OPENVINO_THROW("ScatterNDUpdate layer support only i32 and i64 'indices' input precision!"); } diff --git a/src/plugins/template/backend/ops/selu.cpp b/src/plugins/template/backend/ops/selu.cpp index 888e056f130..0580bd72200 100644 --- a/src/plugins/template/backend/ops/selu.cpp +++ b/src/plugins/template/backend/ops/selu.cpp @@ -11,13 +11,13 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::selu(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - inputs[2]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape()), - ngraph::shape_size(inputs[1]->get_shape()), - ngraph::shape_size(inputs[2]->get_shape())); + ov::reference::selu(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape()), + ngraph::shape_size(inputs[1]->get_shape()), + ngraph::shape_size(inputs[2]->get_shape())); return true; } diff --git a/src/plugins/template/backend/ops/sequences.cpp b/src/plugins/template/backend/ops/sequences.cpp index 5ea629ad250..a8d0ddf49b1 100644 --- a/src/plugins/template/backend/ops/sequences.cpp +++ b/src/plugins/template/backend/ops/sequences.cpp @@ -15,23 +15,23 @@ inline void evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& inputs) { using T1 = typename ngraph::element_type_traits::value_type; using T2 = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::rnn_sequence(inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_data_ptr(), - inputs[1]->get_shape(), - inputs[2]->get_data_ptr(), - inputs[2]->get_shape(), - inputs[3]->get_data_ptr(), - inputs[3]->get_shape(), - inputs[4]->get_data_ptr(), - inputs[4]->get_shape(), - inputs[5]->get_data_ptr(), - inputs[5]->get_shape(), - outputs[0]->get_data_ptr(), - outputs[1]->get_data_ptr(), - op->get_activations()[0], - op->get_clip(), - op->get_direction()); + ov::reference::rnn_sequence(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + inputs[2]->get_data_ptr(), + inputs[2]->get_shape(), + inputs[3]->get_data_ptr(), + inputs[3]->get_shape(), + inputs[4]->get_data_ptr(), + inputs[4]->get_shape(), + inputs[5]->get_data_ptr(), + inputs[5]->get_shape(), + outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + op->get_activations()[0], + op->get_clip(), + op->get_direction()); } } // namespace rnn_seq_v5 @@ -61,32 +61,32 @@ inline void evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& inputs) { using T1 = typename ngraph::element_type_traits::value_type; using T2 = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::lstm_sequence_v1(inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_data_ptr(), - inputs[1]->get_shape(), - inputs[2]->get_data_ptr(), - inputs[2]->get_shape(), - inputs[3]->get_data_ptr(), - inputs[3]->get_shape(), - inputs[4]->get_data_ptr(), - inputs[4]->get_shape(), - inputs[5]->get_data_ptr(), - inputs[5]->get_shape(), - inputs[6]->get_data_ptr(), - inputs[6]->get_shape(), - inputs[7]->get_data_ptr(), - inputs[7]->get_shape(), - outputs[0]->get_data_ptr(), - outputs[1]->get_data_ptr(), - outputs[2]->get_data_ptr(), - op->get_activations()[0], - op->get_activations()[1], - op->get_activations()[2], - op->get_clip_threshold(), - op->get_weights_format(), - op->get_input_forget(), - op->get_direction()); + ov::reference::lstm_sequence_v1(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + inputs[2]->get_data_ptr(), + inputs[2]->get_shape(), + inputs[3]->get_data_ptr(), + inputs[3]->get_shape(), + inputs[4]->get_data_ptr(), + inputs[4]->get_shape(), + inputs[5]->get_data_ptr(), + inputs[5]->get_shape(), + inputs[6]->get_data_ptr(), + inputs[6]->get_shape(), + inputs[7]->get_data_ptr(), + inputs[7]->get_shape(), + outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + outputs[2]->get_data_ptr(), + op->get_activations()[0], + op->get_activations()[1], + op->get_activations()[2], + op->get_clip_threshold(), + op->get_weights_format(), + op->get_input_forget(), + op->get_direction()); } } // namespace lstm_seq_v1 @@ -97,28 +97,28 @@ inline void evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& inputs) { using T1 = typename ngraph::element_type_traits::value_type; using T2 = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::lstm_sequence(inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_data_ptr(), - inputs[1]->get_shape(), - inputs[2]->get_data_ptr(), - inputs[2]->get_shape(), - inputs[3]->get_data_ptr(), - inputs[3]->get_shape(), - inputs[4]->get_data_ptr(), - inputs[4]->get_shape(), - inputs[5]->get_data_ptr(), - inputs[5]->get_shape(), - inputs[6]->get_data_ptr(), - inputs[6]->get_shape(), - outputs[0]->get_data_ptr(), - outputs[1]->get_data_ptr(), - outputs[2]->get_data_ptr(), - op->get_activations()[0], - op->get_activations()[1], - op->get_activations()[2], - op->get_clip(), - op->get_direction()); + ov::reference::lstm_sequence(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + inputs[2]->get_data_ptr(), + inputs[2]->get_shape(), + inputs[3]->get_data_ptr(), + inputs[3]->get_shape(), + inputs[4]->get_data_ptr(), + inputs[4]->get_shape(), + inputs[5]->get_data_ptr(), + inputs[5]->get_shape(), + inputs[6]->get_data_ptr(), + inputs[6]->get_shape(), + outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + outputs[2]->get_data_ptr(), + op->get_activations()[0], + op->get_activations()[1], + op->get_activations()[2], + op->get_clip(), + op->get_direction()); } } // namespace lstm_seq_v5 @@ -167,25 +167,25 @@ inline void evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& inputs) { using T1 = typename ngraph::element_type_traits::value_type; using T2 = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::gru_sequence(inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_data_ptr(), - inputs[1]->get_shape(), - inputs[2]->get_data_ptr(), - inputs[2]->get_shape(), - inputs[3]->get_data_ptr(), - inputs[3]->get_shape(), - inputs[4]->get_data_ptr(), - inputs[4]->get_shape(), - inputs[5]->get_data_ptr(), - inputs[5]->get_shape(), - outputs[0]->get_data_ptr(), - outputs[1]->get_data_ptr(), - op->get_activations()[0], - op->get_activations()[1], - op->get_clip(), - op->get_direction(), - op->get_linear_before_reset()); + ov::reference::gru_sequence(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + inputs[2]->get_data_ptr(), + inputs[2]->get_shape(), + inputs[3]->get_data_ptr(), + inputs[3]->get_shape(), + inputs[4]->get_data_ptr(), + inputs[4]->get_shape(), + inputs[5]->get_data_ptr(), + inputs[5]->get_shape(), + outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + op->get_activations()[0], + op->get_activations()[1], + op->get_clip(), + op->get_direction(), + op->get_linear_before_reset()); } } // namespace gru_seq_v5 @@ -215,26 +215,26 @@ inline void evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& inputs) { using T1 = typename ngraph::element_type_traits::value_type; using T2 = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::gru_sequence(inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_data_ptr(), - inputs[1]->get_shape(), - inputs[2]->get_data_ptr(), - inputs[2]->get_shape(), - inputs[3]->get_data_ptr(), - inputs[3]->get_shape(), - inputs[4]->get_data_ptr(), - inputs[4]->get_shape(), - inputs[5]->get_data_ptr(), - inputs[5]->get_shape(), - outputs[0]->get_data_ptr(), - outputs[1]->get_data_ptr(), - op->get_activations()[0], - op->get_activations()[1], - op->get_clip(), - op->get_direction(), - op->get_linear_before_reset(), - inputs[6]->get_data_ptr()); + ov::reference::gru_sequence(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + inputs[2]->get_data_ptr(), + inputs[2]->get_shape(), + inputs[3]->get_data_ptr(), + inputs[3]->get_shape(), + inputs[4]->get_data_ptr(), + inputs[4]->get_shape(), + inputs[5]->get_data_ptr(), + inputs[5]->get_shape(), + outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + op->get_activations()[0], + op->get_activations()[1], + op->get_clip(), + op->get_direction(), + op->get_linear_before_reset(), + inputs[6]->get_data_ptr()); } } // namespace augru_seq diff --git a/src/plugins/template/backend/ops/sigmoid.cpp b/src/plugins/template/backend/ops/sigmoid.cpp index 3cf5b9482f7..7123ac4cb72 100644 --- a/src/plugins/template/backend/ops/sigmoid.cpp +++ b/src/plugins/template/backend/ops/sigmoid.cpp @@ -11,9 +11,9 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::sigmoid(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::sigmoid(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); return true; } diff --git a/src/plugins/template/backend/ops/sign.cpp b/src/plugins/template/backend/ops/sign.cpp index c8e1d9666ae..663a7a702be 100644 --- a/src/plugins/template/backend/ops/sign.cpp +++ b/src/plugins/template/backend/ops/sign.cpp @@ -11,9 +11,9 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::sign(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::sign(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); return true; } diff --git a/src/plugins/template/backend/ops/softsign.cpp b/src/plugins/template/backend/ops/softsign.cpp index 5febcbf09c2..97885e733ee 100644 --- a/src/plugins/template/backend/ops/softsign.cpp +++ b/src/plugins/template/backend/ops/softsign.cpp @@ -13,24 +13,24 @@ bool evaluate(const std::shared_ptr& op, ngraph::element::Type input_et = op->get_input_element_type(0); switch (input_et) { case ngraph::element::Type_t::f64: - ngraph::runtime::reference::softsign(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::softsign(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); break; case ngraph::element::Type_t::f32: - ngraph::runtime::reference::softsign(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::softsign(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); break; case ngraph::element::Type_t::f16: - ngraph::runtime::reference::softsign(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::softsign(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); break; case ngraph::element::Type_t::bf16: - ngraph::runtime::reference::softsign(inputs[0]->get_data_ptr(), - outputs[0]->get_data_ptr(), - ngraph::shape_size(inputs[0]->get_shape())); + ov::reference::softsign(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + ngraph::shape_size(inputs[0]->get_shape())); break; default: return false; diff --git a/src/plugins/template/backend/ops/squared_difference.cpp b/src/plugins/template/backend/ops/squared_difference.cpp index 2eda9be7d1d..9f8c385e6b6 100644 --- a/src/plugins/template/backend/ops/squared_difference.cpp +++ b/src/plugins/template/backend/ops/squared_difference.cpp @@ -11,12 +11,12 @@ bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { using T = typename ngraph::element_type_traits::value_type; - ngraph::runtime::reference::squared_difference(inputs[0]->get_data_ptr(), - inputs[1]->get_data_ptr(), - outputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - inputs[1]->get_shape(), - op->get_autob()); + ov::reference::squared_difference(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + op->get_autob()); return true; } diff --git a/src/plugins/template/backend/ops/tensor_iterator.cpp b/src/plugins/template/backend/ops/tensor_iterator.cpp index 118804ce8d0..4266186b592 100644 --- a/src/plugins/template/backend/ops/tensor_iterator.cpp +++ b/src/plugins/template/backend/ops/tensor_iterator.cpp @@ -9,9 +9,9 @@ #include "tensor_conversion_util.hpp" namespace ti_v0 { -ngraph::runtime::reference::custom_evaluate_function evaluate = [](const std::shared_ptr& function, - const ngraph::HostTensorVector& inputs, - ngraph::HostTensorVector& outputs) -> void { +ov::reference::custom_evaluate_function evaluate = [](const std::shared_ptr& function, + const ngraph::HostTensorVector& inputs, + ngraph::HostTensorVector& outputs) -> void { const auto& parameters = function->get_parameters(); const auto& parametersNumber = parameters.size(); const auto& inputsNumber = inputs.size(); @@ -46,13 +46,13 @@ template bool evaluate(const std::shared_ptr& op, const ngraph::HostTensorVector& outputs, const ngraph::HostTensorVector& inputs) { - ngraph::runtime::reference::tensor_iterator(op->get_num_iterations(), - op->get_function(), - op->get_output_descriptions(), - op->get_input_descriptions(), - outputs, - inputs, - ti_v0::evaluate); + ov::reference::tensor_iterator(op->get_num_iterations(), + op->get_function(), + op->get_output_descriptions(), + op->get_input_descriptions(), + outputs, + inputs, + ti_v0::evaluate); return true; } diff --git a/src/plugins/template/backend/ops/unique.cpp b/src/plugins/template/backend/ops/unique.cpp index 6732fac4032..da1c0d09e54 100644 --- a/src/plugins/template/backend/ops/unique.cpp +++ b/src/plugins/template/backend/ops/unique.cpp @@ -22,12 +22,12 @@ void execute_unique(const ngraph::HostTensorVector& outputs, }; const auto unique_elements = - ngraph::runtime::reference::find_unique_elements(inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - maybe_extract_axis(), - op->get_sorted()); + ov::reference::find_unique_elements(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + maybe_extract_axis(), + op->get_sorted()); const auto tensor_shapes = - ngraph::runtime::reference::make_tensor_shapes(unique_elements, inputs[0]->get_shape(), maybe_extract_axis()); + ov::reference::make_tensor_shapes(unique_elements, inputs[0]->get_shape(), maybe_extract_axis()); auto& out_unique_elements = outputs[0]; auto& out_indices = outputs[1]; @@ -39,14 +39,14 @@ void execute_unique(const ngraph::HostTensorVector& outputs, out_rev_indices->set_shape(std::get<2>(tensor_shapes)); out_counts->set_shape(std::get<1>(tensor_shapes)); - ngraph::runtime::reference::unique(out_unique_elements->get_data_ptr(), - out_indices->get_data_ptr(), - out_rev_indices->get_data_ptr(), - out_counts->get_data_ptr(), - inputs[0]->get_data_ptr(), - inputs[0]->get_shape(), - std::get<0>(tensor_shapes), - unique_elements); + ov::reference::unique(out_unique_elements->get_data_ptr(), + out_indices->get_data_ptr(), + out_rev_indices->get_data_ptr(), + out_counts->get_data_ptr(), + inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + std::get<0>(tensor_shapes), + unique_elements); } template