Skip to content

Commit

Permalink
update extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
akuporos committed Jan 28, 2025
1 parent c3ceabc commit f051ce1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/articles_en/assets/snippets/ov_custom_op.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2018-2024 Intel Corporation
# Copyright (C) 2018-2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#

Expand Down
7 changes: 6 additions & 1 deletion docs/articles_en/assets/snippets/ov_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
#! [add_extension]

#! [add_frontend_extension]
# Not implemented
# Register more sophisticated mapping with decomposition
def conversion(node):
input_node = node.get_input(0)
return Identity(input_node).outputs()

core.add_extension(ConversionExtension("Identity", conversion))
#! [add_frontend_extension]

from utils import get_path_to_extension_library
Expand Down
4 changes: 0 additions & 4 deletions docs/articles_en/documentation/openvino-extensibility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,6 @@ The ``Identity`` is a custom operation class defined in :doc:`Custom Operation G
:language: cpp
:fragment: [add_frontend_extension]

The Python API now supports implementation of custom OpenVINO operations, enabling direct integration within Python code. Still python custom operations won't be loaded into the runtime, so use the C++ shared library approach to implement both operation semantics and framework mapping that refers to this custom operation.

Python can still be used to map and decompose operations when operations from the standard OpenVINO operation set and custom operation implemented in Python are used.

.. _create_a_library_with_extensions:

Create a Library with Extensions
Expand Down

0 comments on commit f051ce1

Please sign in to comment.