From 59198bdfffdad96f5e8bb3559995a99a9da13e23 Mon Sep 17 00:00:00 2001 From: Edward Shogulin Date: Sun, 7 Jul 2024 11:45:50 +0100 Subject: [PATCH] power: native division support --- .../src/emitters/plugin/aarch64/jit_eltwise_emitters.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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.cpp index 1aa9cdc57c1507..eff91e90a6c5c6 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 @@ -1303,6 +1303,7 @@ void jit_power_static_emitter::register_table_entries() { push_arg_entry_of("power", float2int(power, exec_prc_), true, exec_prc_); push_arg_entry_of("scale", float2int(scale, exec_prc_), true, exec_prc_); push_arg_entry_of("shift", float2int(shift, exec_prc_), true, exec_prc_); + push_arg_entry_of("one", float2int(1.f, exec_prc_), true, exec_prc_); } std::set> jit_power_static_emitter::get_supported_precisions(const std::shared_ptr& node) { @@ -1350,6 +1351,13 @@ void jit_power_static_emitter::emit_isa(const std::vector &in_vec_idxs, return; } + if (power == -1.f) { + auto adr = table_val2("one"); + h->ld1r(aux, adr); + h->fdiv(dst, aux, src()); + return; + } + if (std::floor(power) == power && power > 0) { h->mov(BReg(aux.getIdx()), BReg(src().getIdx())); h->fmov(dst, 1.);