* Changed location of extensibility guide * Removed hardware kernels legacy documentation * Changed all extension guild to new API * Removed Custom_Layers_Guide * Fixed build * Fixed some moments * Update docs/Extensibility_UG/Intro.md * Fixed build * Added more examples * Fixed typo * Fixed comments * Extend library topic * Fixed typo
27 lines
653 B
C++
27 lines
653 B
C++
// Copyright (C) 2018-2021 Intel Corporation
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
#include <openvino/openvino.hpp>
|
|
#include <openvino/core/op_extension.hpp>
|
|
#include <identity.hpp>
|
|
|
|
int main() {
|
|
{
|
|
//! [add_extension]
|
|
ov::Core core;
|
|
// Use operation type to add operation extension
|
|
core.add_extension<TemplateExtension::Identity>();
|
|
// or you can add operation extension to this method
|
|
core.add_extension(ov::OpExtension<TemplateExtension::Identity>());
|
|
//! [add_extension]
|
|
}
|
|
{
|
|
//! [add_extension_lib]
|
|
ov::Core core;
|
|
// Load extensions library to ov::Core
|
|
core.add_extension("openvino_template_extension.so");
|
|
//! [add_extension_lib]
|
|
}
|
|
return 0;
|
|
}
|