[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 <pawel.raasz@intel.com>
This commit is contained in:
Tomasz JankowskiandRaasz, Pawel authored and GitHub committed 2023-09-04 08:07:06 +04:00
1 parent 92c6316e8e
commit 51df17912b
398 files changed
+2613 -3048

No files matched your search

@@ -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<ov::element::f32>(), size);
ov::reference::count_out_of_f16_range(const_node->get_data_ptr<ov::element::f32>(), 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<ov::float16*>(reinterpret_cast<const ov::float16*>(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) {
@@ -907,7 +907,7 @@ std::shared_ptr<Node> change_constant_precision<ov::element::Type_t::f32, ov::el
if (dst_data == nullptr)
OPENVINO_THROW("Can't get destination data pointer");
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);
return new_constant;
}
@@ -927,7 +927,7 @@ std::shared_ptr<Node> change_constant_precision<ov::element::Type_t::f16, ov::el
if (dst_data == nullptr)
OPENVINO_THROW("Can't get destination data pointer");
ngraph::runtime::reference::convert<src_type, dst_type>(src_data, dst_data, size);
ov::reference::convert<src_type, dst_type>(src_data, dst_data, size);
return new_constant;
}
@@ -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<Node> 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<double> 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;
}