diff --git a/docs/articles_en/documentation/openvino_ir/operation_sets/available_opsets/opset13.md b/docs/articles_en/documentation/openvino_ir/operation_sets/available_opsets/opset13.md index 8f016a0dadd..32c024c3356 100644 --- a/docs/articles_en/documentation/openvino_ir/operation_sets/available_opsets/opset13.md +++ b/docs/articles_en/documentation/openvino_ir/operation_sets/available_opsets/opset13.md @@ -73,6 +73,7 @@ Table of Contents * :doc:`ExperimentalDetectronTopKROIs_6 ` * :doc:`ExtractImagePatches ` * :doc:`Eye ` +* :doc:`FakeConvert ` * :doc:`FakeQuantize ` * :doc:`Floor ` * :doc:`FloorMod ` diff --git a/docs/articles_en/documentation/openvino_ir/operation_sets/operations_specifications.md b/docs/articles_en/documentation/openvino_ir/operation_sets/operations_specifications.md index b26b57022d7..10d97deddd8 100644 --- a/docs/articles_en/documentation/openvino_ir/operation_sets/operations_specifications.md +++ b/docs/articles_en/documentation/openvino_ir/operation_sets/operations_specifications.md @@ -68,6 +68,7 @@ ExperimentalDetectronTopKROIs-6 ExtractImagePatches-3 Eye-9 + FakeConvert-13 FakeQuantize-1 FloorMod-1 Floor-1 diff --git a/docs/articles_en/documentation/openvino_ir/operation_sets/operations_specifications/quantization/FakeConvert_13.md b/docs/articles_en/documentation/openvino_ir/operation_sets/operations_specifications/quantization/FakeConvert_13.md new file mode 100644 index 00000000000..1d060460202 --- /dev/null +++ b/docs/articles_en/documentation/openvino_ir/operation_sets/operations_specifications/quantization/FakeConvert_13.md @@ -0,0 +1,98 @@ +# FakeConvert {#openvino_docs_ops_quantization_FakeConvert_13} + +**Note**: FakeConvert is an experimental operation and subject to change. + +@sphinxdirective + +.. meta:: + :description: Learn about FakeConvert-13 - a quantization operation. + +**Versioned name**: *FakeConvert-13* + +**Category**: *Quantization* + +**Short description**: *FakeConvert* is element-wise quantization of floating-point input values into a set of values corresponding to a target low-precision floating-point type. + +**Detailed description**: *FakeConvert* operation converts the input tensor to a specified target low-precision floating-point type and performs backward conversion to the source precision. It also applies affine transformation defined by ``scale`` and ``shift`` parameters before the conversion step and its reverse form after the backward conversion. + +It emulates types defined by the ``destination_type`` attribute, on the original type of the ``data`` input. + +Possible destination types are: "f8e4m3", "f8e5m2". The "f8e4m3" is an 8-bit floating-point format, where 1 bit for the sign, 4 bits for the exponents and 3 bits for the mantissa. The "f8e5m2" is an 8-bit floating-point format, where 1 bit is for the sign, 5 bits for the exponents and 2 for the mantissa. +The FP8 types were introduced in the following paper: `FP8 Formats for Deep Learning `__ . + +*Fake* in *FakeConvert* means that the output tensor preserve the same element type as an original type of the input tensor, not the ``destination_type``. + +Each element of the output is defined as the result of the following expression: + +.. code-block:: py + :force: + + data = (data + shift) / scale + ConvertLike(Convert(data, destination_type), data) + data = data * scale - shift + + +**Attributes** + +* *destination_type* + + * **Description**: *destination_type* is the emulated type + * **Range of values**: "f8e4m3", "f8e5m2" + * **Type**: `string` + * **Required**: *yes* + + +**Inputs**: + +* **1**: `data` - tensor of type *T_F* and arbitrary shape. **Required.** +* **2**: `scale` - tensor of type *T_F* with a scale factor for the *data* input value. The shape must be numpy-broadcastable to the shape of *data*. **Required.** +* **3**: `shift` - tensor of type *T_F* with value to subtract before and add after conversion of the *data* input value. The shape must be numpy-broadcastable to the shape of *data*, and match the shape of the *scale* input. **Optional.** + + +**Outputs**: + +* **1**: Output tensor of type *T_F* with shape and type matching the 1st input tensor *data*. + +**Types** + +* *T_F*: supported floating-point type (`FP16`, `BF16`, `FP32`). + +**Example** + +.. code-block:: xml + :force: + + + + + + 1 + 64 + 56 + 56 + + + 1 + 64 + 1 + 1 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 56 + 56 + + + + + +@endsphinxdirective