Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CPU][ARM64]: Enable Power, Select, Xor tokenization in CPU Plugin #29353

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,18 @@ CPUTargetMachine::CPUTargetMachine(dnnl::impl::cpu::aarch64::cpu_isa_t host_isa,
jitters[snippets::op::Store::get_type_info_static()] = CREATE_SNIPPETS_EMITTER(jit_store_memory_emitter);

// ternary
jitters[op::v1::Select::get_type_info_static()] = CREATE_CPU_EMITTER(jit_select_emitter);
jitters[intel_cpu::FusedMulAdd::get_type_info_static()] = CREATE_CPU_EMITTER(jit_mul_add_emitter);

// binary
jitters[op::v1::Add::get_type_info_static()] = CREATE_CPU_EMITTER(jit_add_emitter);
jitters[op::v1::Divide::get_type_info_static()] = CREATE_CPU_EMITTER(jit_divide_emitter);
jitters[op::v1::LogicalXor::get_type_info_static()] = CREATE_CPU_EMITTER(jit_logical_xor_emitter);
jitters[op::v1::Maximum::get_type_info_static()] = CREATE_CPU_EMITTER(jit_maximum_emitter);
jitters[op::v1::Minimum::get_type_info_static()] = CREATE_CPU_EMITTER(jit_minimum_emitter);
jitters[op::v1::Mod::get_type_info_static()] = CREATE_CPU_EMITTER(jit_mod_emitter);
jitters[op::v1::Multiply::get_type_info_static()] = CREATE_CPU_EMITTER(jit_multiply_emitter);
jitters[snippets::op::PowerStatic::get_type_info_static()] = CREATE_CPU_EMITTER(jit_power_static_emitter);
jitters[op::v1::Subtract::get_type_info_static()] = CREATE_CPU_EMITTER(jit_subtract_emitter);

// Comparison ops
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,7 @@ void Transformations::MainSnippets() {
ov::op::v0::Elu,
ov::op::v0::Exp,
ov::op::v1::Equal,
ov::op::v1::LogicalXor,
ov::op::v0::FakeQuantize,
ov::op::v0::Floor,
ov::op::v1::FloorMod,
Expand All @@ -1249,9 +1250,11 @@ void Transformations::MainSnippets() {
ov::op::v4::Mish,
ov::op::v1::Mod,
ov::op::v1::Multiply,
snippets::op::PowerStatic,
ov::op::v0::PRelu,
ov::op::v0::Relu,
ov::op::v5::Round,
ov::op::v1::Select,
ov::op::v0::Sigmoid,
ov::op::v0::Sqrt,
ov::op::v1::Subtract,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ void EltwiseLayerCPUTest::SetUp() {
netType,
configuration);
// selectedType = makeSelectedTypeStr(getPrimitiveType(), netType);
#if defined(OPENVINO_ARCH_ARM) || defined(OPENVINO_ARCH_ARM64)
#if defined(OPENVINO_ARCH_ARM)
if (eltwiseType == utils::POWER) {
selectedType = std::regex_replace(selectedType, std::regex("acl"), "ref");
}
Expand Down Expand Up @@ -265,6 +265,7 @@ std::string EltwiseLayerCPUTest::getPrimitiveType(const utils::EltwiseTypes& elt
(eltwise_type == utils::EltwiseTypes::DIVIDE) ||
(eltwise_type == utils::EltwiseTypes::FLOOR_MOD) ||
(eltwise_type == utils::EltwiseTypes::MOD) ||
(eltwise_type == utils::EltwiseTypes::POWER) ||
(eltwise_type == utils::EltwiseTypes::SQUARED_DIFF)) {
return "jit";
}
Expand Down Expand Up @@ -336,6 +337,7 @@ const std::vector<utils::EltwiseTypes>& eltwiseOpTypesBinInp() {
utils::EltwiseTypes::FLOOR_MOD,
utils::EltwiseTypes::SQUARED_DIFF,
utils::EltwiseTypes::MOD,
utils::EltwiseTypes::POWER,
};
return eltwiseOpTypesBinInp;
}
Expand All @@ -346,6 +348,7 @@ const std::vector<utils::EltwiseTypes>& eltwiseOpTypesBinInpSnippets() {
utils::EltwiseTypes::MULTIPLY,
utils::EltwiseTypes::FLOOR_MOD,
utils::EltwiseTypes::MOD,
utils::EltwiseTypes::POWER,
};
return eltwiseOpTypesBinInp;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ std::vector<std::string> disabledTestPatterns() {
retVector.emplace_back(R"(smoke_Snippets_Eltwise/TwoInputsAndOutputs.*)");
// arm jit_eltwise_emitters doesn't support jit_power_dynamic_emitter yet
retVector.emplace_back(R"(smoke_Snippets_Eltwise/MaxNumParamsEltwise.*)");
retVector.emplace_back(R"(smoke_CompareWithRefs_4D_MemOrder_Snippets/EltwiseLayerCPUTest\.CompareWithRefs/.*Pow.*)");
#endif
#if defined(_WIN32)
retVector.emplace_back(R"(.*smoke_QuantizedConvolutionBatchNormTransposeOnWeights/QuantizedConvolutionBatchNorm.CompareWithRefs/conv_type=convolution_quantize_type=fake_quantize_intervals_type=per_(tensor|channel)_transpose_on_weights=true_device=CPU.*)");
Expand Down