From b71eab255559f3d02f9f1a15d8904fe8de292ec1 Mon Sep 17 00:00:00 2001 From: Katarzyna Mitrus Date: Tue, 21 May 2024 16:20:35 +0200 Subject: [PATCH] [Spec][Internal][Op] Specification for RMS internal op (#24564) ### Details: - Dev documentation for the existing [internal::RMS](https://github.com/openvinotoolkit/openvino/blob/70142121c1c632b6d710026150b0e6deb20b0e68/src/common/transformations/include/ov_ops/rms.hpp) op (specified as is without any additional features, to be developed and updated if needed) - RMS was created initially as a [custom gpu RMS](https://github.com/openvinotoolkit/openvino/blob/9fadb5ac64b76297c46b25983cd3b8fe1d038ff9/src/plugins/intel_gpu/include/intel_gpu/op/rms.hpp) operation, and it's going to be moved to op::internal::RMS to be available for common transformations - Similar approach as it was done for AUGRUCell/AUGRUSeqence, so the place for such documents has been already agreed and it's not a part of the official web docs tree ### Tickets: - 134914, dicsussion 129027 --- .../operation-specs/internal/rms.rts | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/internal/rms.rts diff --git a/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/internal/rms.rts b/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/internal/rms.rts new file mode 100644 index 00000000000..9b445b1f64b --- /dev/null +++ b/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/internal/rms.rts @@ -0,0 +1,84 @@ +.. {#openvino_docs_ops_internal_RMS} + +RMS +=== + + +.. meta:: + :description: Learn about RMS a normalization operation. + +**Versioned name**: *RMS* + +**Category**: *Normalization* + +**Short description**: Calculates Root Mean Square (RMS) normalization of the input tensor. + +**Detailed description** + +*RMS* operation performs Root Mean Square (RMS) normalization on a given input ``data`` along the last dimension of the input. +`Reference `__. + + +.. code-block:: py + + (x / Sqrt(ReduceMean(x^2, -1) + eps)) * scale + + +**Attributes** + +* *epsilon* + + * **Description**: A very small value added to the variance for numerical stability. Ensures that division by zero does not occur for any normalized element. + * **Range of values**: a positive floating-point number + * **Type**: ``float`` + * **Required**: *yes* + +* *output_type* + + * **Description**: The precision for output type conversion, after scaling. It's used for output type compression to f16. + * **Range of values**: Supported floating point type: "f16", "undefined" + * **Type**: ``string`` + * **Default value**: "undefined" (means that output type is set to the same as the input type) + * **Required**: *no* + + +**Inputs** + +* **1**: ``data`` - Input data to be normalized. A tensor of type *T* and arbitrary shape. **Required.** + +* **2**: ``scale`` - A tensor of type *T* containing the scale values for . The shape should be broadcastable to the shape of ``data`` tensor. **Required.** + + +**Outputs** + +* **1**: Output tensor of the same shape as the ``data`` input tensor and type specified by *output_type* attribute. + +**Types** + +* *T*: any floating point type. + +**Example** + +.. code-block:: xml + :force: + + + + + + 12 + 25 + 512 + + + 512 + + + + + 12 + 25 + 512 + + +