OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[CORE][CPU] Add erfinv operation (#34823)
Maksim Kutakovdb2bfdff4303
diff --git a/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/arithmetic/erfinv-17.rst b/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/arithmetic/erfinv-17.rstnew file mode 100644index 00000000000..e1050493cd2--- /dev/null+++ b/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/arithmetic/erfinv-17.rst@@ -0,0 +1,64 @@+ErfInv+======+++.. meta::+ :description: Learn about ErfInv-17 - an element-wise, arithmetic operation, which+ can be performed on a single tensor in OpenVINO.++**Versioned name**: *ErfInv-17*++**Category**: *Arithmetic unary*++**Short description**: *ErfInv* performs element-wise inverse error function (erfinv) on a given input tensor.++**Detailed Description**++*ErfInv* performs element-wise inverse of the Gauss error function on a given input tensor.+For each element ``x`` in the input, the output is the value ``y`` such that ``erf(y) = x``.++.. math::++ erfinv(x) = y \text{ such that } erf(y) = \frac{2}{\sqrt{\pi}} \int_{0}^{y} e^{-t^2} dt = x++The function is defined on the open interval ``(-1, 1)`` with the following special cases:++* ``erfinv(0) = 0``+* ``erfinv(1) = +inf``+* ``erfinv(-1) = -inf``+* ``erfinv(x) = NaN`` for ``|x| > 1``++**Attributes**: *ErfInv* operation has no attributes.++**Inputs**++* **1**: A tensor of type *T* and arbitrary shape. **Required.**++**Outputs**++* **1**: The result of element-wise *ErfInv* function applied to the input tensor. A tensor of type *T* and the same shape as the input tensor.++**Types**++* *T*: any supported floating-point type.++**Example**++.. code-block:: xml+ :force:++ <layer ... type="ErfInv" version="opset17">+ <input>+ <port id="0">+ <dim>256</dim>+ <dim>56</dim>+ </port>+ </input>+ <output>+ <port id="1">+ <dim>256</dim>+ <dim>56</dim>+ </port>+ </output>+ </layer>+diff --git a/src/core/dev_api/openvino/op/ops_decl.hpp b/src/core/dev_api/openvino/op/ops_decl.hppindex 97d9bd26eda..f18794b2340 100644--- a/src/core/dev_api/openvino/op/ops_decl.hpp+++ b/src/core/dev_api/openvino/op/ops_decl.hpp@@ -290,3 +290,7 @@ class Identity;class SegmentMax;class SparseFillEmptyRows;} // namespace ov::op::v16++namespace ov::op::v17 {+class ErfInv;+} // namespace ov::op::v17diff --git a/src/core/include/openvino/op/erfinv.hpp b/src/core/include/openvino/op/erfinv.hppnew file mode 100644index 00000000000..0fa5907142e--- /dev/null+++ b/src/core/include/openvino/op/erfinv.hpp@@ -0,0 +1,28 @@+// Copyright (C) 2018-2026 Intel Corporation+// SPDX-License-Identifier: Apache-2.0+//++#pragma once++#include "openvino/op/util/unary_elementwise_arithmetic.hpp"++namespace ov::op::v17 {+/// \brief Elementwise inverse error function (erfinv) operation.+///+/// \ingroup ov_ops_cpp_api+class OPENVINO_API ErfInv : public util::UnaryElementwiseArithmetic {+public:+ OPENVINO_OP("ErfInv", "opset17", util::UnaryElementwiseArithmetic);++ ErfInv() = default;++ /// \brief Constructs an ErfInv operation.+ ///+ /// \param arg Node that produces the input tensor of floating-point type.+ ErfInv(const Output<Node>& arg);++ void validate_and_infer_types() override;++ std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const override;+};+} // namespace ov::op::v17diff --git a/src/core/include/openvino/op/ops.hpp b/src/core/include/openvino/op/ops.hppindex 542022fa8f9..8d7e94360f7 100644--- a/src/core/include/openvino/op/ops.hpp+++ b/src/core/include/openvino/op/ops.hpp@@ -59,6 +59,7 @@#include "openvino/op/embeddingbag_packedsum.hpp"#include "openvino/op/equal.hpp"#include "openvino/op/erf.hpp"+#include "openvino/op/erfinv.hpp"#include "openvino/op/exp.hpp"#include "openvino/op/experimental_detectron_detection_output.hpp"#include "openvino/op/experimental_detectron_generate_proposals.hpp"diff --git a/src/core/include/openvino/opsets/opset17_tbl.hpp b/src/core/include/openvino/opsets/opset17_tbl.hppindex d3066ba91f5..70470ecf2f7 100644--- a/src/core/include/openvino/opsets/opset17_tbl.hpp+++ b/src/core/include/openvino/opsets/opset17_tbl.hpp@@ -14,3 +14,4 @@ _OPENVINO_OP_REG(Convert, ov::op::v0)_OPENVINO_OP_REG(ShapeOf, ov::op::v3)// New operations added in opset17+_OPENVINO_OP_REG(ErfInv, ov::op::v17)diff --git a/src/core/reference/include/openvino/reference/erfinv.hpp b/src/core/reference/include/openvino/reference/erfinv.hppnew file mode 100644index 00000000000..4845abc1642--- /dev/null+++ b/src/core/reference/include/openvino/reference/erfinv.hpp@@ -0,0 +1,89 @@+// Copyright (C) 2018-2026 Intel Corporation+// SPDX-License-Identifier: Apache-2.0+//++#pragma once++#include <algorithm>+#include <cmath>+#include <cstddef>+#include <limits>++#include "openvino/reference/utils/type_util.hpp"++namespace ov::reference {+namespace func {++// Rational polynomial approximation of erfinv.+// Based on: Mike Giles, "Approximating the erfinv function,"+// GPU Computing Gems Jade Edition, pp 109-116, 2011.+// https://people.maths.ox.ac.uk/gilesm/files/gems_erfinv.pdf+//+// Handles special values:+// erfinv(0) = 0+// erfinv(1) = +inf+// erfinv(-1) = -inf+// erfinv(|x|>1) = NaN+template <class T, typename std::enable_if<ov::is_floating_point<T>()>::type* = nullptr>+T erfinv(const T val) {+ using F = double;+ const F x = static_cast<F>(val);++ if (x == F{0})+ return T{0};+ if (x >= F{1})+ return x > F{1} ? T{std::numeric_limits<float>::quiet_NaN()} : T{std::numeric_limits<float>::infinity()};+ if (x <= F{-1})+ return x < F{-1} ? T{std::numeric_limits<float>::quiet_NaN()} : T{-std::numeric_limits<float>::infinity()};++ // w = -log((1-x)*(1+x))+ const F w = -std::log((F{1} - x) * (F{1} + x));+ F r;+ if (w < 5.0) {+ const F s = w - F{2.5};+ r = 2.81022636e-08;+ r = 3.43273939e-07 + r * s;+ r = -3.5233877e-06 + r * s;+ r = -4.39150654e-06 + r * s;+ r = 0.00021858087 + r * s;+ r = -0.00125372503 + r * s;+ r = -0.00417768164 + r * s;+ r = 0.246640727 + r * s;+ r = 1.50140941 + r * s;+ } else {+ const F s = std::sqrt(w) - F{3.0};+ r = -0.000200214257;+ r = 0.000100950558 + r * s;+ r = 0.00134934322 + r * s;+ r = -0.00367342844 + r * s;+ r = 0.00573950773 + r * s;+ r = -0.0076224613 + r * s;+ r = -0.00943887047 + r * s;+ r = 1.00167406 + r * s;+ r = 2.83297682 + r * s;+ }+ return static_cast<T>(r * x);+}++} // namespace func++/**+ * @brief Reference implementation of ErfInv operator.+ *+ * Computes the inverse error function element-wise:+ * y = erfinv(x) such that erf(y) = x, for x in (-1, 1).+ * Special values:+ * erfinv(0) = 0+ * erfinv(1) = +inf+ * erfinv(-1) = -inf+ * erfinv(|x|>1) = NaN+ *+ * @param arg Pointer to input data.+ * @param out Pointer to output data.+ * @param count Number of elements in input buffer.+ */+template <class T>+void erfinv(const T* arg, T* out, const size_t count) {+ std::transform(arg, arg + count, out, func::erfinv<T>);+}+} // namespace ov::referencediff --git a/src/core/src/op/erfinv.cpp b/src/core/src/op/erfinv.cppnew file mode 100644index 00000000000..8748d0114cc--- /dev/null+++ b/src/core/src/op/erfinv.cpp@@ -0,0 +1,33 @@+// Copyright (C) 2018-2026 Intel Corporation+// SPDX-License-Identifier: Apache-2.0+//++#include "openvino/op/erfinv.hpp"++#include "itt.hpp"++namespace ov::op::v17 {++ErfInv::ErfInv(const Output<Node>& arg) : UnaryElementwiseArithmetic(arg) {+ constructor_validate_and_infer_types();+}++void ErfInv::validate_and_infer_types() {+ OV_OP_SCOPE(v17_ErfInv_validate_and_infer_types);+ const auto& input_et = get_input_element_type(0);++ NODE_VALIDATION_CHECK(this,+ input_et.is_dynamic() || input_et.is_real(),+ "Input element type must be floating-point, instead got: ",+ input_et);++ UnaryElementwiseArithmetic::validate_and_infer_types();+}++std::shared_ptr<Node> ErfInv::clone_with_new_inputs(const OutputVector& new_args) const {+ OV_OP_SCOPE(v17_ErfInv_clone_with_new_inputs);+ check_new_args_count(this, new_args);+ return std::make_shared<ErfInv>(new_args.at(0));+}++} // namespace ov::op::v17diff --git a/src/core/tests/opset.cpp b/src/core/tests/opset.cppindex 0026844cef8..105cfac0505 100644--- a/src/core/tests/opset.cpp+++ b/src/core/tests/opset.cpp@@ -79,7 +79,7 @@ INSTANTIATE_TEST_SUITE_P(opset,OpsetTestParams{ov::get_opset14, 188},OpsetTestParams{ov::get_opset15, 199},OpsetTestParams{ov::get_opset16, 203},- OpsetTestParams{ov::get_opset17, 3}),+ OpsetTestParams{ov::get_opset17, 4}),OpsetTestNameGenerator{});class MyOpOld : public ov::op::Op {diff --git a/src/core/tests/type_prop/erfinv.cpp b/src/core/tests/type_prop/erfinv.cppnew file mode 100644index 00000000000..4cbc8920a07--- /dev/null+++ b/src/core/tests/type_prop/erfinv.cpp@@ -0,0 +1,91 @@+// Copyright (C) 2018-2026 Intel Corporation+// SPDX-License-Identifier: Apache-2.0+//++#include "openvino/op/erfinv.hpp"++#include "common_test_utils/test_assertions.hpp"+#include "common_test_utils/type_prop.hpp"+#include "gtest/gtest.h"++TEST(type_prop, erfinv_incorrect_type_int) {+ const auto input_type = ov::element::i32;+ const auto input_shape = ov::Shape{1, 3, 6};+ auto data = std::make_shared<ov::op::v0::Parameter>(input_type, input_shape);+ OV_EXPECT_THROW_HAS_SUBSTRING(std::ignore = std::make_shared<ov::op::v17::ErfInv>(data),+ ov::NodeValidationFailure,+ "Input element type must be floating-point, instead got");+}++TEST(type_prop, erfinv_f32) {+ const auto input_type = ov::element::f32;+ const auto input_shape = ov::Shape{1, 3, 6};+ auto data = std::make_shared<ov::op::v0::Parameter>(input_type, input_shape);+ auto erfinv_op = std::make_shared<ov::op::v17::ErfInv>(data);+ EXPECT_EQ(erfinv_op->get_element_type(), input_type);+ EXPECT_EQ(erfinv_op->get_shape(), input_shape);+}++TEST(type_prop, erfinv_f16) {+ const auto input_type = ov::element::f16;+ const auto input_shape = ov::Shape{2, 4};+ auto data = std::make_shared<ov::op::v0::Parameter>(input_type, input_shape);+ auto erfinv_op = std::make_shared<ov::op::v17::ErfInv>(data);+ EXPECT_EQ(erfinv_op->get_element_type(), input_type);+ EXPECT_EQ(erfinv_op->get_shape(), input_shape);+}++TEST(type_prop, erfinv_bf16) {+ const auto input_type = ov::element::bf16;+ const auto input_shape = ov::Shape{1};+ auto data = std::make_shared<ov::op::v0::Parameter>(input_type, input_shape);+ auto erfinv_op = std::make_shared<ov::op::v17::ErfInv>(data);+ EXPECT_EQ(erfinv_op->get_element_type(), input_type);+}++TEST(type_prop, erfinv_f64_scalar) {+ auto data = std::make_shared<ov::op::v0::Parameter>(ov::element::f64, ov::Shape{});+ auto erfinv_op = std::make_shared<ov::op::v17::ErfInv>(data);+ EXPECT_EQ(erfinv_op->get_element_type(), ov::element::f64);+ EXPECT_EQ(erfinv_op->get_shape(), ov::Shape{});+}++// One dynamic dimension, static rank — output shape must match input.+TEST(type_prop, erfinv_dynamic_dim) {+ const auto input_shape = ov::PartialShape{1, ov::Dimension::dynamic(), 6};+ auto data = std::make_shared<ov::op::v0::Parameter>(ov::element::f32, input_shape);+ auto erfinv_op = std::make_shared<ov::op::v17::ErfInv>(data);+ EXPECT_EQ(erfinv_op->get_element_type(), ov::element::f32);+ EXPECT_TRUE(erfinv_op->get_output_partial_shape(0).same_scheme(input_shape));+ EXPECT_TRUE(erfinv_op->get_output_partial_shape(0).rank().is_static());+}++// Interval-bounded dimensions — bounds must be preserved in the output.+TEST(type_prop, erfinv_interval_dims) {+ const auto input_shape = ov::PartialShape{ov::Dimension(2, 5), ov::Dimension(1, 4), 3};+ auto data = std::make_shared<ov::op::v0::Parameter>(ov::element::f32, input_shape);+ auto erfinv_op = std::make_shared<ov::op::v17::ErfInv>(data);+ EXPECT_EQ(erfinv_op->get_element_type(), ov::element::f32);+ EXPECT_TRUE(erfinv_op->get_output_partial_shape(0).same_scheme(input_shape));+}++// Fully-dynamic rank — output must also be rank-dynamic.+TEST(type_prop, erfinv_dynamic_rank) {+ auto data = std::make_shared<ov::op::v0::Parameter>(ov::element::f32, ov::PartialShape::dynamic());+ auto erfinv_op = std::make_shared<ov::op::v17::ErfInv>(data);+ EXPECT_EQ(erfinv_op->get_element_type(), ov::element::f32);+ EXPECT_TRUE(erfinv_op->get_output_partial_shape(0).same_scheme(ov::PartialShape::dynamic()));+}++// Dimension symbols must propagate unchanged through erfinv.+TEST(type_prop, erfinv_symbol_propagation) {+ auto labeled_shape = ov::PartialShape{ov::Dimension::dynamic(), 4};+ auto symbols = set_shape_symbols(labeled_shape);++ auto data = std::make_shared<ov::op::v0::Parameter>(ov::element::f32, labeled_shape);+ auto erfinv_op = std::make_shared<ov::op::v17::ErfInv>(data);++ const auto& out_shape = erfinv_op->get_output_partial_shape(0);+ EXPECT_EQ(out_shape.rank().get_length(), 2);+ EXPECT_EQ(get_shape_symbols(out_shape), symbols);+}diff --git a/src/core/tests/visitors/op/erfinv.cpp b/src/core/tests/visitors/op/erfinv.cppnew file mode 100644index 00000000000..6264305aa94--- /dev/null+++ b/src/core/tests/visitors/op/erfinv.cpp@@ -0,0 +1,11 @@+// Copyright (C) 2018-2026 Intel Corporation+// SPDX-License-Identifier: Apache-2.0+//++#include "openvino/op/erfinv.hpp"++#include "unary_ops.hpp"++using Types = ::testing::Types<UnaryOperatorType<ov::op::v17::ErfInv, ov::element::f32>>;++INSTANTIATE_TYPED_TEST_SUITE_P(visitor_without_attribute, UnaryOperatorVisitor, Types, UnaryOperatorTypeName);diff --git a/src/plugins/intel_cpu/src/cpu_types.cpp b/src/plugins/intel_cpu/src/cpu_types.cppindex 4f00c2403d6..26a517dc2d9 100644--- a/src/plugins/intel_cpu/src/cpu_types.cpp+++ b/src/plugins/intel_cpu/src/cpu_types.cpp@@ -87,6 +87,7 @@ static const TypeToNameMap& get_type_to_name_tbl() {{"Erf", Type::Eltwise},{"SoftPlus", Type::Eltwise},{"SoftSign", Type::Eltwise},+ {"ErfInv", Type::Eltwise},{"SegmentMax", Type::SegmentMax},{"Select", Type::Eltwise},{"Log", Type::Eltwise},@@ -469,6 +470,7 @@ std::string algToString(const Algorithm alg) {CASE(EltwiseRoundHalfAwayFromZero);CASE(EltwiseErf);CASE(EltwiseSoftSign);+ CASE(EltwiseErfInv);CASE(EltwiseLog);CASE(EltwiseBitwiseAnd);CASE(EltwiseBitwiseNot);diff --git a/src/plugins/intel_cpu/src/cpu_types.h b/src/plugins/intel_cpu/src/cpu_types.hindex da43a158ee6..379e1f9df4e 100644--- a/src/plugins/intel_cpu/src/cpu_types.h+++ b/src/plugins/intel_cpu/src/cpu_types.h@@ -211,6 +211,7 @@ enum class Algorithm : uint8_t {EltwiseRoundHalfAwayFromZero,EltwiseErf,EltwiseSoftSign,+ EltwiseErfInv,EltwiseLog,EltwiseBitwiseAnd,EltwiseBitwiseNot,diff --git a/src/plugins/intel_cpu/src/emitters/plugin/aarch64/jit_eltwise_emitters.cpp b/src/plugins/intel_cpu/src/emitters/plugin/aarch64/jit_eltwise_emitters.cppindex 07a510e6161..302eee748f2 100644--- a/src/plugins/intel_cpu/src/emitters/plugin/aarch64/jit_eltwise_emitters.cpp+++ b/src/plugins/intel_cpu/src/emitters/plugin/aarch64/jit_eltwise_emitters.cpp@@ -3177,6 +3177,258 @@ std::set<std::vector<element::Type>> jit_soft_sign_emitter::get_supported_precisreturn {{element::f32}};}+/// ERFINV ///+jit_erfinv_emitter::jit_erfinv_emitter(dnnl::impl::cpu::aarch64::jit_generator_t* host,+ dnnl::impl::cpu::aarch64::cpu_isa_t host_isa,+ ov::element::Type exec_prc)+ : jit_emitter(host, host_isa, exec_prc) {+ prepare_table();+}++jit_erfinv_emitter::jit_erfinv_emitter(dnnl::impl::cpu::aarch64::jit_generator_t* host,+ dnnl::impl::cpu::aarch64::cpu_isa_t host_isa,+ [[maybe_unused]] const std::shared_ptr<ov::Node>& node)+ : jit_emitter(host, host_isa, ov::element::f32) {+ prepare_table();+}++size_t jit_erfinv_emitter::get_inputs_count() const {+ return 1;+}++size_t jit_erfinv_emitter::get_aux_vecs_count() const {+ return 6;+}++size_t jit_erfinv_emitter::get_aux_gprs_count() const {+ return 1;+}++std::set<std::vector<element::Type>> jit_erfinv_emitter::get_supported_precisions(+ [[maybe_unused]] const std::shared_ptr<ov::Node>& node) {+ return {{element::f32}};+}++void jit_erfinv_emitter::emit_impl(const std::vector<size_t>& in_vec_idxs,+ const std::vector<size_t>& out_vec_idxs) const {+ if (host_isa_ == dnnl::impl::cpu::aarch64::asimd) {+ emit_isa<dnnl::impl::cpu::aarch64::asimd>(in_vec_idxs, out_vec_idxs);+ } else {+ OPENVINO_THROW("Can't create jit eltwise kernel for erfinv");+ }+}++template <dnnl::impl::cpu::aarch64::cpu_isa_t isa>+void jit_erfinv_emitter::emit_isa(const std::vector<size_t>& in_vec_idxs,+ const std::vector<size_t>& out_vec_idxs) const {+ OV_CPU_JIT_EMITTER_ASSERT(exec_prc_ == ov::element::f32, "unsupported precision: " + exec_prc_.to_string());+ using TReg = typename dnnl::impl::cpu::aarch64::cpu_isa_traits<isa>::TReg;+ const TReg vmm_src(in_vec_idxs[0]);+ const TReg vmm_dst(out_vec_idxs[0]);+ // Register assignments:+ // aux0 = saved x (live until final multiply)+ // aux1 = v bits (copy for exponent extraction) → e+1 int/float → log(v) → w+ // aux2 = v bits (for mantissa extraction) → h_log → r1 → r2+ // aux3 = log/branch1 poly accumulator → poly1+ // aux4 = coeff temp / branch2 acc → poly2+ // aux5 = branch2 running result temp+ const TReg aux0(aux_vec_idxs[0]);+ const TReg aux1(aux_vec_idxs[1]);+ const TReg aux2(aux_vec_idxs[2]);+ const TReg aux3(aux_vec_idxs[3]);+ const TReg aux4(aux_vec_idxs[4]);+ const TReg aux5(aux_vec_idxs[5]);++ // Save x for final sign-carry multiply+ h->mov(aux0.b16, vmm_src.b16);++ // v = 1 - x²: compute in aux2 (bit pattern preserved for mantissa extraction)+ h->fmul(aux2.s, vmm_src.s, vmm_src.s); // x²+ h->fneg(aux2.s, aux2.s); // -x²+ h->ld1r(aux4.s, table_val2("one"));+ h->fadd(aux2.s, aux2.s, aux4.s); // v = 1 - x²++ // Copy v to aux1 for exponent extraction (aux2 keeps v bits for mantissa)+ h->mov(aux1.b16, aux2.b16);++ // Extract integer biased exponent k = v_bits >> 23, convert to float, subtract 126.0f+ h->ushr(aux1.s, aux1.s, 23); // k (int32)+ h->scvtf(aux1.s, aux1.s); // k as float+ h->ld1r(aux4.s, table_val2("float126"));+ h->fsub(aux1.s, aux1.s, aux4.s); // (e+1) as float++ // Extract mantissa from aux2 (v bits) and compute h = f/2 - 1+ h->ld1r(aux4.s, table_val2("mantissa_mask"));+ h->and_(aux2.b16, aux2.b16, aux4.b16); // mantissa bits+ h->ld1r(aux4.s, table_val2("one"));+ h->orr(aux2.b16, aux2.b16, aux4.b16); // f = 1.mantissa ∈ [1, 2)+ h->ld1r(aux4.s, table_val2("half"));+ h->fmul(aux2.s, aux2.s, aux4.s); // f/2 ∈ [0.5, 1)+ h->ld1r(aux4.s, table_val2("one"));+ h->fsub(aux2.s, aux2.s, aux4.s); // h = f/2 - 1 ∈ [-0.5, 0)++ // Log polynomial Horner: log(1+h) = h*(1+h*(p0+h*(p1+...h*p6)))+ // Pattern: init aux3 with highest coeff, then for each lower coeff:+ // load coeff into aux4, fmla(aux4, aux3, h) = aux4 += aux3*h, mov aux3=aux4+ h->ld1r(aux3.s, table_val2("log_pol6"));+ h->ld1r(aux4.s, table_val2("log_pol5"));+ h->fmla(aux4.s, aux3.s, aux2.s); // aux4 = p5 + p6*h+ h->mov(aux3.b16, aux4.b16);+ h->ld1r(aux4.s, table_val2("log_pol4"));+ h->fmla(aux4.s, aux3.s, aux2.s);+ h->mov(aux3.b16, aux4.b16);+ h->ld1r(aux4.s, table_val2("log_pol3"));+ h->fmla(aux4.s, aux3.s, aux2.s);+ h->mov(aux3.b16, aux4.b16);+ h->ld1r(aux4.s, table_val2("log_pol2"));+ h->fmla(aux4.s, aux3.s, aux2.s);+ h->mov(aux3.b16, aux4.b16);+ h->ld1r(aux4.s, table_val2("log_pol1"));+ h->fmla(aux4.s, aux3.s, aux2.s);+ h->mov(aux3.b16, aux4.b16);+ h->ld1r(aux4.s, table_val2("log_pol0"));+ h->fmla(aux4.s, aux3.s, aux2.s);+ h->mov(aux3.b16, aux4.b16);+ h->ld1r(aux4.s, table_val2("one")); // constant 1.0 factor+ h->fmla(aux4.s, aux3.s, aux2.s);+ h->mov(aux3.b16, aux4.b16);+ h->fmul(aux3.s, aux2.s, aux3.s); // log(1+h) = h * poly; aux2 freed++ // Combine: log(v) = (e+1)*ln2 + log(y); then w = -log(v)+ h->ld1r(aux4.s, table_val2("ln2"));+ h->fmla(aux3.s, aux1.s, aux4.s); // aux3 += (e+1)*ln2 = log(v); aux4 freed+ h->fneg(aux1.s, aux3.s); // aux1 = w = -log(v); aux3 freed++ // Branch 1: poly1 = Giles poly(r1), r1 = w - 2.5+ h->ld1r(aux4.s, table_val2("two_point_five"));+ h->fsub(aux2.s, aux1.s, aux4.s); // r2 = w - 2.5 in aux2+ h->ld1r(aux3.s, table_val2("e1_c8"));+ h->ld1r(aux4.s, table_val2("e1_c7"));+ h->fmla(aux4.s, aux3.s, aux2.s);+ h->mov(aux3.b16, aux4.b16);+ h->ld1r(aux4.s, table_val2("e1_c6"));+ h->fmla(aux4.s, aux3.s, aux2.s);+ h->mov(aux3.b16, aux4.b16);+ h->ld1r(aux4.s, table_val2("e1_c5"));+ h->fmla(aux4.s, aux3.s, aux2.s);+ h->mov(aux3.b16, aux4.b16);+ h->ld1r(aux4.s, table_val2("e1_c4"));+ h->fmla(aux4.s, aux3.s, aux2.s);+ h->mov(aux3.b16, aux4.b16);+ h->ld1r(aux4.s, table_val2("e1_c3"));+ h->fmla(aux4.s, aux3.s, aux2.s);+ h->mov(aux3.b16, aux4.b16);+ h->ld1r(aux4.s, table_val2("e1_c2"));+ h->fmla(aux4.s, aux3.s, aux2.s);+ h->mov(aux3.b16, aux4.b16);+ h->ld1r(aux4.s, table_val2("e1_c1"));+ h->fmla(aux4.s, aux3.s, aux2.s);+ h->mov(aux3.b16, aux4.b16);+ h->ld1r(aux4.s, table_val2("e1_c0"));+ h->fmla(aux4.s, aux3.s, aux2.s);+ h->mov(aux3.b16, aux4.b16); // aux3 = poly1; aux2(r1) freed++ // Branch 2: poly2 = Giles poly(r2), r2 = sqrt(w) - 3.0+ h->fsqrt(aux2.s, aux1.s); // sqrt(w)+ h->ld1r(aux4.s, table_val2("three"));+ h->fsub(aux2.s, aux2.s, aux4.s); // r2 = sqrt(w) - 3.0+ h->ld1r(aux4.s, table_val2("e2_c8"));+ h->ld1r(aux5.s, table_val2("e2_c7"));+ h->fmla(aux5.s, aux4.s, aux2.s);+ h->mov(aux4.b16, aux5.b16);+ h->ld1r(aux5.s, table_val2("e2_c6"));+ h->fmla(aux5.s, aux4.s, aux2.s);+ h->mov(aux4.b16, aux5.b16);+ h->ld1r(aux5.s, table_val2("e2_c5"));+ h->fmla(aux5.s, aux4.s, aux2.s);+ h->mov(aux4.b16, aux5.b16);+ h->ld1r(aux5.s, table_val2("e2_c4"));+ h->fmla(aux5.s, aux4.s, aux2.s);+ h->mov(aux4.b16, aux5.b16);+ h->ld1r(aux5.s, table_val2("e2_c3"));+ h->fmla(aux5.s, aux4.s, aux2.s);+ h->mov(aux4.b16, aux5.b16);+ h->ld1r(aux5.s, table_val2("e2_c2"));+ h->fmla(aux5.s, aux4.s, aux2.s);+ h->mov(aux4.b16, aux5.b16);+ h->ld1r(aux5.s, table_val2("e2_c1"));+ h->fmla(aux5.s, aux4.s, aux2.s);+ h->mov(aux4.b16, aux5.b16);+ h->ld1r(aux5.s, table_val2("e2_c0"));+ h->fmla(aux5.s, aux4.s, aux2.s);+ h->mov(aux4.b16, aux5.b16); // aux4 = poly2; aux2(r2), aux5 freed++ // Blend: select poly1 (aux3) where w<5, poly2 (aux4) otherwise; mask in aux2+ h->ld1r(aux2.s, table_val2("five"));+ h->fcmgt(aux2.s, aux2.s, aux1.s); // aux2 = (5.0 > w) = (w < 5.0)+ h->bsl(aux2.b16, aux3.b16, aux4.b16); // aux2 = mask ? poly1 : poly2+ h->fmul(vmm_dst.s, aux2.s, aux0.s); // dst = blend * x++ // Special-case handling: |x| >= 1 → ±inf; |x| > 1 → NaN+ // Reuse aux1..aux5 (all free); aux0 holds saved x.+ // abs_x = |x|+ h->ld1r(aux3.s, table_val2("abs_mask"));+ h->and_(aux1.b16, aux0.b16, aux3.b16); // aux1 = abs_x++ // inf_signed = copysign(+inf, x) = (x & sign_mask) | pos_inf+ h->ld1r(aux3.s, table_val2("sign_mask"));+ h->and_(aux2.b16, aux0.b16, aux3.b16); // sign bit+ h->ld1r(aux3.s, table_val2("pos_inf"));+ h->orr(aux2.b16, aux2.b16, aux3.b16); // aux2 = ±inf++ // ge1_mask = (abs_x >= 1.0): fcmge sets all-1s where abs_x >= 1+ h->ld1r(aux3.s, table_val2("one"));+ h->fcmge(aux4.s, aux1.s, aux3.s); // aux4 = (abs_x >= 1.0) mask+ h->bsl(aux4.b16, aux2.b16, vmm_dst.b16); // aux4 = (ge1) ? ±inf : dst+ h->mov(vmm_dst.b16, aux4.b16);++ // gt1_mask = (abs_x > 1.0): fcmgt+ h->fcmgt(aux4.s, aux1.s, aux3.s); // aux4 = (abs_x > 1.0) mask+ h->ld1r(aux3.s, table_val2("qnan"));+ h->bsl(aux4.b16, aux3.b16, vmm_dst.b16); // aux4 = (gt1) ? NaN : dst+ h->mov(vmm_dst.b16, aux4.b16);+}++void jit_erfinv_emitter::register_table_entries() {+ push_arg_entry_of("one", 0x3f800000, true);+ push_arg_entry_of("half", 0x3f000000, true);+ push_arg_entry_of("sign_mask", 0x80000000, true);+ push_arg_entry_of("abs_mask", 0x7fffffff, true);+ push_arg_entry_of("pos_inf", 0x7f800000, true);+ push_arg_entry_of("qnan", 0x7fc00000, true);+ push_arg_entry_of("mantissa_mask", 0x007fffff, true);+ push_arg_entry_of("float126", 0x42fc0000, true); // 126.0f+ push_arg_entry_of("ln2", 0x3f317218, true);+ push_arg_entry_of("two_point_five", 0x40200000, true);+ push_arg_entry_of("three", 0x40400000, true);+ push_arg_entry_of("five", 0x40a00000, true);+ push_arg_entry_of("log_pol0", 0xbf000000, true);+ push_arg_entry_of("log_pol1", 0x3eaaaa9f, true);+ push_arg_entry_of("log_pol2", 0xbe800000, true);+ push_arg_entry_of("log_pol3", 0x3e4ccccd, true);+ push_arg_entry_of("log_pol4", 0xbe2aaac1, true);+ push_arg_entry_of("log_pol5", 0x3e12491b, true);+ push_arg_entry_of("log_pol6", 0xbe000000, true);+ push_arg_entry_of("e1_c8", 0x32f16588, true);+ push_arg_entry_of("e1_c7", 0x34b84b36, true);+ push_arg_entry_of("e1_c6", 0xb66c7357, true);+ push_arg_entry_of("e1_c5", 0xb6935ac1, true);+ push_arg_entry_of("e1_c4", 0x396532db, true);+ push_arg_entry_of("e1_c3", 0xbaa45408, true);+ push_arg_entry_of("e1_c2", 0xbb88e4ef, true);+ push_arg_entry_of("e1_c1", 0x3e7c8f63, true);+ push_arg_entry_of("e1_c0", 0x3fc02e2f, true);+ push_arg_entry_of("e2_c8", 0xb951f09b, true);+ push_arg_entry_of("e2_c7", 0x38d3b56b, true);+ push_arg_entry_of("e2_c6", 0x3ab0dc72, true);+ push_arg_entry_of("e2_c5", 0xbb70bde7, true);+ push_arg_entry_of("e2_c4", 0x3bbc127b, true);+ push_arg_entry_of("e2_c3", 0xbbf9c5d7, true);+ push_arg_entry_of("e2_c2", 0xbc1aa57e, true);+ push_arg_entry_of("e2_c1", 0x3f8036db, true);+ push_arg_entry_of("e2_c0", 0x40354f7e, true);+}+/// SQUARE_ROOT ///jit_sqrt_emitter::jit_sqrt_emitter(dnnl::impl::cpu::aarch64::jit_generator_t* host,dnnl::impl::cpu::aarch64::cpu_isa_t host_isa,diff --git a/src/plugins/intel_cpu/src/emitters/plugin/aarch64/jit_eltwise_emitters.hpp b/src/plugins/intel_cpu/src/emitters/plugin/aarch64/jit_eltwise_emitters.hppindex 4eeca00ca0f..d5b5b0c673b 100644--- a/src/plugins/intel_cpu/src/emitters/plugin/aarch64/jit_eltwise_emitters.hpp+++ b/src/plugins/intel_cpu/src/emitters/plugin/aarch64/jit_eltwise_emitters.hpp@@ -1218,6 +1218,32 @@ private:void emit_isa(const std::vector<size_t>& in_vec_idxs, const std::vector<size_t>& out_vec_idxs) const;};+class jit_erfinv_emitter : public jit_emitter {+public:+ jit_erfinv_emitter(dnnl::impl::cpu::aarch64::jit_generator_t* host,+ dnnl::impl::cpu::aarch64::cpu_isa_t host_isa,+ ov::element::Type exec_prc = ov::element::f32);++ jit_erfinv_emitter(dnnl::impl::cpu::aarch64::jit_generator_t* host,+ dnnl::impl::cpu::aarch64::cpu_isa_t host_isa,+ const std::shared_ptr<ov::Node>& node);++ size_t get_inputs_count() const override;+ size_t get_aux_vecs_count() const override;+ size_t get_aux_gprs_count() const override;++ void register_table_entries() override;++ static std::set<std::vector<element::Type>> get_supported_precisions(+ const std::shared_ptr<ov::Node>& node = nullptr);++private:+ void emit_impl(const std::vector<size_t>& in_vec_idxs, const std::vector<size_t>& out_vec_idxs) const override;++ template <dnnl::impl::cpu::aarch64::cpu_isa_t isa>+ void emit_isa(const std::vector<size_t>& in_vec_idxs, const std::vector<size_t>& out_vec_idxs) const;+};+class jit_sqrt_emitter : public jit_emitter {public:jit_sqrt_emitter(dnnl::impl::cpu::aarch64::jit_generator_t* host,diff --git a/src/plugins/intel_cpu/src/emitters/plugin/riscv64/jit_eltwise_emitters.cpp b/src/plugins/intel_cpu/src/emitters/plugin/riscv64/jit_eltwise_emitters.cppindex aa3586af5ed..bd349499acf 100644--- a/src/plugins/intel_cpu/src/emitters/plugin/riscv64/jit_eltwise_emitters.cpp+++ b/src/plugins/intel_cpu/src/emitters/plugin/riscv64/jit_eltwise_emitters.cpp@@ -1442,6 +1442,236 @@ void jit_softsign_emitter::register_table_entries() {push_arg_entry_of("one", CONST_1_F);}+/// ErfInv ///+jit_erfinv_emitter::jit_erfinv_emitter(ov::intel_cpu::riscv64::jit_generator_t* host,+ ov::intel_cpu::riscv64::cpu_isa_t host_isa,+ ov::element::Type exec_prc)+ : jit_emitter(host, host_isa, exec_prc) {+ prepare_table();+}++jit_erfinv_emitter::jit_erfinv_emitter(ov::intel_cpu::riscv64::jit_generator_t* host,+ ov::intel_cpu::riscv64::cpu_isa_t host_isa,+ [[maybe_unused]] const std::shared_ptr<ov::Node>& node,+ ov::element::Type exec_prc)+ : jit_emitter(host, host_isa, exec_prc) {+ prepare_table();+}++size_t jit_erfinv_emitter::get_inputs_num() const {+ return 1;+}++size_t jit_erfinv_emitter::aux_vecs_count() const {+ return 6;+}++size_t jit_erfinv_emitter::aux_gprs_count() const {+ // 1 GPR for integer vector ops (vsub_vx, vand_vx, vor_vx) + 1 for p_table+ return 2;+}++size_t jit_erfinv_emitter::aux_fp_gprs_count() const {+ return 1;+}++std::set<std::vector<element::Type>> jit_erfinv_emitter::get_supported_precisions(+ [[maybe_unused]] const std::shared_ptr<ov::Node>& node) {+ return {{element::f32}};+}++void jit_erfinv_emitter::emit_impl(const std::vector<size_t>& in_vec_idxs,+ const std::vector<size_t>& out_vec_idxs) const {+ if (host_isa_ == ov::intel_cpu::riscv64::cpu_isa_t::gv) {+ emit_isa<ov::intel_cpu::riscv64::cpu_isa_t::gv>(in_vec_idxs, out_vec_idxs);+ } else {+ OV_CPU_JIT_EMITTER_THROW("Can't create jit eltwise kernel for erfinv");+ }+}++template <ov::intel_cpu::riscv64::cpu_isa_t isa>+void jit_erfinv_emitter::emit_isa(const std::vector<size_t>& in_vec_idxs,+ const std::vector<size_t>& out_vec_idxs) const {+ OV_CPU_JIT_EMITTER_ASSERT(exec_prc_ == ov::element::f32, "Unsupported precision: ", exec_prc_);++ auto src = VReg(in_vec_idxs[0]);+ auto dst = VReg(out_vec_idxs[0]);+ // Register assignments:+ // aux0 = saved x+ // aux1 = v bits → exponent int → e+1 float → log(v) → w+ // aux2 = v bits (for mantissa) → h_log → r1 → r2+ // aux3 = log/branch1 poly acc → poly1+ // aux4 = branch2 poly acc → poly2+ // aux5 = coeff broadcast temp (for Horner coefficient loading)+ // gpr = integer GPR for vsub_vx, vand_vx, vor_vx, li+ // fp0 = float scalar for vfrsub_vf, vfadd_vf, vfsub_vf, vfmacc_vf+ auto aux0 = VReg(aux_vec_idxs[0]);+ auto aux1 = VReg(aux_vec_idxs[1]);+ auto aux2 = VReg(aux_vec_idxs[2]);+ auto aux3 = VReg(aux_vec_idxs[3]);+ auto aux4 = VReg(aux_vec_idxs[4]);+ auto aux5 = VReg(aux_vec_idxs[5]);+ auto gpr = Reg(aux_gpr_idxs[0]);+ auto fp0 = FReg(aux_fp_gpr_idxs[0]);++ // Save x+ h->vmv_v_v(aux0, src);++ // v = 1 - x²+ h->vfmul_vv(aux1, src, src); // aux1 = x²+ load_table_val("one", fp0);+ h->vfrsub_vf(aux1, aux1, fp0); // aux1 = 1.0 - x² = v+ // Copy v to aux2 for mantissa extraction (keep v in aux1 for exponent extraction)+ h->vmv_v_v(aux2, aux1);++ // Extract biased exponent k = v_bits >> 23 (integer)+ h->vsrl_vi(aux1, aux1, 23); // k (int32) in aux1+ // Subtract 126: k - 126 = e+1+ h->li(gpr, 126);+ h->vsub_vx(aux1, aux1, gpr); // e+1 (int32)+ h->vfcvt_f_x_v(aux1, aux1); // (e+1) as float++ // Extract mantissa from aux2 (v bits) and compute h = f/2 - 1+ h->li(gpr, 0x007fffff);+ h->vand_vx(aux2, aux2, gpr); // mantissa bits+ h->li(gpr, 0x3f800000);+ h->vor_vx(aux2, aux2, gpr); // f = 1.mantissa ∈ [1, 2)+ load_table_val("half", fp0);+ h->vfmul_vf(aux2, aux2, fp0); // f/2 ∈ [0.5, 1)+ load_table_val("one", fp0);+ h->vfsub_vf(aux2, aux2, fp0); // h = f/2 - 1 ∈ [-0.5, 0)++ // Log polynomial Horner: log(1+h) using vfmadd_vv(acc, h, coeff)+ // vfmadd_vv(vd, vs1, vs2): vd = vs1 * vd + vs2 → acc = h * acc + coeff ✓+ load_table_val("log_pol6", aux3, gpr);+ load_table_val("log_pol5", aux5, gpr);+ h->vfmadd_vv(aux3, aux2, aux5); // aux3 = h * p6 + p5+ load_table_val("log_pol4", aux5, gpr);+ h->vfmadd_vv(aux3, aux2, aux5);+ load_table_val("log_pol3", aux5, gpr);+ h->vfmadd_vv(aux3, aux2, aux5);+ load_table_val("log_pol2", aux5, gpr);+ h->vfmadd_vv(aux3, aux2, aux5);+ load_table_val("log_pol1", aux5, gpr);+ h->vfmadd_vv(aux3, aux2, aux5);+ load_table_val("log_pol0", aux5, gpr);+ h->vfmadd_vv(aux3, aux2, aux5);+ load_table_val("one", aux5, gpr);+ h->vfmadd_vv(aux3, aux2, aux5); // include constant 1.0 factor+ h->vfmul_vv(aux3, aux2, aux3); // log(1+h) = h * poly; aux2(h) freed++ // Combine: log(v) = (e+1)*ln2 + log(y)+ load_table_val("ln2", fp0);+ h->vfmacc_vf(aux3, fp0, aux1); // aux3 += ln2 * (e+1) = log(v)+ h->vfneg_v(aux1, aux3); // aux1 = w = -log(v); aux3 freed++ // Branch 1: poly1 = Giles poly(r1 = w - 2.5)+ load_table_val("two_point_five", fp0);+ h->vfsub_vf(aux2, aux1, fp0); // r1 = w - 2.5+ load_table_val("e1_c8", aux3, gpr);+ load_table_val("e1_c7", aux5, gpr);+ h->vfmadd_vv(aux3, aux2, aux5);+ load_table_val("e1_c6", aux5, gpr);+ h->vfmadd_vv(aux3, aux2, aux5);+ load_table_val("e1_c5", aux5, gpr);+ h->vfmadd_vv(aux3, aux2, aux5);+ load_table_val("e1_c4", aux5, gpr);+ h->vfmadd_vv(aux3, aux2, aux5);+ load_table_val("e1_c3", aux5, gpr);+ h->vfmadd_vv(aux3, aux2, aux5);+ load_table_val("e1_c2", aux5, gpr);+ h->vfmadd_vv(aux3, aux2, aux5);+ load_table_val("e1_c1", aux5, gpr);+ h->vfmadd_vv(aux3, aux2, aux5);+ load_table_val("e1_c0", aux5, gpr);+ h->vfmadd_vv(aux3, aux2, aux5); // aux3 = poly1; aux2(r1) freed++ // Branch 2: poly2 = Giles poly(r2 = sqrt(w) - 3.0)+ h->vfsqrt_v(aux2, aux1); // sqrt(w)+ load_table_val("three", fp0);+ h->vfsub_vf(aux2, aux2, fp0); // r2 = sqrt(w) - 3.0+ load_table_val("e2_c8", aux4, gpr);+ load_table_val("e2_c7", aux5, gpr);+ h->vfmadd_vv(aux4, aux2, aux5);+ load_table_val("e2_c6", aux5, gpr);+ h->vfmadd_vv(aux4, aux2, aux5);+ load_table_val("e2_c5", aux5, gpr);+ h->vfmadd_vv(aux4, aux2, aux5);+ load_table_val("e2_c4", aux5, gpr);+ h->vfmadd_vv(aux4, aux2, aux5);+ load_table_val("e2_c3", aux5, gpr);+ h->vfmadd_vv(aux4, aux2, aux5);+ load_table_val("e2_c2", aux5, gpr);+ h->vfmadd_vv(aux4, aux2, aux5);+ load_table_val("e2_c1", aux5, gpr);+ h->vfmadd_vv(aux4, aux2, aux5);+ load_table_val("e2_c0", aux5, gpr);+ h->vfmadd_vv(aux4, aux2, aux5); // aux4 = poly2; aux2(r2), aux5 freed++ // Blend: select poly1 (aux3) where w<5, poly2 (aux4) otherwise; multiply by x+ load_table_val("five", fp0);+ h->vmflt_vf(mask_vreg(), aux1, fp0); // mask = (w < 5.0)+ h->vmerge_vvm(dst, aux4, aux3); // dst = mask ? poly1 : poly2+ h->vfmul_vv(dst, dst, aux0); // dst *= saved_x++ // Special-case handling: |x| >= 1 → ±inf; |x| > 1 → NaN+ // Reuse aux1..aux5 (all free); aux0 holds saved x; gpr and fp0 available.+ // abs_x = |x| = x & 0x7fffffff+ h->li(gpr, 0x7fffffff);+ h->vand_vx(aux1, aux0, gpr); // aux1 = abs_x++ // inf_signed = copysign(+inf, x) = (x & sign_mask) | 0x7f800000+ h->li(gpr, static_cast<int32_t>(0x80000000));+ h->vand_vx(aux2, aux0, gpr); // sign bit+ h->li(gpr, 0x7f800000);+ h->vor_vx(aux2, aux2, gpr); // aux2 = ±inf++ // ge1_mask: (abs_x >= 1.0) → vmfge_vf+ load_table_val("one", fp0);+ h->vmfge_vf(mask_vreg(), aux1, fp0); // mask = (abs_x >= 1.0)+ h->vmerge_vvm(dst, dst, aux2); // dst[ge1] = ±inf++ // gt1_mask: (abs_x > 1.0) → vmfgt_vf+ h->vmfgt_vf(mask_vreg(), aux1, fp0); // mask = (abs_x > 1.0)+ load_table_val("qnan", aux3, gpr);+ h->vmerge_vvm(dst, dst, aux3); // dst[gt1] = NaN+}++void jit_erfinv_emitter::register_table_entries() {+ push_arg_entry_of("one", CONST_1_F);+ push_arg_entry_of("half", 0x3f000000);+ push_arg_entry_of("qnan", 0x7fc00000);+ push_arg_entry_of("ln2", 0x3f317218);+ push_arg_entry_of("two_point_five", 0x40200000);+ push_arg_entry_of("three", 0x40400000);+ push_arg_entry_of("five", 0x40a00000);+ push_arg_entry_of("log_pol0", 0xbf000000);+ push_arg_entry_of("log_pol1", 0x3eaaaa9f);+ push_arg_entry_of("log_pol2", 0xbe800000);+ push_arg_entry_of("log_pol3", 0x3e4ccccd);+ push_arg_entry_of("log_pol4", 0xbe2aaac1);+ push_arg_entry_of("log_pol5", 0x3e12491b);+ push_arg_entry_of("log_pol6", 0xbe000000);+ push_arg_entry_of("e1_c8", 0x32f16588);+ push_arg_entry_of("e1_c7", 0x34b84b36);+ push_arg_entry_of("e1_c6", 0xb66c7357);+ push_arg_entry_of("e1_c5", 0xb6935ac1);+ push_arg_entry_of("e1_c4", 0x396532db);+ push_arg_entry_of("e1_c3", 0xbaa45408);+ push_arg_entry_of("e1_c2", 0xbb88e4ef);+ push_arg_entry_of("e1_c1", 0x3e7c8f63);+ push_arg_entry_of("e1_c0", 0x3fc02e2f);+ push_arg_entry_of("e2_c8", 0xb951f09b);+ push_arg_entry_of("e2_c7", 0x38d3b56b);+ push_arg_entry_of("e2_c6", 0x3ab0dc72);+ push_arg_entry_of("e2_c5", 0xbb70bde7);+ push_arg_entry_of("e2_c4", 0x3bbc127b);+ push_arg_entry_of("e2_c3", 0xbbf9c5d7);+ push_arg_entry_of("e2_c2", 0xbc1aa57e);+ push_arg_entry_of("e2_c1", 0x3f8036db);+ push_arg_entry_of("e2_c0", 0x40354f7e);+}+/// Greater ///jit_greater_emitter::jit_greater_emitter(jit_generator_t* host, cpu_isa_t host_isa, const element::Type exec_prc): jit_emitter(host, host_isa, exec_prc) {diff --git a/src/plugins/intel_cpu/src/emitters/plugin/riscv64/jit_eltwise_emitters.hpp b/src/plugins/intel_cpu/src/emitters/plugin/riscv64/jit_eltwise_emitters.hppindex a63727c1a96..eb91d7dcf9c 100644--- a/src/plugins/intel_cpu/src/emitters/plugin/riscv64/jit_eltwise_emitters.hpp+++ b/src/plugins/intel_cpu/src/emitters/plugin/riscv64/jit_eltwise_emitters.hpp@@ -342,6 +342,34 @@ private:void register_table_entries() override;};+class jit_erfinv_emitter : public jit_emitter {+public:+ jit_erfinv_emitter(ov::intel_cpu::riscv64::jit_generator_t* host,+ ov::intel_cpu::riscv64::cpu_isa_t host_isa,+ ov::element::Type exec_prc = ov::element::f32);++ jit_erfinv_emitter(ov::intel_cpu::riscv64::jit_generator_t* host,+ ov::intel_cpu::riscv64::cpu_isa_t host_isa,+ const std::shared_ptr<ov::Node>& node,+ ov::element::Type exec_prc = ov::element::f32);++ size_t get_inputs_num() const override;+ size_t aux_vecs_count() const override;+ size_t aux_gprs_count() const override;+ size_t aux_fp_gprs_count() const override;++ static std::set<std::vector<element::Type>> get_supported_precisions(+ const std::shared_ptr<ov::Node>& node = nullptr);++private:+ void emit_impl(const std::vector<size_t>& in_vec_idxs, const std::vector<size_t>& out_vec_idxs) const override;++ template <ov::intel_cpu::riscv64::cpu_isa_t isa>+ void emit_isa(const std::vector<size_t>& in_vec_idxs, const std::vector<size_t>& out_vec_idxs) const;++ void register_table_entries() override;+};+/// Greater///class jit_greater_emitter : public jit_emitter {public:diff --git a/src/plugins/intel_cpu/src/emitters/plugin/x64/jit_eltwise_emitters.cpp b/src/plugins/intel_cpu/src/emitters/plugin/x64/jit_eltwise_emitters.cppindex 5ede87bc922..434a68c8bb8 100644--- a/src/plugins/intel_cpu/src/emitters/plugin/x64/jit_eltwise_emitters.cpp+++ b/src/plugins/intel_cpu/src/emitters/plugin/x64/jit_eltwise_emitters.cpp@@ -14,6 +14,7 @@#include <cstddef>#include <cstdint>#include <cstdlib>+#include <cstring>#include <limits>#include <memory>#include <set>@@ -2385,6 +2386,228 @@ size_t jit_soft_sign_emitter::aux_vecs_count() const {return 1;}+/// ERFINV ///+namespace {+inline uint32_t erfinv_f2u(float f) {+ uint32_t u = 0;+ std::memcpy(&u, &f, sizeof(u));+ return u;+}+} // namespace++jit_erfinv_emitter::jit_erfinv_emitter(x64::jit_generator_t* host,+ x64::cpu_isa_t host_isa,+ [[maybe_unused]] const std::shared_ptr<ov::Node>& node,+ ov::element::Type exec_prc)+ : jit_emitter(host, host_isa, exec_prc) {+ prepare_table();+}+jit_erfinv_emitter::jit_erfinv_emitter(x64::jit_generator_t* host, x64::cpu_isa_t host_isa, ov::element::Type exec_prc)+ : jit_emitter(host, host_isa, exec_prc) {+ prepare_table();+}++size_t jit_erfinv_emitter::get_inputs_num() const {+ return 1;+}++std::set<std::vector<element::Type>> jit_erfinv_emitter::get_supported_precisions(+ [[maybe_unused]] const std::shared_ptr<ov::Node>& node) {+ return {{element::f32}};+}++void jit_erfinv_emitter::emit_impl(const std::vector<size_t>& in_vec_idxs,+ const std::vector<size_t>& out_vec_idxs) const {+ if (host_isa_ == x64::sse41) {+ emit_isa<x64::sse41>(in_vec_idxs, out_vec_idxs);+ } else if (host_isa_ == x64::avx2) {+ emit_isa<x64::avx2>(in_vec_idxs, out_vec_idxs);+ } else if (host_isa_ == x64::avx512_core) {+ emit_isa<x64::avx512_core>(in_vec_idxs, out_vec_idxs);+ } else {+ OV_CPU_JIT_EMITTER_THROW("Unsupported ISA ", host_isa_);+ }+}++template <x64::cpu_isa_t isa>+void jit_erfinv_emitter::emit_isa(const std::vector<size_t>& in_vec_idxs,+ const std::vector<size_t>& out_vec_idxs) const {+ using Vmm = typename conditional3<isa == x64::sse41, Xmm, isa == x64::avx2, Ymm, Zmm>::type;+ OV_CPU_JIT_EMITTER_ASSERT(exec_prc_ == ov::element::f32, "Unsupported precision: ", exec_prc_);+ auto vmm_src = Vmm(in_vec_idxs[0]);+ auto vmm_dst = Vmm(out_vec_idxs[0]);+ // aux0 is xmm0 for SSE41 (blend mask); free during main computation+ auto aux0 = Vmm(aux_vec_idxs[0]);+ auto aux1 = Vmm(aux_vec_idxs[1]); // v → exponent → log(v) → w+ auto aux2 = Vmm(aux_vec_idxs[2]); // log poly acc → r1 → r2+ auto aux3 = Vmm(aux_vec_idxs[3]); // mantissa → h → branch1 poly acc → poly1+ auto aux4 = Vmm(aux_vec_idxs[4]); // branch2 poly acc → poly2+ auto aux5 = Vmm(aux_vec_idxs[5]); // saved x++ // Save x (needed for final multiply after src may be overwritten by dst)+ h->uni_vmovups(aux5, vmm_src);++ // v = 1 - x² (computed as (-x²) + 1.0 via xor+add)+ h->uni_vmulps(aux1, vmm_src, vmm_src);+ h->uni_vxorps(aux1, aux1, table_val("sign_mask"));+ h->uni_vaddps(aux1, aux1, table_val("one"));++ // --- Inline log(v): log(v) = (e+1)*ln2 + log(y), y = f/2, f = 1.mantissa ---+ // Extract biased exponent k = v_bits >> 23 (integer)+ h->uni_vpsrld(aux2, aux1, 23);+ // aux2 = k - 126 = e+1 as int32 (biased_e = e+127, so e+1 = k-126)+ h->uni_vpsubd(aux2, aux2, table_val("int126"));+ // Extract mantissa from aux1 (v bits still intact), compute h = f/2 - 1+ h->uni_vandps(aux3, aux1, table_val("mantissa_mask")); // mantissa bits+ h->uni_vorps(aux3, aux3, table_val("one")); // f = 1.mantissa ∈ [1, 2)+ h->uni_vmulps(aux3, aux3, table_val("half")); // f/2 ∈ [0.5, 1)+ h->uni_vsubps(aux3, aux3, table_val("one")); // h = f/2 - 1 ∈ [-0.5, 0)+ // Convert exponent to float (overwrites v in aux1)+ h->uni_vcvtdq2ps(aux1, aux2); // aux1 = (e+1) as float; aux2 freed++ // Log polynomial Horner: log(1+h) = h*(1 + h*(p0 + h*(p1 + ... + h*p6)))+ // Accumulate in aux2 (uses aux3 = h as argument, table_val for coeffs)+ h->uni_vmovups(aux2, table_val("log_pol6"));+ h->uni_vfmadd213ps(aux2, aux3, table_val("log_pol5"));+ h->uni_vfmadd213ps(aux2, aux3, table_val("log_pol4"));+ h->uni_vfmadd213ps(aux2, aux3, table_val("log_pol3"));+ h->uni_vfmadd213ps(aux2, aux3, table_val("log_pol2"));+ h->uni_vfmadd213ps(aux2, aux3, table_val("log_pol1"));+ h->uni_vfmadd213ps(aux2, aux3, table_val("log_pol0"));+ h->uni_vfmadd213ps(aux2, aux3, table_val("one")); // include constant 1.0 factor+ h->uni_vmulps(aux2, aux2, aux3); // log(1+h) = acc * h; aux3 freed++ // Combine: log(v) = (e+1)*ln2 + log(y); aux1 = (e+1)*ln2 + log(y)+ h->uni_vfmadd132ps(aux1, aux2, table_val("ln2")); // aux1 = aux1*ln2 + aux2+ h->uni_vxorps(aux1, aux1, table_val("sign_mask")); // w = -log(v); aux2 freed++ // Branch 1: poly1 = Giles poly(w - 2.5), valid for w < 5+ h->uni_vmovups(aux2, aux1);+ h->uni_vsubps(aux2, aux2, table_val("two_point_five")); // r1 = w - 2.5+ h->uni_vmovups(aux3, table_val("e1_c8"));+ h->uni_vfmadd213ps(aux3, aux2, table_val("e1_c7"));+ h->uni_vfmadd213ps(aux3, aux2, table_val("e1_c6"));+ h->uni_vfmadd213ps(aux3, aux2, table_val("e1_c5"));+ h->uni_vfmadd213ps(aux3, aux2, table_val("e1_c4"));+ h->uni_vfmadd213ps(aux3, aux2, table_val("e1_c3"));+ h->uni_vfmadd213ps(aux3, aux2, table_val("e1_c2"));+ h->uni_vfmadd213ps(aux3, aux2, table_val("e1_c1"));+ h->uni_vfmadd213ps(aux3, aux2, table_val("e1_c0")); // aux3 = poly1; aux2 freed++ // Branch 2: poly2 = Giles poly(sqrt(w) - 3.0), valid for w >= 5+ h->uni_vsqrtps(aux2, aux1);+ h->uni_vsubps(aux2, aux2, table_val("three")); // r2 = sqrt(w) - 3.0+ h->uni_vmovups(aux4, table_val("e2_c8"));+ h->uni_vfmadd213ps(aux4, aux2, table_val("e2_c7"));+ h->uni_vfmadd213ps(aux4, aux2, table_val("e2_c6"));+ h->uni_vfmadd213ps(aux4, aux2, table_val("e2_c5"));+ h->uni_vfmadd213ps(aux4, aux2, table_val("e2_c4"));+ h->uni_vfmadd213ps(aux4, aux2, table_val("e2_c3"));+ h->uni_vfmadd213ps(aux4, aux2, table_val("e2_c2"));+ h->uni_vfmadd213ps(aux4, aux2, table_val("e2_c1"));+ h->uni_vfmadd213ps(aux4, aux2, table_val("e2_c0")); // aux4 = poly2; aux2 freed++ // Blend: select poly1 where w < 5, poly2 otherwise; multiply by x+ if (isa == x64::avx512_core) {+ h->vcmpps(k_mask, aux1, table_val("five"), _cmp_lt_os);+ h->uni_vmovups(vmm_dst, aux4);+ h->vblendmps(vmm_dst | k_mask, vmm_dst, aux3); // k_mask ? poly1 : poly2+ } else if (isa == x64::avx2) {+ h->vcmpps(aux0, aux1, table_val("five"), _cmp_lt_os);+ h->uni_vblendvps(vmm_dst, aux4, aux3, aux0);+ } else {+ // SSE41: aux0 == xmm0 (guaranteed by JIT framework for SSE41)+ h->uni_vmovups(aux0, aux1);+ h->cmpps(aux0, table_val("five"), _cmp_lt_os);+ h->uni_vmovups(vmm_dst, aux4);+ h->blendvps(vmm_dst, aux3); // implicit xmm0 (= aux0) as mask+ }+ h->uni_vmulps(vmm_dst, vmm_dst, aux5);++ // Special-case handling: |x| >= 1 → ±inf; |x| > 1 → NaN+ // Reuse aux1..aux4 (all free at this point); aux5 still holds saved x.+ // abs_x = |x|+ h->uni_vmovups(aux1, aux5);+ h->uni_vandps(aux1, aux1, table_val("abs_mask"));+ // inf_signed = copysign(+inf, x) = (x & sign_mask) | pos_inf+ h->uni_vmovups(aux2, aux5);+ h->uni_vandps(aux2, aux2, table_val("sign_mask"));+ h->uni_vorps(aux2, aux2, table_val("pos_inf"));+ // ge1_mask = (abs_x >= 1.0f), blend ±inf+ if (isa == x64::avx512_core) {+ h->vcmpps(k_mask, aux1, table_val("one"), _cmp_ge_os);+ h->vblendmps(vmm_dst | k_mask, vmm_dst, aux2);+ } else if (isa == x64::avx2) {+ h->vcmpps(aux3, aux1, table_val("one"), _cmp_ge_os);+ h->uni_vblendvps(vmm_dst, vmm_dst, aux2, aux3);+ } else {+ h->uni_vmovups(aux0, aux1);+ h->cmpps(aux0, table_val("one"), _cmp_ge_os);+ h->blendvps(vmm_dst, aux2); // implicit xmm0 (= aux0)+ }+ // gt1_mask = (abs_x > 1.0f), blend NaN+ h->uni_vmovups(aux4, table_val("qnan"));+ if (isa == x64::avx512_core) {+ h->vcmpps(k_mask, aux1, table_val("one"), _cmp_gt_os);+ h->vblendmps(vmm_dst | k_mask, vmm_dst, aux4);+ } else if (isa == x64::avx2) {+ h->vcmpps(aux3, aux1, table_val("one"), _cmp_gt_os);+ h->uni_vblendvps(vmm_dst, vmm_dst, aux4, aux3);+ } else {+ h->uni_vmovups(aux0, aux1);+ h->cmpps(aux0, table_val("one"), _cmp_gt_os);+ h->blendvps(vmm_dst, aux4); // implicit xmm0 (= aux0)+ }+}++void jit_erfinv_emitter::register_table_entries() {+ push_arg_entry_of("one", CONST_1_F, true);+ push_arg_entry_of("half", erfinv_f2u(0.5F), true);+ push_arg_entry_of("sign_mask", 0x80000000, true);+ push_arg_entry_of("abs_mask", 0x7fffffff, true);+ push_arg_entry_of("pos_inf", 0x7f800000, true);+ push_arg_entry_of("qnan", 0x7fc00000, true);+ push_arg_entry_of("mantissa_mask", 0x007fffff, true);+ // bias_mask and "one" are both 0x3f800000; reuse "one" for vorps+ push_arg_entry_of("int126", 126U, true); // integer 126 for vpsubd+ push_arg_entry_of("ln2", 0x3f317218, true);+ push_arg_entry_of("two_point_five", erfinv_f2u(2.5F), true);+ push_arg_entry_of("three", erfinv_f2u(3.0F), true);+ push_arg_entry_of("five", erfinv_f2u(5.0F), true);+ // Log polynomial: log(1+h) Taylor coefficients (from softplus emitter)+ push_arg_entry_of("log_pol0", 0xbf000000, true); // -1/2+ push_arg_entry_of("log_pol1", 0x3eaaaa9f, true); // 1/3+ push_arg_entry_of("log_pol2", 0xbe800000, true); // -1/4+ push_arg_entry_of("log_pol3", 0x3e4ccccd, true); // 1/5+ push_arg_entry_of("log_pol4", 0xbe2aaac1, true); // -1/6+ push_arg_entry_of("log_pol5", 0x3e12491b, true); // 1/7+ push_arg_entry_of("log_pol6", 0xbe000000, true); // -1/8+ // Giles erfinv branch 1 coefficients (w < 5, poly in w-2.5)+ push_arg_entry_of("e1_c8", 0x32f16588, true); // 2.81022636e-08+ push_arg_entry_of("e1_c7", 0x34b84b36, true); // 3.43273939e-07+ push_arg_entry_of("e1_c6", 0xb66c7357, true); // -3.5233877e-06+ push_arg_entry_of("e1_c5", 0xb6935ac1, true); // -4.39150654e-06+ push_arg_entry_of("e1_c4", 0x396532db, true); // 0.00021858087+ push_arg_entry_of("e1_c3", 0xbaa45408, true); // -0.00125372503+ push_arg_entry_of("e1_c2", 0xbb88e4ef, true); // -0.00417768164+ push_arg_entry_of("e1_c1", 0x3e7c8f63, true); // 0.246640727+ push_arg_entry_of("e1_c0", 0x3fc02e2f, true); // 1.50140941+ // Giles erfinv branch 2 coefficients (w >= 5, poly in sqrt(w)-3.0)+ push_arg_entry_of("e2_c8", 0xb951f09b, true); // -0.000200214257+ push_arg_entry_of("e2_c7", 0x38d3b56b, true); // 0.000100950558+ push_arg_entry_of("e2_c6", 0x3ab0dc72, true); // 0.00134934322+ push_arg_entry_of("e2_c5", 0xbb70bde7, true); // -0.00367342844+ push_arg_entry_of("e2_c4", 0x3bbc127b, true); // 0.00573950773+ push_arg_entry_of("e2_c3", 0xbbf9c5d7, true); // -0.0076224613+ push_arg_entry_of("e2_c2", 0xbc1aa57e, true); // -0.00943887047+ push_arg_entry_of("e2_c1", 0x3f8036db, true); // 1.00167406+ push_arg_entry_of("e2_c0", 0x40354f7e, true); // 2.83297682+}++size_t jit_erfinv_emitter::aux_vecs_count() const {+ return 6;+}+/// IS_FINITE ///template <>void jit_is_finite_emitter::emit_isa<x64::avx512_core>(const std::vector<size_t>& in_vec_idxs,diff --git a/src/plugins/intel_cpu/src/emitters/plugin/x64/jit_eltwise_emitters.hpp b/src/plugins/intel_cpu/src/emitters/plugin/x64/jit_eltwise_emitters.hppindex c9d745cd150..d256b0fda37 100644--- a/src/plugins/intel_cpu/src/emitters/plugin/x64/jit_eltwise_emitters.hpp+++ b/src/plugins/intel_cpu/src/emitters/plugin/x64/jit_eltwise_emitters.hpp@@ -710,6 +710,30 @@ private:void register_table_entries() override;};+class jit_erfinv_emitter : public jit_emitter {+public:+ jit_erfinv_emitter(dnnl::impl::cpu::x64::jit_generator_t* host,+ dnnl::impl::cpu::x64::cpu_isa_t host_isa,+ ov::element::Type exec_prc = ov::element::f32);+ jit_erfinv_emitter(dnnl::impl::cpu::x64::jit_generator_t* host,+ dnnl::impl::cpu::x64::cpu_isa_t host_isa,+ const std::shared_ptr<ov::Node>& n,+ ov::element::Type exec_prc = ov::element::f32);++ size_t get_inputs_num() const override;+ static std::set<std::vector<element::Type>> get_supported_precisions(+ const std::shared_ptr<ov::Node>& node = nullptr);+ size_t aux_vecs_count() const override;++private:+ void emit_impl(const std::vector<size_t>& in_vec_idxs, const std::vector<size_t>& out_vec_idxs) const override;++ template <dnnl::impl::cpu::x64::cpu_isa_t isa>+ void emit_isa(const std::vector<size_t>& in_vec_idxs, const std::vector<size_t>& out_vec_idxs) const;++ void register_table_entries() override;+};+class jit_is_finite_emitter : public jit_emitter {public:jit_is_finite_emitter(dnnl::impl::cpu::x64::jit_generator_t* host,diff --git a/src/plugins/intel_cpu/src/emitters/snippets/aarch64/cpu_generator.cpp b/src/plugins/intel_cpu/src/emitters/snippets/aarch64/cpu_generator.cppindex 53ade73673d..e615cc2e5ee 100644--- a/src/plugins/intel_cpu/src/emitters/snippets/aarch64/cpu_generator.cpp+++ b/src/plugins/intel_cpu/src/emitters/snippets/aarch64/cpu_generator.cpp@@ -41,6 +41,7 @@#include "openvino/op/elu.hpp"#include "openvino/op/equal.hpp"#include "openvino/op/erf.hpp"+#include "openvino/op/erfinv.hpp"#include "openvino/op/exp.hpp"#include "openvino/op/floor.hpp"#include "openvino/op/floor_mod.hpp"@@ -306,6 +307,7 @@ CPUTargetMachine::CPUTargetMachine(dnnl::impl::cpu::aarch64::cpu_isa_t host_isa,jitters[ov::op::v0::Clamp::get_type_info_static()] = emitter_factory.from_node<jit_clamp_emitter>();jitters[ov::op::v0::Elu::get_type_info_static()] = emitter_factory.from_node<jit_elu_emitter>();jitters[ov::op::v0::Erf::get_type_info_static()] = emitter_factory.from_node<jit_erf_emitter>();+ jitters[ov::op::v17::ErfInv::get_type_info_static()] = emitter_factory.from_node<jit_erfinv_emitter>();jitters[ov::op::v0::Exp::get_type_info_static()] = emitter_factory.from_node<jit_exp_emitter>();jitters[ov::op::v0::Floor::get_type_info_static()] = emitter_factory.from_node<jit_floor_emitter>();jitters[ov::op::v1::FloorMod::get_type_info_static()] = emitter_factory.from_node<jit_floor_mod_emitter>();diff --git a/src/plugins/intel_cpu/src/emitters/snippets/riscv64/cpu_generator.cpp b/src/plugins/intel_cpu/src/emitters/snippets/riscv64/cpu_generator.cppindex 40f51b98ad0..fbee3dbfb3a 100644--- a/src/plugins/intel_cpu/src/emitters/snippets/riscv64/cpu_generator.cpp+++ b/src/plugins/intel_cpu/src/emitters/snippets/riscv64/cpu_generator.cpp@@ -35,6 +35,7 @@#include "openvino/op/elu.hpp"#include "openvino/op/equal.hpp"#include "openvino/op/erf.hpp"+#include "openvino/op/erfinv.hpp"#include "openvino/op/exp.hpp"#include "openvino/op/floor.hpp"#include "openvino/op/floor_mod.hpp"@@ -334,6 +335,7 @@ CPUTargetMachine::CPUTargetMachine(ov::intel_cpu::riscv64::cpu_isa_t host_isa, ojitters[ov::op::v0::Clamp::get_type_info_static()] = emitter_factory.from_node<jit_clamp_emitter>();jitters[ov::op::v0::Elu::get_type_info_static()] = emitter_factory.from_node<jit_elu_emitter>();jitters[ov::op::v0::Erf::get_type_info_static()] = emitter_factory.from_node<jit_erf_emitter>();+ jitters[ov::op::v17::ErfInv::get_type_info_static()] = emitter_factory.from_node<jit_erfinv_emitter>();jitters[ov::op::v0::Exp::get_type_info_static()] = emitter_factory.from_node<jit_exp_emitter>();jitters[ov::op::v0::Floor::get_type_info_static()] = emitter_factory.from_node<jit_floor_emitter>();jitters[ov::op::v1::FloorMod::get_type_info_static()] = emitter_factory.from_node<jit_floor_mod_emitter>();diff --git a/src/plugins/intel_cpu/src/emitters/snippets/x64/cpu_generator.cpp b/src/plugins/intel_cpu/src/emitters/snippets/x64/cpu_generator.cppindex 652eba38c10..452f9cbfaa8 100644--- a/src/plugins/intel_cpu/src/emitters/snippets/x64/cpu_generator.cpp+++ b/src/plugins/intel_cpu/src/emitters/snippets/x64/cpu_generator.cpp@@ -44,6 +44,7 @@#include "openvino/op/elu.hpp"#include "openvino/op/equal.hpp"#include "openvino/op/erf.hpp"+#include "openvino/op/erfinv.hpp"#include "openvino/op/exp.hpp"#include "openvino/op/floor.hpp"#include "openvino/op/floor_mod.hpp"@@ -312,6 +313,7 @@ intel_cpu::CPUTargetMachine::CPUTargetMachine(dnnl::impl::cpu::x64::cpu_isa_t hojitters[ov::op::v0::Clamp::get_type_info_static()] = emitter_factory.from_node<intel_cpu::jit_clamp_emitter>();jitters[ov::op::v0::Elu::get_type_info_static()] = emitter_factory.from_node<intel_cpu::jit_elu_emitter>();jitters[ov::op::v0::Erf::get_type_info_static()] = emitter_factory.from_node<intel_cpu::jit_erf_emitter>();+ jitters[ov::op::v17::ErfInv::get_type_info_static()] = emitter_factory.from_node<intel_cpu::jit_erfinv_emitter>();jitters[ov::op::v0::Exp::get_type_info_static()] = emitter_factory.from_node<intel_cpu::jit_exp_emitter>();jitters[ov::op::v0::Floor::get_type_info_static()] = emitter_factory.from_node<intel_cpu::jit_floor_emitter>();jitters[ov::op::v5::Round::get_type_info_static()] = emitter_factory.from_node<intel_cpu::jit_round_emitter>();diff --git a/src/plugins/intel_cpu/src/nodes/eltwise.cpp b/src/plugins/intel_cpu/src/nodes/eltwise.cppindex 9acc02080b3..cddce4a9289 100644--- a/src/plugins/intel_cpu/src/nodes/eltwise.cpp+++ b/src/plugins/intel_cpu/src/nodes/eltwise.cpp@@ -63,6 +63,7 @@#include "openvino/op/elu.hpp"#include "openvino/op/equal.hpp"#include "openvino/op/erf.hpp"+#include "openvino/op/erfinv.hpp"#include "openvino/op/exp.hpp"#include "openvino/op/floor.hpp"#include "openvino/op/floor_mod.hpp"@@ -394,6 +395,10 @@ const std::map<const ov::DiscreteTypeInfo, Eltwise::Initializer>& Eltwise::getIn[]([[maybe_unused]] const std::shared_ptr<ov::Node>& op, Eltwise& node) {node.algorithm = Algorithm::EltwiseSoftSign;}},+ {ov::op::v17::ErfInv::get_type_info_static(),+ []([[maybe_unused]] const std::shared_ptr<ov::Node>& op, Eltwise& node) {+ node.algorithm = Algorithm::EltwiseErfInv;+ }},{ov::op::v1::Select::get_type_info_static(),[]([[maybe_unused]] const std::shared_ptr<ov::Node>& op, Eltwise& node) {node.algorithm = Algorithm::EltwiseSelect;@@ -495,6 +500,7 @@ size_t Eltwise::getOpInputsNum() const {case Algorithm::EltwiseRoundHalfToEven:case Algorithm::EltwiseRoundHalfAwayFromZero:case Algorithm::EltwiseSoftSign:+ case Algorithm::EltwiseErfInv:case Algorithm::EltwiseLog:return 1;case Algorithm::EltwiseAdd:diff --git a/src/plugins/intel_cpu/src/nodes/executors/jit/eltwise.cpp b/src/plugins/intel_cpu/src/nodes/executors/jit/eltwise.cppindex 077f7fa6962..d8f3fac69a3 100644--- a/src/plugins/intel_cpu/src/nodes/executors/jit/eltwise.cpp+++ b/src/plugins/intel_cpu/src/nodes/executors/jit/eltwise.cpp@@ -451,6 +451,7 @@ bool EltwiseJitExecutor::supports(const EltwiseAttrs& attrs,Algorithm::EltwiseDivide,Algorithm::EltwiseElu,Algorithm::EltwiseErf,+ Algorithm::EltwiseErfInv,Algorithm::EltwiseExp,Algorithm::EltwiseFloor,Algorithm::EltwiseFloorMod,diff --git a/src/plugins/intel_cpu/src/nodes/executors/ref/eltwise.cpp b/src/plugins/intel_cpu/src/nodes/executors/ref/eltwise.cppindex 802446c412e..f9f8f2a3163 100644--- a/src/plugins/intel_cpu/src/nodes/executors/ref/eltwise.cpp+++ b/src/plugins/intel_cpu/src/nodes/executors/ref/eltwise.cpp@@ -30,6 +30,7 @@#include "openvino/core/except.hpp"#include "openvino/core/parallel.hpp"#include "openvino/core/type/element_type.hpp"+#include "openvino/reference/erfinv.hpp"#include "utils/general_utils.h"namespace ov::intel_cpu {@@ -385,6 +386,9 @@ void EltwiseRefExecutor<T, Enable>::exec(const jit_eltwise_call_args_ptrs& args_case Algorithm::EltwiseSoftSign:*dst_ptr_f = src_f[0] / (1 + std::fabs(src_f[0]));break;+ case Algorithm::EltwiseErfInv:+ *dst_ptr_f = static_cast<T>(ov::reference::func::erfinv(static_cast<float>(src_f[0])));+ break;// @todo implement proper isinfinite for non-float precisionscase Algorithm::EltwiseIsFinite:*dst_ptr_f = std::isfinite(static_cast<float>(src_f[0]));diff --git a/src/plugins/intel_cpu/src/nodes/kernels/aarch64/jit_uni_eltwise_generic.cpp b/src/plugins/intel_cpu/src/nodes/kernels/aarch64/jit_uni_eltwise_generic.cppindex 51330e45f84..9681bac87b1 100644--- a/src/plugins/intel_cpu/src/nodes/kernels/aarch64/jit_uni_eltwise_generic.cpp+++ b/src/plugins/intel_cpu/src/nodes/kernels/aarch64/jit_uni_eltwise_generic.cpp@@ -759,6 +759,7 @@ std::shared_ptr<jit_emitter> jit_uni_eltwise_generic<isa>::create_eltwise_emitteOV_CASE(Algorithm::EltwiseSigmoid, ov::intel_cpu::aarch64::jit_sigmoid_emitter),OV_CASE(Algorithm::EltwiseSoftRelu, ov::intel_cpu::aarch64::jit_softplus_emitter),OV_CASE(Algorithm::EltwiseSoftSign, ov::intel_cpu::aarch64::jit_soft_sign_emitter),+ OV_CASE(Algorithm::EltwiseErfInv, ov::intel_cpu::aarch64::jit_erfinv_emitter),OV_CASE(Algorithm::EltwiseSqrt, ov::intel_cpu::aarch64::jit_sqrt_emitter),OV_CASE(Algorithm::EltwiseSquaredDifference, ov::intel_cpu::aarch64::jit_squared_difference_emitter),OV_CASE(Algorithm::EltwiseSubtract, ov::intel_cpu::aarch64::jit_subtract_emitter),@@ -894,6 +895,7 @@ std::set<std::vector<element::Type>> eltwise_precision_helper::get_supported_preOV_CASE(Algorithm::EltwiseSigmoid, jit_sigmoid_emitter),OV_CASE(Algorithm::EltwiseSoftRelu, jit_softplus_emitter),OV_CASE(Algorithm::EltwiseSoftSign, jit_soft_sign_emitter),+ OV_CASE(Algorithm::EltwiseErfInv, jit_erfinv_emitter),OV_CASE(Algorithm::EltwiseSqrt, jit_sqrt_emitter),OV_CASE(Algorithm::EltwiseSquaredDifference, jit_squared_difference_emitter),OV_CASE(Algorithm::EltwiseSubtract, jit_subtract_emitter),diff --git a/src/plugins/intel_cpu/src/nodes/kernels/riscv64/jit_uni_eltwise_generic.cpp b/src/plugins/intel_cpu/src/nodes/kernels/riscv64/jit_uni_eltwise_generic.cppindex 98b63a8028f..f0dcb80a4e6 100644--- a/src/plugins/intel_cpu/src/nodes/kernels/riscv64/jit_uni_eltwise_generic.cpp+++ b/src/plugins/intel_cpu/src/nodes/kernels/riscv64/jit_uni_eltwise_generic.cpp@@ -492,6 +492,7 @@ std::shared_ptr<jit_emitter> jit_uni_eltwise_generic<isa>::create_eltwise_emitteOV_CASE(Algorithm::EltwiseExp, jit_exp_emitter),OV_CASE(Algorithm::EltwiseFloor, jit_floor_emitter),OV_CASE(Algorithm::EltwiseSoftSign, jit_softsign_emitter),+ OV_CASE(Algorithm::EltwiseErfInv, jit_erfinv_emitter),OV_CASE(Algorithm::EltwiseGreater, jit_greater_emitter),OV_CASE(Algorithm::EltwiseFloorMod, jit_floor_mod_emitter),OV_CASE(Algorithm::EltwiseGeluTanh, jit_gelu_tanh_emitter),@@ -653,6 +654,7 @@ std::set<std::vector<element::Type>> eltwise_precision_helper::get_supported_preOV_CASE(Algorithm::EltwiseFloor, jit_floor_emitter),OV_CASE(Algorithm::EltwiseFloorMod, jit_floor_mod_emitter),OV_CASE(Algorithm::EltwiseSoftSign, jit_softsign_emitter),+ OV_CASE(Algorithm::EltwiseErfInv, jit_erfinv_emitter),OV_CASE(Algorithm::EltwiseGreater, jit_greater_emitter),OV_CASE(Algorithm::EltwiseGeluErf, jit_gelu_erf_emitter),OV_CASE(Algorithm::EltwiseGeluTanh, jit_gelu_tanh_emitter),diff --git a/src/plugins/intel_cpu/src/nodes/kernels/x64/jit_uni_eltwise_generic.cpp b/src/plugins/intel_cpu/src/nodes/kernels/x64/jit_uni_eltwise_generic.cppindex fd5f975a784..2bad8c9f399 100644--- a/src/plugins/intel_cpu/src/nodes/kernels/x64/jit_uni_eltwise_generic.cpp+++ b/src/plugins/intel_cpu/src/nodes/kernels/x64/jit_uni_eltwise_generic.cpp@@ -445,6 +445,7 @@ std::shared_ptr<jit_emitter> jit_uni_eltwise_generic<isa>::create_eltwise_emitteOV_CASE(Algorithm::EltwisePrelu, jit_prelu_emitter),OV_CASE(Algorithm::EltwiseErf, jit_erf_emitter),OV_CASE(Algorithm::EltwiseSoftSign, jit_soft_sign_emitter),+ OV_CASE(Algorithm::EltwiseErfInv, jit_erfinv_emitter),OV_CASE(Algorithm::EltwiseIsFinite, jit_is_finite_emitter),OV_CASE(Algorithm::EltwiseIsInf, jit_is_inf_emitter),OV_CASE(Algorithm::EltwiseIsNaN, jit_is_nan_emitter),@@ -951,6 +952,7 @@ std::set<std::vector<element::Type>> eltwise_precision_helper::get_supported_preOV_CASE(Algorithm::EltwisePrelu, jit_prelu_emitter),OV_CASE(Algorithm::EltwiseErf, jit_erf_emitter),OV_CASE(Algorithm::EltwiseSoftSign, jit_soft_sign_emitter),+ OV_CASE(Algorithm::EltwiseErfInv, jit_erfinv_emitter),OV_CASE(Algorithm::EltwiseIsFinite, jit_is_finite_emitter),OV_CASE(Algorithm::EltwiseIsInf, jit_is_inf_emitter),OV_CASE(Algorithm::EltwiseIsNaN, jit_is_nan_emitter),diff --git a/src/plugins/intel_cpu/src/post_ops.cpp b/src/plugins/intel_cpu/src/post_ops.cppindex fbbd5af8c7d..e80e88ba6aa 100644--- a/src/plugins/intel_cpu/src/post_ops.cpp+++ b/src/plugins/intel_cpu/src/post_ops.cpp@@ -47,6 +47,7 @@ EltwiseKind getEltwiseKind(const Algorithm alg) {case Algorithm::EltwiseNegative:case Algorithm::EltwiseErf:case Algorithm::EltwiseSoftSign:+ case Algorithm::EltwiseErfInv:case Algorithm::EltwiseLog:return EltwiseKind::Activation;// ScaleShift algorithms@@ -206,6 +207,8 @@ ActivationPostOp::Type convertToActivationPostOpt(const Algorithm alg) {return ActivationPostOp::Type::erf;case Algorithm::EltwiseSoftSign:return ActivationPostOp::Type::soft_sign;+ case Algorithm::EltwiseErfInv:+ return ActivationPostOp::Type::erfinv;case Algorithm::EltwiseLog:return ActivationPostOp::Type::log;default:@@ -274,6 +277,8 @@ Algorithm convertToEltwiseAlgorithm(const ActivationPostOp::Type type) {return Algorithm::EltwiseErf;case ActivationPostOp::Type::soft_sign:return Algorithm::EltwiseSoftSign;+ case ActivationPostOp::Type::erfinv:+ return Algorithm::EltwiseErfInv;case ActivationPostOp::Type::log:return Algorithm::EltwiseLog;default:diff --git a/src/plugins/intel_cpu/src/post_ops.hpp b/src/plugins/intel_cpu/src/post_ops.hppindex a8c075f9173..f82941b2e65 100644--- a/src/plugins/intel_cpu/src/post_ops.hpp+++ b/src/plugins/intel_cpu/src/post_ops.hpp@@ -56,6 +56,7 @@ struct ActivationPostOp {ceiling,erf,soft_sign,+ erfinv,log,};diff --git a/src/plugins/intel_cpu/tests/functional/custom/single_layer_tests/classes/activation.cpp b/src/plugins/intel_cpu/tests/functional/custom/single_layer_tests/classes/activation.cppindex e7d3ad3c307..821c06bb0b8 100644--- a/src/plugins/intel_cpu/tests/functional/custom/single_layer_tests/classes/activation.cpp+++ b/src/plugins/intel_cpu/tests/functional/custom/single_layer_tests/classes/activation.cpp@@ -67,8 +67,9 @@ void ActivationLayerCPUTest::generate_inputs(const std::vector<ov::Shape>& targeresolution = 128;} else if (activationType == utils::ActivationTypes::Acos ||activationType == utils::ActivationTypes::Asin ||- activationType == utils::ActivationTypes::Atanh) {- // range [-1. 1] is required+ activationType == utils::ActivationTypes::Atanh ||+ activationType == utils::ActivationTypes::ErfInv) {+ // range [-1, 1] is required; edge values ±1 and |x|>1 are injected explicitly belowstartFrom = -1;range = 2;resolution = 128;@@ -100,6 +101,22 @@ void ActivationLayerCPUTest::generate_inputs(const std::vector<ov::Shape>& targe// cover Sign NAN test caseif ((activationType == utils::ActivationTypes::Sign) && funcInput.get_element_type() == ov::element::f32) {static_cast<float*>(tensor.data())[0] = std::numeric_limits<float>::quiet_NaN();+ } else if (activationType == utils::ActivationTypes::ErfInv && funcInput.get_element_type().is_real()) {+ const auto sz = tensor.get_size();+ auto inject = [&](size_t idx, float val) {+ if (idx >= sz) return;+ switch (funcInput.get_element_type()) {+ case ov::element::f32: static_cast<float*>(tensor.data())[idx] = val; break;+ case ov::element::f64: static_cast<double*>(tensor.data())[idx] = val; break;+ case ov::element::f16: static_cast<ov::float16*>(tensor.data())[idx] = val; break;+ case ov::element::bf16: static_cast<ov::bfloat16*>(tensor.data())[idx] = val; break;+ default: break;+ }+ };+ inject(0, 1.0f);+ inject(1, -1.0f);+ inject(2, 2.0f);+ inject(3, -1.5f);} else if ((activationType == utils::ActivationTypes::IsFinite) && funcInput.get_element_type() == ov::element::f32 && tensor.get_size() >= 5) {static_cast<float*>(tensor.data())[0] = std::numeric_limits<float>::quiet_NaN(); // nanstatic_cast<float*>(tensor.data())[1] = std::numeric_limits<float>::signaling_NaN(); // nan@@ -200,6 +217,7 @@ std::string ActivationLayerCPUTest::getPrimitiveType(const utils::ActivationType(activation_type == utils::ActivationTypes::RoundHalfToEven) ||(activation_type == utils::ActivationTypes::LeakyRelu) ||(activation_type == utils::ActivationTypes::PReLu) ||+ (activation_type == utils::ActivationTypes::ErfInv) ||(activation_type == utils::ActivationTypes::SoftPlus))) {return "jit";}@@ -210,6 +228,7 @@ std::string ActivationLayerCPUTest::getPrimitiveType(const utils::ActivationType}#endifif ((activation_type == utils::ActivationTypes::Erf) ||+ (activation_type == utils::ActivationTypes::ErfInv) ||(activation_type == utils::ActivationTypes::Floor) ||(activation_type == utils::ActivationTypes::Ceiling) ||(activation_type == utils::ActivationTypes::Negative) ||@@ -248,7 +267,8 @@ std::string ActivationLayerCPUTest::getPrimitiveType(const utils::ActivationType(activation_type == utils::ActivationTypes::Sigmoid) ||(activation_type == utils::ActivationTypes::SoftSign) ||(activation_type == utils::ActivationTypes::Sqrt) ||- (activation_type == utils::ActivationTypes::Tanh))+ (activation_type == utils::ActivationTypes::Tanh) ||+ (activation_type == utils::ActivationTypes::ErfInv))return "jit";}#endif@@ -300,6 +320,7 @@ const std::map<utils::ActivationTypes, std::vector<std::vector<float>>>& activat{IsNaN, {{}}},{RoundHalfToEven, {{}}},{RoundHalfAwayFromZero, {{}}},+ {ErfInv, {{}}},};return activationTypes;diff --git a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/single_layer_tests/activation.cpp b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/single_layer_tests/activation.cppindex 6c2dcb96196..b3f8f5d7ea4 100644--- a/src/plugins/intel_cpu/tests/functional/shared_tests_instances/single_layer_tests/activation.cpp+++ b/src/plugins/intel_cpu/tests/functional/shared_tests_instances/single_layer_tests/activation.cpp@@ -55,6 +55,7 @@ const std::map<ActivationTypes, std::vector<std::vector<float>>> activationTypes{ActivationTypes::GeluErf, {}},{ActivationTypes::GeluTanh, {}},{ActivationTypes::Swish, {{0.4f}}},+ {ActivationTypes::ErfInv, {}},{ActivationTypes::IsFinite, {}},{ActivationTypes::IsInf, {}},{ActivationTypes::IsNaN, {{}}},diff --git a/src/plugins/template/backend/ops/erfinv.cpp b/src/plugins/template/backend/ops/erfinv.cppnew file mode 100644index 00000000000..f4cf667f638--- /dev/null+++ b/src/plugins/template/backend/ops/erfinv.cpp@@ -0,0 +1,37 @@+// Copyright (C) 2018-2026 Intel Corporation+// SPDX-License-Identifier: Apache-2.0+//++#include "openvino/reference/erfinv.hpp"++#include "evaluate_node.hpp"+#include "openvino/core/type/element_type_traits.hpp"+#include "openvino/op/erfinv.hpp"++template <ov::element::Type_t ET>+bool evaluate(const std::shared_ptr<ov::op::v17::ErfInv>& op,+ ov::TensorVector& outputs,+ const ov::TensorVector& inputs) {+ using T = typename ov::element_type_traits<ET>::value_type;+ outputs[0].set_shape(inputs[0].get_shape());+ ov::reference::erfinv<T>(inputs[0].data<const T>(), outputs[0].data<T>(), ov::shape_size(inputs[0].get_shape()));+ return true;+}++template <>+bool evaluate_node<ov::op::v17::ErfInv>(std::shared_ptr<ov::Node> node,+ ov::TensorVector& outputs,+ const ov::TensorVector& inputs) {+ switch (node->get_output_element_type(0)) {+ case ov::element::bf16:+ return evaluate<ov::element::bf16>(ov::as_type_ptr<ov::op::v17::ErfInv>(node), outputs, inputs);+ case ov::element::f16:+ return evaluate<ov::element::f16>(ov::as_type_ptr<ov::op::v17::ErfInv>(node), outputs, inputs);+ case ov::element::f32:+ return evaluate<ov::element::f32>(ov::as_type_ptr<ov::op::v17::ErfInv>(node), outputs, inputs);+ case ov::element::f64:+ return evaluate<ov::element::f64>(ov::as_type_ptr<ov::op::v17::ErfInv>(node), outputs, inputs);+ default:+ OPENVINO_THROW("Unhandled data type ", node->get_element_type().get_type_name(), " in evaluate_node()");+ }+}diff --git a/src/plugins/template/backend/ops/ops_evaluates.hpp b/src/plugins/template/backend/ops/ops_evaluates.hppindex 3a02eeddcac..97967c3f6dc 100644--- a/src/plugins/template/backend/ops/ops_evaluates.hpp+++ b/src/plugins/template/backend/ops/ops_evaluates.hpp@@ -560,6 +560,10 @@ extern template bool evaluate_node<ov::op::v15::SearchSorted>(std::shared_ptr<ovov::TensorVector& outputs,const ov::TensorVector& inputs);+extern template bool evaluate_node<ov::op::v17::ErfInv>(std::shared_ptr<ov::Node> node,+ ov::TensorVector& outputs,+ const ov::TensorVector& inputs);+extern template bool evaluate_node<ov::op::v16::Identity>(std::shared_ptr<ov::Node> node,ov::TensorVector& outputs,const ov::TensorVector& inputs);diff --git a/src/plugins/template/backend/opset_int_tbl.hpp b/src/plugins/template/backend/opset_int_tbl.hppindex b1bb5313a75..f056971e5d4 100644--- a/src/plugins/template/backend/opset_int_tbl.hpp+++ b/src/plugins/template/backend/opset_int_tbl.hpp@@ -178,6 +178,7 @@ _OPENVINO_OP_REG(SliceScatter, ov::op::v15)_OPENVINO_OP_REG(SearchSorted, ov::op::v15)_OPENVINO_OP_REG(AvgPool, ov::op::v16)+_OPENVINO_OP_REG(ErfInv, ov::op::v17)_OPENVINO_OP_REG(Identity, ov::op::v16)_OPENVINO_OP_REG(ISTFT, ov::op::v16)_OPENVINO_OP_REG(SegmentMax, ov::op::v16)diff --git a/src/plugins/template/tests/functional/op_reference/erfinv.cpp b/src/plugins/template/tests/functional/op_reference/erfinv.cppnew file mode 100644index 00000000000..e735e4b2999--- /dev/null+++ b/src/plugins/template/tests/functional/op_reference/erfinv.cpp@@ -0,0 +1,164 @@+// Copyright (C) 2018-2026 Intel Corporation+// SPDX-License-Identifier: Apache-2.0+//++#include "openvino/op/erfinv.hpp"++#include <gtest/gtest.h>++#include <cmath>+#include <limits>++#include "base_reference_test.hpp"++namespace {+struct ErfInvParams {+ template <class IT>+ ErfInvParams(const ov::PartialShape& shape,+ const ov::element::Type& iType,+ const std::vector<IT>& iValues,+ const std::vector<IT>& oValues)+ : pshape(shape),+ inType(iType),+ outType(iType),+ inputData(reference_tests::CreateTensor(iType, iValues)),+ refData(reference_tests::CreateTensor(iType, oValues)) {}++ ov::PartialShape pshape;+ ov::element::Type inType;+ ov::element::Type outType;+ ov::Tensor inputData;+ ov::Tensor refData;+};++class ReferenceErfInvLayerTest : public testing::TestWithParam<ErfInvParams>,+ public reference_tests::CommonReferenceTest {+public:+ void SetUp() override {+ auto params = GetParam();+ function = CreateFunction(params.pshape, params.inType);+ inputData = {params.inputData};+ refOutData = {params.refData};+ }+ static std::string getTestCaseName(const testing::TestParamInfo<ErfInvParams>& obj) {+ auto param = obj.param;+ std::ostringstream result;+ result << "shape=" << param.pshape << "_";+ result << "iType=" << param.inType << "_";+ result << "oType=" << param.outType;+ return result.str();+ }++private:+ static std::shared_ptr<ov::Model> CreateFunction(const ov::PartialShape& input_shape,+ const ov::element::Type& input_type) {+ const auto in = std::make_shared<ov::op::v0::Parameter>(input_type, input_shape);+ const auto erfinv = std::make_shared<ov::op::v17::ErfInv>(in);+ return std::make_shared<ov::Model>(ov::OutputVector{erfinv}, ov::ParameterVector{in});+ }+};++TEST_P(ReferenceErfInvLayerTest, CompareWithRefs) {+ Exec();+}++template <ov::element::Type_t IN_ET>+std::vector<ErfInvParams> generateErfInvFloatParams() {+ using T = typename ov::element_type_traits<IN_ET>::value_type;++ // Expected values computed from the Giles (2010) approximation at float32 precision.+ // The symmetric property erfinv(-x) = -erfinv(x) is verified across the full domain.+ std::vector<ErfInvParams> params{+ // Zero — must be exactly 0+ ErfInvParams(ov::PartialShape{1}, IN_ET, std::vector<T>{T(0.0f)}, std::vector<T>{T(0.0f)}),+ // Small-to-mid domain: ±0.1, ±0.3, ±0.5+ ErfInvParams(ov::PartialShape{6},+ IN_ET,+ std::vector<T>{T(0.1f), T(-0.1f), T(0.3f), T(-0.3f), T(0.5f), T(-0.5f)},+ std::vector<T>{T(0.08885599f),+ T(-0.08885599f),+ T(0.27246271f),+ T(-0.27246271f),+ T(0.47693628f),+ T(-0.47693628f)}),+ // Mid-to-large domain: ±0.7, ±0.9+ ErfInvParams(ov::PartialShape{4},+ IN_ET,+ std::vector<T>{T(0.7f), T(-0.7f), T(0.9f), T(-0.9f)},+ std::vector<T>{T(0.73286909f), T(-0.73286909f), T(1.16308725f), T(-1.16308725f)}),+ // Boundary: x=±1 → ±inf+ ErfInvParams(+ ov::PartialShape{2},+ IN_ET,+ std::vector<T>{T(1.0f), T(-1.0f)},+ std::vector<T>{T(std::numeric_limits<float>::infinity()), T(-std::numeric_limits<float>::infinity())}),+ };+ return params;+}++// f64 uses higher-precision expected values from the Giles double-precision path.+std::vector<ErfInvParams> generateErfInvF64Params() {+ std::vector<ErfInvParams> params{+ ErfInvParams(ov::PartialShape{7},+ ov::element::f64,+ std::vector<double>{0.0, 0.1, -0.1, 0.5, -0.5, 0.9, -0.9},+ std::vector<double>{0.0,+ 0.08885599049425768,+ -0.08885599049425768,+ 0.4769362762044699,+ -0.4769362762044699,+ 1.1630871536766741,+ -1.1630871536766741}),+ ErfInvParams(+ ov::PartialShape{2},+ ov::element::f64,+ std::vector<double>{1.0, -1.0},+ std::vector<double>{std::numeric_limits<double>::infinity(), -std::numeric_limits<double>::infinity()}),+ };+ return params;+}++std::vector<ErfInvParams> generateErfInvCombinedParams() {+ const std::vector<std::vector<ErfInvParams>> typeParams{generateErfInvFloatParams<ov::element::Type_t::f32>(),+ generateErfInvFloatParams<ov::element::Type_t::f16>(),+ generateErfInvFloatParams<ov::element::Type_t::bf16>(),+ generateErfInvF64Params()};+ std::vector<ErfInvParams> combinedParams;+ for (const auto& p : typeParams) {+ combinedParams.insert(combinedParams.end(), p.begin(), p.end());+ }+ return combinedParams;+}++INSTANTIATE_TEST_SUITE_P(smoke_ErfInv_With_Hardcoded_Refs,+ ReferenceErfInvLayerTest,+ testing::ValuesIn(generateErfInvCombinedParams()),+ ReferenceErfInvLayerTest::getTestCaseName);++// Dedicated edge-case test: |x|>1 must produce NaN, x=±1 must produce ±inf.+class ReferenceErfInvEdgeCaseTest : public reference_tests::CommonReferenceTest {+public:+ void SetUp() {+ const auto in = std::make_shared<ov::op::v0::Parameter>(ov::element::f32, ov::Shape{4});+ function = std::make_shared<ov::Model>(ov::OutputVector{std::make_shared<ov::op::v17::ErfInv>(in)},+ ov::ParameterVector{in});+ // inputs: two out-of-domain values, then the two boundary values+ inputData = {reference_tests::CreateTensor(ov::element::f32, std::vector<float>{2.0f, -1.5f, 1.0f, -1.0f})};+ }++ void Validate() override {+ const auto* data = inferRequest.get_tensor(executableNetwork.output(0)).data<float>();+ EXPECT_TRUE(std::isnan(data[0])) << "erfinv(2) expected NaN, got " << data[0];+ EXPECT_TRUE(std::isnan(data[1])) << "erfinv(-1.5) expected NaN, got " << data[1];+ EXPECT_TRUE(std::isinf(data[2]) && data[2] > 0) << "erfinv(1) expected +inf, got " << data[2];+ EXPECT_TRUE(std::isinf(data[3]) && data[3] < 0) << "erfinv(-1) expected -inf, got " << data[3];+ }+};++TEST(ErfInvEdgeCases, OutOfDomainAndBoundary) {+ ReferenceErfInvEdgeCaseTest test;+ test.SetUp();+ test.Exec();+}++} // namespacediff --git a/src/tests/functional/base_func_tests/src/base/utils/compare_results.cpp b/src/tests/functional/base_func_tests/src/base/utils/compare_results.cppindex 6e7025d68d3..9bf67d524b3 100644--- a/src/tests/functional/base_func_tests/src/base/utils/compare_results.cpp+++ b/src/tests/functional/base_func_tests/src/base/utils/compare_results.cpp@@ -207,6 +207,7 @@ OPENVINO_SUPPRESS_DEPRECATED_START#include "openvino/opsets/opset14_tbl.hpp"#include "openvino/opsets/opset15_tbl.hpp"#include "openvino/opsets/opset16_tbl.hpp"+#include "openvino/opsets/opset17_tbl.hpp"#include "ov_ops/opset_private_tbl.hpp"#undef _OPENVINO_OP_REGdiff --git a/src/tests/functional/plugin/conformance/test_runner/op_conformance_runner/src/op_impl_check/single_op_graph.cpp b/src/tests/functional/plugin/conformance/test_runner/op_conformance_runner/src/op_impl_check/single_op_graph.cppindex 19445a1427d..9dccea3402e 100644--- a/src/tests/functional/plugin/conformance/test_runner/op_conformance_runner/src/op_impl_check/single_op_graph.cpp+++ b/src/tests/functional/plugin/conformance/test_runner/op_conformance_runner/src/op_impl_check/single_op_graph.cpp@@ -1557,6 +1557,8 @@ std::shared_ptr<ov::Model> generateUnaryEltwise(const std::shared_ptr<ov::op::OpeltwiseNode = std::make_shared<ov::op::v0::Elu>(param, 0.5f);} else if (ov::is_type<ov::op::v0::Erf>(node)) {eltwiseNode = std::make_shared<ov::op::v0::Erf>(param);+ } else if (ov::is_type<ov::op::v17::ErfInv>(node)) {+ eltwiseNode = std::make_shared<ov::op::v17::ErfInv>(param);} else if (ov::is_type<ov::op::v0::Exp>(node)) {eltwiseNode = std::make_shared<ov::op::v0::Exp>(param);} else if (ov::is_type<ov::op::v0::Floor>(node)) {diff --git a/src/tests/functional/plugin/shared/include/shared_test_classes/single_op/activation.hpp b/src/tests/functional/plugin/shared/include/shared_test_classes/single_op/activation.hppindex 49dbb5e3270..de7f3a56e4a 100644--- a/src/tests/functional/plugin/shared/include/shared_test_classes/single_op/activation.hpp+++ b/src/tests/functional/plugin/shared/include/shared_test_classes/single_op/activation.hpp@@ -67,6 +67,7 @@ static std::map<ActivationTypes, std::string> activationNames = {{ActivationTypes::GeluErf, "GeluErf"},{ActivationTypes::GeluTanh, "GeluTanh"},{ActivationTypes::SoftSign, "SoftSign"},+ {ActivationTypes::ErfInv, "ErfInv"},{ActivationTypes::IsInf, "IsInf"},{ActivationTypes::IsFinite, "IsFinite"},{ActivationTypes::IsNaN, "IsNaN"},diff --git a/src/tests/functional/plugin/shared/src/single_op/activation.cpp b/src/tests/functional/plugin/shared/src/single_op/activation.cppindex 164b0425a1f..eab3a5ac4b0 100644--- a/src/tests/functional/plugin/shared/src/single_op/activation.cpp+++ b/src/tests/functional/plugin/shared/src/single_op/activation.cpp@@ -59,6 +59,14 @@ void ActivationLayerTest::generate_inputs(const std::vector<ov::Shape>& targetInresolution = 32768;break;}+ case ActivationTypes::ErfInv: {+ // Valid domain is (-1, 1); use full range to exercise in-domain accuracy.+ // Edge values ±1 and |x|>1 are injected explicitly below.+ data_start_from = -1;+ data_range = 2;+ resolution = 32768;+ break;+ }case ActivationTypes::Ceiling: {data_start_from = -1000;data_range = 2000;@@ -114,6 +122,24 @@ void ActivationLayerTest::generate_inputs(const std::vector<ov::Shape>& targetIndata_range,data_start_from,resolution, 1);+ // Inject boundary/out-of-domain values so x=±1 (→±inf) and |x|>1 (→NaN) are always exercised.+ if (activationDecl.first == ActivationTypes::ErfInv && funcInput->get_element_type().is_real()) {+ const auto sz = data_tensor.get_size();+ auto inject = [&](size_t idx, float val) {+ if (idx >= sz) return;+ switch (funcInput->get_element_type()) {+ case ov::element::f32: static_cast<float*>(data_tensor.data())[idx] = val; break;+ case ov::element::f64: static_cast<double*>(data_tensor.data())[idx] = val; break;+ case ov::element::f16: static_cast<ov::float16*>(data_tensor.data())[idx] = val; break;+ case ov::element::bf16: static_cast<ov::bfloat16*>(data_tensor.data())[idx] = val; break;+ default: break;+ }+ };+ inject(0, 1.0f);+ inject(1, -1.0f);+ inject(2, 2.0f);+ inject(3, -1.5f);+ }inputs.insert({funcInput->get_node_shared_ptr(), data_tensor});}diff --git a/src/tests/test_utils/common_test_utils/include/common_test_utils/test_enums.hpp b/src/tests/test_utils/common_test_utils/include/common_test_utils/test_enums.hppindex af240ab9163..4e534c6892c 100644--- a/src/tests/test_utils/common_test_utils/include/common_test_utils/test_enums.hpp+++ b/src/tests/test_utils/common_test_utils/include/common_test_utils/test_enums.hpp@@ -126,6 +126,7 @@ enum ActivationTypes {GeluErf,GeluTanh,SoftSign,+ ErfInv,IsFinite,IsInf,IsNaN,diff --git a/src/tests/test_utils/common_test_utils/src/node_builders/activation.cpp b/src/tests/test_utils/common_test_utils/src/node_builders/activation.cppindex 77d26ca44f3..12715ab8f36 100644--- a/src/tests/test_utils/common_test_utils/src/node_builders/activation.cpp+++ b/src/tests/test_utils/common_test_utils/src/node_builders/activation.cpp@@ -18,6 +18,7 @@#include "openvino/op/cosh.hpp"#include "openvino/op/elu.hpp"#include "openvino/op/erf.hpp"+#include "openvino/op/erfinv.hpp"#include "openvino/op/exp.hpp"#include "openvino/op/floor.hpp"#include "openvino/op/gelu.hpp"@@ -148,6 +149,8 @@ std::shared_ptr<ov::Node> make_activation(const ov::Output<Node>& in,return std::make_shared<ov::op::v7::Gelu>(in, ov::op::GeluApproximationMode::TANH);case ov::test::utils::ActivationTypes::SoftSign:return std::make_shared<ov::op::v9::SoftSign>(in);+ case ov::test::utils::ActivationTypes::ErfInv:+ return std::make_shared<ov::op::v17::ErfInv>(in);case ov::test::utils::ActivationTypes::IsFinite:return std::make_shared<ov::op::v10::IsFinite>(in);case ov::test::utils::ActivationTypes::IsInf: