From 80fad20c17897d2dfea1daabfd57b05f277a6a8e Mon Sep 17 00:00:00 2001 From: eshoguli Date: Tue, 17 Oct 2023 14:06:28 +0100 Subject: [PATCH] refactoring & comment fixes --- src/plugins/intel_cpu/src/nodes/eltwise.cpp | 282 ++++++++++-------- .../single_layer_tests/classes/eltwise.cpp | 82 +++-- .../instances/common/eltwise.cpp | 6 +- .../functional/test_utils/cpu_test_utils.cpp | 4 +- .../ov_helpers/ov_models/src/input_layer.cpp | 7 +- .../skip_configs/CPU/expected_failures_OP.csv | 4 - 6 files changed, 218 insertions(+), 167 deletions(-) diff --git a/src/plugins/intel_cpu/src/nodes/eltwise.cpp b/src/plugins/intel_cpu/src/nodes/eltwise.cpp index c736c869eefe31..48d20cf0a2a206 100644 --- a/src/plugins/intel_cpu/src/nodes/eltwise.cpp +++ b/src/plugins/intel_cpu/src/nodes/eltwise.cpp @@ -1557,21 +1557,12 @@ class EltwiseJitExecutor : public Eltwise::IEltwiseExecutor { /* enabled only for float at float16_t at the moment * can be extended in the future */ -template::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value> - ::type* = nullptr> -class EltwiseRefExecutor : public Eltwise::IEltwiseExecutor { +template +class EltwiseRefBaseExecutor : public Eltwise::IEltwiseExecutor { public: - EltwiseRefExecutor(Eltwise::EltwiseData opData, - const VectorDims& outBlkDims, - std::vector inpDims) + EltwiseRefBaseExecutor(Eltwise::EltwiseData opData, + const VectorDims& outBlkDims, + std::vector inpDims) : _opData(std::move(opData)), _inpDims(inpDims) { if (inpDims.empty()) { IE_THROW() << "Can not make Eltwise executor from empty input dims array"; @@ -1613,47 +1604,114 @@ class EltwiseRefExecutor : public Eltwise::IEltwiseExecutor { } } + const VectorDims& getOutDims() const override { + return _dims; + } + + size_t getBatchDimIdx() const override { + return _batchDimIdx; + } + +protected: + void init_ptr(const jit_eltwise_call_args_ptrs& args_ptrs, + const VectorDims& dims_out, + std::vector& counters, + const size_t iwork, + std::vector& src_f, + T*& dst_ptr_f) { + size_t tmp = iwork; + for (ptrdiff_t j = dims_out.size() - 1; j >= 0; j--) { + counters[j] = tmp % dims_out[j]; + tmp /= dims_out[j]; + } + + size_t index_in[MAX_ELTWISE_INPUTS] = { 0 }; + for (size_t i = 0; i < _inputNum; i++) { + index_in[i] = 0; + for (size_t j = 0; j < counters.size(); j++) { + index_in[i] += counters[j] * _src_offsets[i][j]; + } + index_in[i] /= sizeof(T); + } + + size_t index_out = 0; + for (size_t j = 0; j < counters.size(); j++) { + index_out += counters[j] * _dst_offsets[j]; + } + index_out /= sizeof(T); + + //std::vector src_f(_inputNum); + for (size_t i = 0; i < _inputNum; i++) { + src_f[i] = (reinterpret_cast(args_ptrs.src_ptr[i]) + index_in[i])[0]; + } + dst_ptr_f = reinterpret_cast(args_ptrs.dst_ptr) + index_out; + } + + const Eltwise::EltwiseData _opData; + VectorDims _dims; + VectorDims _src_offsets[MAX_ELTWISE_INPUTS]; + VectorDims _dst_offsets; + size_t _fullWorkAmount = 0; + size_t _inputNum = 0; + size_t _batchDimIdx = 0; + std::vector _inpDims; +}; + +/* enabled only for float at float16_t at the moment + * can be extended in the future */ +template::value || + std::is_same::value> + ::type * = nullptr> +class EltwiseRefExecutor : public EltwiseRefBaseExecutor { +public: + EltwiseRefExecutor(Eltwise::EltwiseData opData, + const VectorDims& outBlkDims, + std::vector inpDims) : EltwiseRefBaseExecutor(opData, outBlkDims, inpDims) { + } + void exec(const jit_eltwise_call_args_ptrs &args_ptrs, const VectorDims &dims_out) override { - if (_opData.algo == Algorithm::EltwiseLog) { + if (this->_opData.algo == Algorithm::EltwiseLog) { const T* src_ptr_f = reinterpret_cast(args_ptrs.src_ptr[0]); T* dst_ptr_f = reinterpret_cast(args_ptrs.dst_ptr); - parallel_for(_fullWorkAmount, [&](size_t i) { + parallel_for(this->_fullWorkAmount, [&](size_t i) { dst_ptr_f[i] = logf(src_ptr_f[i]); }); return; } - if (_opData.algo == Algorithm::EltwisePowerStatic) { + if (this->_opData.algo == Algorithm::EltwisePowerStatic) { const T* src_ptr_f = reinterpret_cast(args_ptrs.src_ptr[0]); T* dst_ptr_f = reinterpret_cast(args_ptrs.dst_ptr); - if (_opData.alpha == 2) { - parallel_for(_fullWorkAmount, [&](size_t i) { - dst_ptr_f[i] = (_opData.beta * src_ptr_f[i] + _opData.gamma) * - (_opData.beta * src_ptr_f[i] + _opData.gamma); + if (this->_opData.alpha == 2) { + parallel_for(this->_fullWorkAmount, [&](size_t i) { + dst_ptr_f[i] = (this->_opData.beta * src_ptr_f[i] + this->_opData.gamma) * + (this->_opData.beta * src_ptr_f[i] + this->_opData.gamma); }); } else { - parallel_for(_fullWorkAmount, [&](size_t i) { - dst_ptr_f[i] = powf(_opData.beta * src_ptr_f[i] + _opData.gamma, _opData.alpha); + parallel_for(this->_fullWorkAmount, [&](size_t i) { + dst_ptr_f[i] = powf(this->_opData.beta * src_ptr_f[i] + this->_opData.gamma, this->_opData.alpha); }); } return; } - if (_opData.algo == Algorithm::EltwisePowerDynamic) { + if (this->_opData.algo == Algorithm::EltwisePowerDynamic) { const T* src_ptr_f = reinterpret_cast(args_ptrs.src_ptr[0]); const T* src_ptr_f_pow = reinterpret_cast(args_ptrs.src_ptr[1]); T* dst_ptr_f = reinterpret_cast(args_ptrs.dst_ptr); uint32_t count_of_power_values = 1; - for (unsigned long i : _inpDims[1]) { + for (unsigned long i : this->_inpDims[1]) { count_of_power_values *= i; } if (count_of_power_values == 1) { if (src_ptr_f_pow[0] != 2) { - parallel_for(_fullWorkAmount, [&](size_t i) { + parallel_for(this->_fullWorkAmount, [&](size_t i) { dst_ptr_f[i] = powf(src_ptr_f[i], src_ptr_f_pow[0]); }); } else { - parallel_for(_fullWorkAmount, [&](size_t i) { + parallel_for(this->_fullWorkAmount, [&](size_t i) { dst_ptr_f[i] = src_ptr_f[i] * src_ptr_f[i]; }); } @@ -1662,46 +1720,23 @@ class EltwiseRefExecutor : public Eltwise::IEltwiseExecutor { } std::shared_ptr ref_eltwise_injector = nullptr; - if (_opData.onednnAlgorithm != dnnl::algorithm::undef) { + if (this->_opData.onednnAlgorithm != dnnl::algorithm::undef) { ref_eltwise_injector = std::make_shared( - static_cast(_opData.onednnAlgorithm), _opData.alpha, _opData.beta, 1.f); + static_cast(this->_opData.onednnAlgorithm), this->_opData.alpha, this->_opData.beta, 1.f); } parallel_nt(0, [&](const int ithr, const int nthr) { size_t start = 0, end = 0; - splitter(_fullWorkAmount, nthr, ithr, start, end); + splitter(this->_fullWorkAmount, nthr, ithr, start, end); std::vector counters(dims_out.size(), 0); for (size_t iwork = start; iwork < end; ++iwork) { - size_t tmp = iwork; - for (ptrdiff_t j = dims_out.size() - 1; j >= 0; j--) { - counters[j] = tmp % dims_out[j]; - tmp /= dims_out[j]; - } - - size_t index_in[MAX_ELTWISE_INPUTS] = {0}; - for (size_t i = 0; i < _inputNum; i++) { - index_in[i] = 0; - for (size_t j = 0; j < counters.size(); j++) { - index_in[i] += counters[j] * _src_offsets[i][j]; - } - index_in[i] /= sizeof(T); - } - - size_t index_out = 0; - for (size_t j = 0; j < counters.size(); j++) { - index_out += counters[j] * _dst_offsets[j]; - } - index_out /= sizeof(T); + std::vector src_f(this->_inputNum); + T* dst_ptr_f; + this->init_ptr(args_ptrs, dims_out, counters, iwork, src_f, dst_ptr_f); - std::vector src_f(_inputNum); - for (size_t i = 0; i < _inputNum; i++) { - src_f[i] = (reinterpret_cast(args_ptrs.src_ptr[i]) + index_in[i])[0]; - } - T* dst_ptr_f = reinterpret_cast(args_ptrs.dst_ptr) + index_out; - - switch (_opData.algo) { + switch (this->_opData.algo) { case Algorithm::EltwiseRelu: case Algorithm::EltwiseGeluErf: case Algorithm::EltwiseGeluTanh: @@ -1748,8 +1783,8 @@ class EltwiseRefExecutor : public Eltwise::IEltwiseExecutor { // @todo implement proper isinfinite for non-float precisions case Algorithm::EltwiseIsFinite: *dst_ptr_f = std::isfinite(static_cast(src_f[0])); break; case Algorithm::EltwiseIsInf: - *dst_ptr_f = (_opData.alpha && (src_f[0] == -std::numeric_limits::infinity())) || - (_opData.beta && (src_f[0] == std::numeric_limits::infinity())); + *dst_ptr_f = (this->_opData.alpha && (src_f[0] == -std::numeric_limits::infinity())) || + (this->_opData.beta && (src_f[0] == std::numeric_limits::infinity())); break; case Algorithm::EltwiseIsNaN: { if (sizeof(T) == 4) { @@ -1760,56 +1795,61 @@ class EltwiseRefExecutor : public Eltwise::IEltwiseExecutor { break; } case Algorithm::EltwiseSelect: *dst_ptr_f = src_f[0] ? src_f[1] : src_f[2]; break; + default: IE_THROW() << "Unsupported operation type for Eltwise executor"; + } + } + }); + } +}; + +template::value || + std::is_same::value || + std::is_same::value || + std::is_same::value || + std::is_same::value> + ::type * = nullptr> +class BitwiseRefExecutor : public EltwiseRefBaseExecutor { +public: + BitwiseRefExecutor(Eltwise::EltwiseData opData, + const VectorDims& outBlkDims, + std::vector inpDims) : EltwiseRefBaseExecutor(opData, outBlkDims, inpDims) { + } + + void exec(const jit_eltwise_call_args_ptrs &args_ptrs, const VectorDims &dims_out) override { + std::shared_ptr ref_eltwise_injector = nullptr; + if (this->_opData.onednnAlgorithm != dnnl::algorithm::undef) { + ref_eltwise_injector = std::make_shared( + static_cast(this->_opData.onednnAlgorithm), this->_opData.alpha, this->_opData.beta, 1.f); + } + + parallel_nt(0, [&](const int ithr, const int nthr) { + size_t start = 0, end = 0; + splitter(this->_fullWorkAmount, nthr, ithr, start, end); + + std::vector counters(dims_out.size(), 0); + + for (size_t iwork = start; iwork < end; ++iwork) { + std::vector src_f(this->_inputNum); + T* dst_ptr_f; + this->init_ptr(args_ptrs, dims_out, counters, iwork, src_f, dst_ptr_f); + + switch (this->_opData.algo) { case Algorithm::EltwiseBitwiseAnd: { - const auto size = sizeof(T); - if (size == 1) { - *dst_ptr_f = static_cast(src_f[0]) & static_cast(src_f[1]); - } else if (size == 2) { - *dst_ptr_f = static_cast(src_f[0]) & static_cast(src_f[1]); - } else if (size == 4) { - *dst_ptr_f = static_cast(src_f[0]) & static_cast(src_f[1]); - } else { - IE_THROW() << "Unsupported operation type for EltwiseBitwiseAnd"; - } + *dst_ptr_f = src_f[0] & src_f[1]; break; } case Algorithm::EltwiseBitwiseNot: { - const auto size = sizeof(T); - if (size == 1) { - *dst_ptr_f = ~static_cast(src_f[0]); - } else if (size == 2) { - *dst_ptr_f = ~static_cast(src_f[0]); - } else if (size == 4) { - *dst_ptr_f = ~static_cast(src_f[0]); - } else { - IE_THROW() << "Unsupported operation type for EltwiseBitwiseNot"; - } + *dst_ptr_f = ~src_f[0]; break; } case Algorithm::EltwiseBitwiseOr: { - const auto size = sizeof(T); - if (size == 1) { - *dst_ptr_f = static_cast(src_f[0]) | static_cast(src_f[1]); - } else if (size == 2) { - *dst_ptr_f = static_cast(src_f[0]) | static_cast(src_f[1]); - } else if (size == 4) { - *dst_ptr_f = static_cast(src_f[0]) | static_cast(src_f[1]); - } else { - IE_THROW() << "Unsupported operation type for EltwiseBitwiseOr"; - } + *dst_ptr_f = src_f[0] | src_f[1]; break; } case Algorithm::EltwiseBitwiseXor: { - const auto size = sizeof(T); - if (size == 1) { - *dst_ptr_f = static_cast(src_f[0]) ^ static_cast(src_f[1]); - } else if (size == 2) { - *dst_ptr_f = static_cast(src_f[0]) ^ static_cast(src_f[1]); - } else if (size == 4) { - *dst_ptr_f = static_cast(src_f[0]) ^ static_cast(src_f[1]); - } else { - IE_THROW() << "Unsupported operation type for EltwiseBitwiseXor"; - } + *dst_ptr_f = src_f[0] ^ src_f[1]; break; } default: IE_THROW() << "Unsupported operation type for Eltwise executor"; @@ -1817,24 +1857,6 @@ class EltwiseRefExecutor : public Eltwise::IEltwiseExecutor { } }); } - - const VectorDims& getOutDims() const override { - return _dims; - } - - size_t getBatchDimIdx() const override { - return _batchDimIdx; - } - -private: - const Eltwise::EltwiseData _opData; - VectorDims _dims; - VectorDims _src_offsets[MAX_ELTWISE_INPUTS]; - VectorDims _dst_offsets; - size_t _fullWorkAmount = 0; - size_t _inputNum = 0; - size_t _batchDimIdx = 0; - std::vector _inpDims; }; } // namespace @@ -1854,31 +1876,31 @@ static Eltwise::executorPtr buildRefExecutor(const EltwiseKey& key) { key.outBlkDims, key.inpDims); case Precision::I8: - return std::make_shared::value_type>>( + return std::make_shared::value_type>>( key.eltwise_data.front(), key.outBlkDims, key.inpDims); case Precision::U8: - return std::make_shared::value_type>>( + return std::make_shared::value_type>>( key.eltwise_data.front(), key.outBlkDims, key.inpDims); case Precision::I16: - return std::make_shared::value_type>>( + return std::make_shared::value_type>>( key.eltwise_data.front(), key.outBlkDims, key.inpDims); case Precision::U16: - return std::make_shared::value_type>>( + return std::make_shared::value_type>>( key.eltwise_data.front(), key.outBlkDims, key.inpDims); # case Precision::I32: - return std::make_shared::value_type>>( + return std::make_shared::value_type>>( key.eltwise_data.front(), key.outBlkDims, key.inpDims); @@ -2120,6 +2142,16 @@ void Eltwise::initSupportedPrimitiveDescriptors() { } #if defined(OV_CPU_WITH_ACL) + auto filterPrecision = [&](const Precision& prc, const Precision& forcedPrec) { + if (isBitwise(algorithm)) { + if (std::find(supportedPrecisions.begin(), supportedPrecisions.end(), prc) == supportedPrecisions.end()) { + IE_THROW() << "Eltwise node with name `" << getName() << "` doesn't support " << prc << " precision."; + } + return prc; + } + return forcedPrec; + }; + // Use original output precision as a reference point since some eltwise algorithms have non-float inputs (i.e. EltwiseSelect) Precision forcedPrec = getOriginalOutputPrecisionAtPort(0) == Precision::FP16 ? Precision::FP16 : Precision::FP32; // ACL implementation supports only identical precisions on inputs/outputs so they are aligned it to highest one @@ -2137,11 +2169,11 @@ void Eltwise::initSupportedPrimitiveDescriptors() { } for (size_t i = 0; i < inputPrecisions.size(); i++) { - inputPrecisions[i] = forcedPrec; + inputPrecisions[i] = filterPrecision(inputPrecisions[i], forcedPrec); } - outputPrecision = forcedPrec; + outputPrecision = filterPrecision(outputPrecision, forcedPrec); #else - auto filterPrecision = [&](Precision& prc) { + auto filterPrecision = [&](const Precision& prc) { if (implType == EltwiseImplType::reference) { if (isBitwise(algorithm)) { if (std::find(supportedPrecisions.begin(), supportedPrecisions.end(), prc) == supportedPrecisions.end()) { diff --git a/src/plugins/intel_cpu/tests/functional/single_layer_tests/classes/eltwise.cpp b/src/plugins/intel_cpu/tests/functional/single_layer_tests/classes/eltwise.cpp index 9925c59130c5c2..9e7337aa934a81 100644 --- a/src/plugins/intel_cpu/tests/functional/single_layer_tests/classes/eltwise.cpp +++ b/src/plugins/intel_cpu/tests/functional/single_layer_tests/classes/eltwise.cpp @@ -158,42 +158,58 @@ void EltwiseLayerCPUTest::SetUp() { } ov::ParameterVector parameters{std::make_shared(netType, inputDynamicShapes.front())}; std::shared_ptr secondaryInput; - if (secondaryInputType == ngraph::helpers::InputLayerType::PARAMETER) { - auto param = std::make_shared(netType, inputDynamicShapes.back()); - secondaryInput = param; - parameters.push_back(param); - } else { - auto pShape = inputDynamicShapes.back(); - ngraph::Shape shape; - if (pShape.is_static()) { - shape = pShape.get_shape(); - } else { - ASSERT_TRUE(pShape.rank().is_static()); - shape = std::vector(pShape.rank().get_length(), 1); - for (size_t i = 0; i < pShape.size(); ++i) { - if (pShape[i].is_static()) { - shape[i] = pShape[i].get_length(); + switch (secondaryInputType) { + case ngraph::helpers::InputLayerType::PARAMETER: { + auto param = std::make_shared(netType, inputDynamicShapes.back()); + secondaryInput = param; + parameters.push_back(param); + break; + } + case ngraph::helpers::InputLayerType::CONSTANT: { + auto pShape = inputDynamicShapes.back(); + ngraph::Shape shape; + if (pShape.is_static()) { + shape = pShape.get_shape(); + } else { + ASSERT_TRUE(pShape.rank().is_static()); + shape = std::vector(pShape.rank().get_length(), 1); + for (size_t i = 0; i < pShape.size(); ++i) { + if (pShape[i].is_static()) { + shape[i] = pShape[i].get_length(); + } } } - } - auto data_tensor = generate_eltwise_input(netType, shape); - if ((netType == ElementType::i8) || (netType == ElementType::u8)) { - auto data_ptr = reinterpret_cast(data_tensor.data()); - std::vector data(data_ptr, data_ptr + ngraph::shape_size(shape)); - secondaryInput = ngraph::builder::makeConstant(netType, shape, data); - } else if ((netType == ElementType::i16) || (netType == ElementType::u16)) { - auto data_ptr = reinterpret_cast(data_tensor.data()); - std::vector data(data_ptr, data_ptr + ngraph::shape_size(shape)); - secondaryInput = ngraph::builder::makeConstant(netType, shape, data); - } else if ((netType == ElementType::i32) || (netType == ElementType::i32)) { - auto data_ptr = reinterpret_cast(data_tensor.data()); - std::vector data(data_ptr, data_ptr + ngraph::shape_size(shape)); - secondaryInput = ngraph::builder::makeConstant(netType, shape, data); - } else { - auto data_ptr = reinterpret_cast(data_tensor.data()); - std::vector data(data_ptr, data_ptr + ngraph::shape_size(shape)); - secondaryInput = ngraph::builder::makeConstant(netType, shape, data); + auto data_tensor = generate_eltwise_input(netType, shape); + if ((netType == ElementType::i8) || (netType == ElementType::u8)) { + auto data_ptr = reinterpret_cast(data_tensor.data()); + std::vector data(data_ptr, data_ptr + ngraph::shape_size(shape)); + secondaryInput = ngraph::builder::makeConstant(netType, shape, data); + } else if ((netType == ElementType::i16) || (netType == ElementType::u16)) { + auto data_ptr = reinterpret_cast(data_tensor.data()); + std::vector data(data_ptr, data_ptr + ngraph::shape_size(shape)); + secondaryInput = ngraph::builder::makeConstant(netType, shape, data); + } else if ((netType == ElementType::i32) || (netType == ElementType::i32)) { + auto data_ptr = reinterpret_cast(data_tensor.data()); + std::vector data(data_ptr, data_ptr + ngraph::shape_size(shape)); + secondaryInput = ngraph::builder::makeConstant(netType, shape, data); + } else if (netType == ElementType::f16) { + auto data_ptr = reinterpret_cast(data_tensor.data()); + std::vector data(data_ptr, data_ptr + ngraph::shape_size(shape)); + secondaryInput = ngraph::builder::makeConstant(netType, shape, data); + } else { + auto data_ptr = reinterpret_cast(data_tensor.data()); + std::vector data(data_ptr, data_ptr + ngraph::shape_size(shape)); + secondaryInput = ngraph::builder::makeConstant(netType, shape, data); + } + break; + } + case ngraph::helpers::InputLayerType::NONE: { + // the second input is absent + break; + } + default: { + FAIL() << "Unsupported InputLayerType"; } } auto eltwise = ngraph::builder::makeEltwise(parameters[0], secondaryInput, eltwiseType); diff --git a/src/plugins/intel_cpu/tests/functional/single_layer_tests/instances/common/eltwise.cpp b/src/plugins/intel_cpu/tests/functional/single_layer_tests/instances/common/eltwise.cpp index c4779c760123b9..8fb6787504cc73 100644 --- a/src/plugins/intel_cpu/tests/functional/single_layer_tests/instances/common/eltwise.cpp +++ b/src/plugins/intel_cpu/tests/functional/single_layer_tests/instances/common/eltwise.cpp @@ -261,7 +261,7 @@ const auto params_4D_bitwise_i16 = ::testing::Combine( ::testing::Values(ov::element::Type_t::undefined), ::testing::Values(ov::test::utils::DEVICE_CPU), ::testing::Values(ov::AnyMap())), - ::testing::Values(CPUSpecificParams({ nhwc, nhwc }, { nhwc }, {}, "ref_I32")), + ::testing::Values(CPUSpecificParams({ nhwc, nhwc }, { nhwc }, {}, "ref_I32$/")), ::testing::Values(emptyFusingSpec), ::testing::Values(false)); @@ -286,7 +286,7 @@ const auto params_4D_bitwise_NOT = ::testing::Combine( ::testing::Values(ov::element::Type_t::undefined), ::testing::Values(ov::test::utils::DEVICE_CPU), ::testing::Values(ov::AnyMap())), - ::testing::Values(CPUSpecificParams({ nhwc }, { nhwc }, {}, {"ref"})), + ::testing::Values(CPUSpecificParams({ nhwc }, { nhwc }, {}, "ref")), ::testing::Values(emptyFusingSpec), ::testing::Values(false)); @@ -305,7 +305,7 @@ const auto params_4D_bitwise_NOT_i16 = ::testing::Combine( ::testing::Values(ov::element::Type_t::undefined), ::testing::Values(ov::test::utils::DEVICE_CPU), ::testing::Values(ov::AnyMap())), - ::testing::Values(CPUSpecificParams({ nhwc }, { nhwc }, {}, { "ref_I32" })), + ::testing::Values(CPUSpecificParams({ nhwc }, { nhwc }, {}, "ref_I32$/")), ::testing::Values(emptyFusingSpec), ::testing::Values(false)); diff --git a/src/plugins/intel_cpu/tests/functional/test_utils/cpu_test_utils.cpp b/src/plugins/intel_cpu/tests/functional/test_utils/cpu_test_utils.cpp index b3d867913e8806..ced8d4a2d3cdd9 100644 --- a/src/plugins/intel_cpu/tests/functional/test_utils/cpu_test_utils.cpp +++ b/src/plugins/intel_cpu/tests/functional/test_utils/cpu_test_utils.cpp @@ -359,7 +359,9 @@ void CPUTestsBase::updateSelectedType(const std::string& primitiveType, const ov selectedType = primitiveType; } - if (selectedType.find("_") != std::string::npos) { + if (selectedType.find("$/") != std::string::npos) { + // like as regex + selectedType = selectedType.substr(0, selectedType.find("$/")); return; } diff --git a/src/tests/ov_helpers/ov_models/src/input_layer.cpp b/src/tests/ov_helpers/ov_models/src/input_layer.cpp index 5d8b8d417f3812..5256ab8935ed5b 100644 --- a/src/tests/ov_helpers/ov_models/src/input_layer.cpp +++ b/src/tests/ov_helpers/ov_models/src/input_layer.cpp @@ -20,9 +20,14 @@ std::shared_ptr makeInputLayer(const element::Type& type, input = ngraph::builder::makeConstant(type, shape, {}, true); break; } - case ov::test::utils::InputLayerType::PARAMETER: + case ov::test::utils::InputLayerType::PARAMETER: { input = std::make_shared(type, ov::Shape(shape)); break; + } + case ov::test::utils::InputLayerType::NONE: { + // input is not used + break; + } default: throw std::runtime_error("Unsupported inputType"); } diff --git a/src/tests/test_utils/functional_test_utils/layer_tests_summary/skip_configs/CPU/expected_failures_OP.csv b/src/tests/test_utils/functional_test_utils/layer_tests_summary/skip_configs/CPU/expected_failures_OP.csv index 07f091dd7a222b..fa91f28719a834 100644 --- a/src/tests/test_utils/functional_test_utils/layer_tests_summary/skip_configs/CPU/expected_failures_OP.csv +++ b/src/tests/test_utils/functional_test_utils/layer_tests_summary/skip_configs/CPU/expected_failures_OP.csv @@ -1130,10 +1130,6 @@ conformance_PRelu/ReadIRTest.ImportExport/Op=PRelu.1_Type=f32_IR=20e7e74f55eb5fb conformance_RegionYolo/ReadIRTest.ImportExport/Op=RegionYolo.1_Type=f32_IR=RegionYolo-1_750_Device=CPU_Shape=static_Config=(),5.06332e-06 conformance_Add/ReadIRTest.ImportExport/Op=Add.1_Type=i32_IR=28f23780d4ca0d40671caf79d5cd9223ad8f6dc2fa5ade2521f3d99586eeeb7f_Device=CPU_Shape=static_Config=(),9.72615e-07 conformance_Convolution/ReadIRTest.Inference/Op=Convolution.1_Type=f32_IR=c301804445f273eef62f41f02204711d9d6e571da28c76ab447d7d90983b0032_Device=CPU_Shape=dynamic_Config=(),0.000113281 -conformance/OpImplCheckTest.checkPluginImplementation/Function=BitwiseAnd_opset13_Device=CPU_Config=(),1 -conformance/OpImplCheckTest.checkPluginImplementation/Function=BitwiseOr_opset13_Device=CPU_Config=(),1 -conformance/OpImplCheckTest.checkPluginImplementation/Function=BitwiseNot_opset13_Device=CPU_Config=(),1 conformance/OpImplCheckTest.checkPluginImplementation/Function=Multinomial_opset13_Device=CPU_Config=(),1 conformance/OpImplCheckTest.checkPluginImplementation/Function=NMSRotated_opset13_Device=CPU_Config=(),1 conformance/OpImplCheckTest.checkPluginImplementation/Function=LSTMSequence_opset1_Device=CPU_Config=(),1 -conformance/OpImplCheckTest.checkPluginImplementation/Function=BitwiseXor_opset13_Device=CPU_Config=(),1