Add AlignedBuffer to OpenVINO developer API (#20532)
* Add AlignedBuffer to OpenVINO developer API * Fixed build * Fixed code style and remove opset deprecation * Fixed Windows build * Fixed GNA * Fixed comment
This commit is contained in:
1 parent
84a0994ec5
commit
7ceff55b71
30 files changed
+351
-204
No files matched your search
@@ -51,6 +51,7 @@
|
||||
#include "legacy/ngraph_ops/selu_ie.hpp"
|
||||
#include "legacy/ngraph_ops/tile_ie.hpp"
|
||||
#include "legacy/ngraph_ops/topk_ie.hpp"
|
||||
#include "openvino/runtime/aligned_buffer.hpp"
|
||||
#include "transformations/rt_info/fused_names_attribute.hpp"
|
||||
#include "transformations/rt_info/primitives_priority_attribute.hpp"
|
||||
#include "transformations/utils/utils.hpp"
|
||||
@@ -475,6 +476,11 @@ void CNNLayerCreator::on_adapter(const std::string& name, ::ngraph::ValueAccesso
|
||||
const auto data_beg = static_cast<char*>(a->get()->get_ptr());
|
||||
params[name] = std::string(data_beg, a->get()->size());
|
||||
}
|
||||
} else if (auto a = ::ngraph::as_type<::ngraph::AttributeAdapter<std::shared_ptr<ov::AlignedBuffer>>>(&adapter)) {
|
||||
if (std::string(node->get_type_name()) != "Constant") {
|
||||
const auto data_beg = static_cast<char*>(a->get()->get_ptr());
|
||||
params[name] = std::string(data_beg, a->get()->size());
|
||||
}
|
||||
} else if (const auto& a = ngraph::as_type<ngraph::AttributeAdapter<ngraph::element::TypeVector>>(&adapter)) {
|
||||
const auto& attrs = a->get();
|
||||
params[name] = details::joinVec(attrs);
|
||||
|
||||
Reference in new issue
Block a user