diff --git a/src/plugins/intel_cpu/src/plugin.cpp b/src/plugins/intel_cpu/src/plugin.cpp index 17f5843cdf7955..7fb49cb5e3b8e9 100644 --- a/src/plugins/intel_cpu/src/plugin.cpp +++ b/src/plugins/intel_cpu/src/plugin.cpp @@ -639,8 +639,12 @@ static void TransformationUpToCPUSpecificOpSet(std::shared_ptr // CPU Plugin support Swish in Subgraph via conversion to SwichCPU which assumes second input to be constant const bool is_unsupported_swish = ov::is_type(n) && n->inputs().size() > 1 && !ov::is_type(n->get_input_node_shared_ptr(1)); - const bool is_disabled_softmax_tokenization = - (ov::is_type(n) || ov::is_type(n)) && !_tokenizeSpecOpsSnippets; + // todo: general tokenization flow is not currently supported for these operations. + // they can be tokenized only as a part of complex patterns + const bool is_disabled_tokenization = !_tokenizeSpecOpsSnippets && + (ov::is_type(n) || + ov::is_type(n) || + ov::is_type(n)); const auto& inputs = n->inputs(); // todo: clarify whether we can evaluate snippets on const paths const bool has_only_const_inputs = std::all_of(inputs.begin(), inputs.end(), @@ -657,7 +661,7 @@ static void TransformationUpToCPUSpecificOpSet(std::shared_ptr const auto& outputs = n->outputs(); const bool bad_output_rank = std::any_of(outputs.begin(), outputs.end(), [&](const ov::Output& out) {return rank_is_too_large(out.get_tensor());}); - return has_only_const_inputs || bad_input_rank || bad_output_rank || is_unsupported_swish || is_disabled_softmax_tokenization; + return has_only_const_inputs || bad_input_rank || bad_output_rank || is_unsupported_swish || is_disabled_tokenization; }); snippetsManager.register_pass(); snippetsManager.run_passes(nGraphFunc); diff --git a/src/tests/functional/plugin/shared/src/snippets/transpose.cpp b/src/tests/functional/plugin/shared/src/snippets/transpose.cpp index 7c6e8fc317ebea..9f490bbe45c68f 100644 --- a/src/tests/functional/plugin/shared/src/snippets/transpose.cpp +++ b/src/tests/functional/plugin/shared/src/snippets/transpose.cpp @@ -6,6 +6,7 @@ #include "snippets/transpose.hpp" #include "subgraph_permute.hpp" #include "functional_test_utils/skip_tests_config.hpp" +#include "cpp_interfaces/interface/ie_internal_plugin_config.hpp" namespace ov { namespace test { @@ -35,6 +36,10 @@ void Transpose::SetUp() { auto f = ov::test::snippets::TransposeSinhFunction({inputShape}, order); function = f.getOriginal(); + if (!configuration.count(InferenceEngine::PluginConfigInternalParams::KEY_SNIPPETS_MHA_OPS_TOKENIZATION_ENABLE)) { + configuration.insert({InferenceEngine::PluginConfigInternalParams::KEY_SNIPPETS_MHA_OPS_TOKENIZATION_ENABLE, + InferenceEngine::PluginConfigParams::YES}); + } } TEST_P(Transpose, CompareWithRefImpl) {