Files
openvino/docs/IE_DG/Extensibility_DG/Extension.md
Andrey Zaytsev 7a05a12190 Feature/azaytsev/changes from baychub revise demos samples (#6651)
* Edits to MO

Per findings spreadsheet

* macOS changes

per issue spreadsheet

* Fixes from review spreadsheet

Mostly IE_DG fixes

* Consistency changes

* Make doc fixes from last round of review

* Add GSG build-all details

* Fix links to samples and demos pages

* Make MO_DG v2 changes

* Add image view step to classify demo

* Put MO dependency with others

* Edit docs per issues spreadsheet

* Add file to pytorch_specific

* More fixes per spreadsheet

* Prototype sample page

* Add build section

* Update README.md

* Batch download/convert by default

* Add detail to How It Works

* Minor change

* Temporary restored topics

* corrected layout

* Resized

* Added white background into the picture

* fixed link to omz_tools_downloader

* fixed title in the layout

Co-authored-by: baychub <cbay@yahoo.com>
Co-authored-by: baychub <31420038+baychub@users.noreply.github.com>
2021-07-16 11:41:04 +03:00

1.7 KiB

Extension Library

Inference Engine provides an InferenceEngine::IExtension interface, which defines the interface for Inference Engine Extension libraries. Inherit all extension libraries from this interface. The example below contains an implementation of two operations: Template used as an example in this document and FFT used as a more complex example from the Custom Operations Guide.

Note

: FFT operation is implemented using the OpenCV library functions cv::dft and cv::idft.

Based on that, the declaration of an extension class can look as follows:

@snippet template_extension/extension.hpp extension:header

The extension library should contain and export the InferenceEngine::CreateExtension method, which creates an Extension class:

@snippet template_extension/extension.cpp extension:CreateExtension

Also, an Extension object should implement the following methods:

  • InferenceEngine::IExtension::Release deletes an extension object.

  • InferenceEngine::IExtension::GetVersion returns information about the version of the library.

@snippet template_extension/extension.cpp extension:GetVersion

Implement the InferenceEngine::IExtension::getOpSets method if the extension contains custom layers. Read Custom nGraph Operation for more information.

To understand how to integrate execution kernels to the extension library, read the documentation about development of custom CPU kernels.

To understand how to register custom ONNX operator to the extension library, read the documentation about custom ONNX operators.