diff --git a/src/cpu/x64/injectors/jit_uni_binary_injector.cpp b/src/cpu/x64/injectors/jit_uni_binary_injector.cpp index 285d56b1be7..e65887971b5 100644 --- a/src/cpu/x64/injectors/jit_uni_binary_injector.cpp +++ b/src/cpu/x64/injectors/jit_uni_binary_injector.cpp @@ -214,19 +214,6 @@ static_params_t::static_params_t(const Xbyak::Reg64 ¶m1, : static_params_t(param1, get_all_strategies_supported_by_injector(), rhs_arg_static_params) {} -rhs_arg_static_params_t::rhs_arg_static_params_t( - std::size_t rhs_dt_helper_vmm_idx, const Xbyak::Reg64 &rhs_addr_reg, - const Xbyak::Reg64 &rhs_helper_reg, - const Xbyak::Reg64 &rhs_addr_cache_reg, bool preserve_gpr_helpers, - bool preserve_vmm_helper, std::size_t abi_param_offset, - const memory_desc_wrapper &dst_d, std::size_t tail_size, - bool use_exact_tail_scalar_bcast) - : rhs_arg_static_params_t(rhs_dt_helper_vmm_idx, rhs_addr_reg, - rhs_helper_reg, rhs_addr_cache_reg, preserve_gpr_helpers, - preserve_vmm_helper, abi_param_offset, 0, dst_d, tail_size, - Xbyak::Opmask(2), use_exact_tail_scalar_bcast, rhs_helper_reg, - false /*is_opmask_set*/, false /*is_dst_orig_set*/) {} - rhs_arg_static_params_t::rhs_arg_static_params_t( std::size_t rhs_dt_helper_vmm_idx, const Xbyak::Reg64 &rhs_addr_reg, const Xbyak::Reg64 &rhs_helper_reg, @@ -238,23 +225,7 @@ rhs_arg_static_params_t::rhs_arg_static_params_t( rhs_helper_reg, rhs_addr_cache_reg, preserve_gpr_helpers, preserve_vmm_helper, abi_param_offset, dst_orig_offset, dst_d, tail_size, Xbyak::Opmask(2), use_exact_tail_scalar_bcast, - rhs_helper_reg, false /*is_opmask_set*/, true /*is_dst_orig_set*/) { -} - -rhs_arg_static_params_t::rhs_arg_static_params_t( - std::size_t rhs_dt_helper_vmm_idx, const Xbyak::Reg64 &rhs_addr_reg, - const Xbyak::Reg64 &rhs_helper_reg, - const Xbyak::Reg64 &rhs_addr_cache_reg, bool preserve_gpr_helpers, - bool preserve_vmm_helper, std::size_t abi_param_offset, - const memory_desc_wrapper &dst_d, std::size_t tail_size, - const Xbyak::Opmask &tail_opmask, bool use_exact_tail_scalar_bcast, std::size_t rhs_prelu_helper_vmm_idx) - : rhs_arg_static_params_t(rhs_dt_helper_vmm_idx, rhs_addr_reg, - rhs_helper_reg, rhs_addr_cache_reg, preserve_gpr_helpers, - preserve_vmm_helper, abi_param_offset, 0, dst_d, tail_size, - tail_opmask, use_exact_tail_scalar_bcast, rhs_helper_reg, - true /*is_opmask_set*/, false /*is_dst_orig_set*/) { - this->rhs_prelu_helper_vmm_idx = rhs_prelu_helper_vmm_idx; -} + rhs_helper_reg, false /*is_opmask_set*/) {} rhs_arg_static_params_t::rhs_arg_static_params_t( std::size_t rhs_dt_helper_vmm_idx, const Xbyak::Reg64 &rhs_addr_reg, @@ -268,23 +239,7 @@ rhs_arg_static_params_t::rhs_arg_static_params_t( rhs_helper_reg, rhs_addr_cache_reg, preserve_gpr_helpers, preserve_vmm_helper, abi_param_offset, dst_orig_offset, dst_d, tail_size, tail_opmask, use_exact_tail_scalar_bcast, rhs_helper_reg, - true /*is_opmask_set*/, true /*is_dst_orig_set*/) { - this->rhs_prelu_helper_vmm_idx = rhs_prelu_helper_vmm_idx; -} - -rhs_arg_static_params_t::rhs_arg_static_params_t( - std::size_t rhs_dt_helper_vmm_idx, const Xbyak::Reg64 &rhs_addr_reg, - const Xbyak::Reg64 &rhs_helper_reg, - const Xbyak::Reg64 &rhs_addr_cache_reg, bool preserve_gpr_helpers, - bool preserve_vmm_helper, std::size_t abi_param_offset, - const memory_desc_wrapper &dst_d, std::size_t tail_size, - const Xbyak::Opmask &tail_opmask, const Xbyak::Reg64 ®_tail_size, - bool use_exact_tail_scalar_bcast, std::size_t rhs_prelu_helper_vmm_idx) - : rhs_arg_static_params_t(rhs_dt_helper_vmm_idx, rhs_addr_reg, - rhs_helper_reg, rhs_addr_cache_reg, preserve_gpr_helpers, - preserve_vmm_helper, abi_param_offset, 0, dst_d, tail_size, - tail_opmask, use_exact_tail_scalar_bcast, reg_tail_size, - true /*is_opmask_set*/, false /*is_dst_orig_set*/) { + true /*is_opmask_set*/) { this->rhs_prelu_helper_vmm_idx = rhs_prelu_helper_vmm_idx; } @@ -300,7 +255,7 @@ rhs_arg_static_params_t::rhs_arg_static_params_t( rhs_helper_reg, rhs_addr_cache_reg, preserve_gpr_helpers, preserve_vmm_helper, abi_param_offset, dst_orig_offset, dst_d, tail_size, tail_opmask, use_exact_tail_scalar_bcast, reg_tail_size, - true /*is_opmask_set*/, true /*is_dst_orig_set*/) { + true /*is_opmask_set*/) { this->rhs_prelu_helper_vmm_idx = rhs_prelu_helper_vmm_idx; } @@ -312,7 +267,7 @@ rhs_arg_static_params_t::rhs_arg_static_params_t( std::size_t dst_orig_offset, const memory_desc_wrapper &dst_d, std::size_t tail_size, const Xbyak::Opmask &tail_opmask, bool use_exact_tail_scalar_bcast, const Xbyak::Reg64 ®_tail_size, - bool is_opmask_set, bool is_dst_orig_set) + bool is_opmask_set) : rhs_dt_helper_vmm_idx(rhs_dt_helper_vmm_idx) , rhs_addr_reg(rhs_addr_reg) , rhs_helper_reg(rhs_helper_reg) @@ -327,8 +282,7 @@ rhs_arg_static_params_t::rhs_arg_static_params_t( , use_exact_tail_scalar_bcast(use_exact_tail_scalar_bcast) , reg_tail_size(reg_tail_size) , is_tail(tail_size) - , is_opmask_set_(is_opmask_set) - , is_dst_orig_set_(is_dst_orig_set) {} + , is_opmask_set_(is_opmask_set) {} template jit_uni_binary_injector_t::jit_uni_binary_injector_t( @@ -354,45 +308,14 @@ static bool rhs_arg_params_differ(size_t vmm_idx1, size_t vmm_idx2, const auto &out_addr = rhs_arg_params.vmm_idx_to_out_addr; const auto &out_reg = rhs_arg_params.vmm_idx_to_out_reg; - - const auto &out_elem_off_addr = rhs_arg_params.vmm_idx_to_out_elem_off_addr; const auto &out_elem_off_val = rhs_arg_params.vmm_idx_to_out_elem_off_val; - const auto &out_off_oprnd = rhs_arg_params.vmm_idx_to_out_off_oprnd; - const auto &oc_off_addr = rhs_arg_params.vmm_idx_to_oc_elem_off_addr; - const auto &oc_off_val = rhs_arg_params.vmm_idx_to_oc_elem_off_val; - const auto &oc_off_oprnd = rhs_arg_params.vmm_idx_to_oc_off_oprnd; - const auto &sp_off_addr = rhs_arg_params.vmm_idx_to_sp_elem_off_addr; - const auto &sp_off_val = rhs_arg_params.vmm_idx_to_sp_elem_off_val; - const auto &sp_off_oprnd = rhs_arg_params.vmm_idx_to_sp_off_oprnd; - - if (rhs_broadcasting_strategy == broadcasting_strategy_t::scalar) { - return false; - } else if (rhs_broadcasting_strategy - == broadcasting_strategy_t::no_broadcast) { - return params_differ(out_addr, vmm_idx1, vmm_idx2) - || params_differ(out_reg, vmm_idx1, vmm_idx2) - || params_differ(out_elem_off_addr, vmm_idx1, vmm_idx2) - || params_differ(out_elem_off_val, vmm_idx1, vmm_idx2) - || params_differ(out_off_oprnd, vmm_idx1, vmm_idx2); - } else if (rhs_broadcasting_strategy == broadcasting_strategy_t::per_oc - || rhs_broadcasting_strategy - == broadcasting_strategy_t::per_oc_spatial) { - return params_differ(out_addr, vmm_idx1, vmm_idx2) - || params_differ(out_reg, vmm_idx1, vmm_idx2) - || params_differ(out_elem_off_val, vmm_idx1, vmm_idx2) - || params_differ(oc_off_addr, vmm_idx1, vmm_idx2) - || params_differ(oc_off_val, vmm_idx1, vmm_idx2) - || params_differ(oc_off_oprnd, vmm_idx1, vmm_idx2); - } else if (rhs_broadcasting_strategy - == broadcasting_strategy_t::per_mb_spatial) { + + if (rhs_broadcasting_strategy != broadcasting_strategy_t::scalar) { return params_differ(out_addr, vmm_idx1, vmm_idx2) || params_differ(out_reg, vmm_idx1, vmm_idx2) - || params_differ(out_elem_off_val, vmm_idx1, vmm_idx2) - || params_differ(sp_off_addr, vmm_idx1, vmm_idx2) - || params_differ(sp_off_val, vmm_idx1, vmm_idx2) - || params_differ(sp_off_oprnd, vmm_idx1, vmm_idx2); + || params_differ(out_elem_off_val, vmm_idx1, vmm_idx2); } - return true; + return false; } template @@ -520,8 +443,7 @@ void jit_uni_binary_injector_t::compute_vector_range( const int blk_size = dst_d.blocking_desc().inner_blks[0]; const bool use_offset_conversions = (!rhs_arg_params.vmm_idx_to_out_addr.empty() - || !rhs_arg_params.vmm_idx_to_out_reg.empty()) - && rhs_arg_static_params_.is_dst_orig_set(); + || !rhs_arg_params.vmm_idx_to_out_reg.empty()); const bool should_preserve_oc_offset_conversion_regs = use_offset_conversions && utils::one_of(rhs_broadcasting_strategy, @@ -662,13 +584,6 @@ Xbyak::Address jit_uni_binary_injector_t::prepare_rhs_arg_addr( switch (rhs_broadcasting_strategy) { case broadcasting_strategy_t::scalar: return host_->ptr_b[rhs_addr_reg]; case broadcasting_strategy_t::no_broadcast: { - append_offset_from_operand(rhs_arg_params.vmm_idx_to_out_off_oprnd, - vmm_idx, rhs_addr_reg, rhs_helper_reg, rhs_arg_elem_size); - append_offset_under_mem_addr( - rhs_arg_params.vmm_idx_to_out_elem_off_addr, vmm_idx, - rhs_addr_reg, rhs_helper_reg, rhs_arg_elem_size); - append_value_offset(rhs_arg_params.vmm_idx_to_out_elem_off_val, - vmm_idx, rhs_addr_reg, rhs_arg_elem_size); append_no_broadcast_offset(rhs_arg_params.vmm_idx_to_out_addr, rhs_arg_params.vmm_idx_to_out_reg, rhs_arg_params.vmm_idx_to_out_elem_off_val, vmm_idx, @@ -678,13 +593,6 @@ Xbyak::Address jit_uni_binary_injector_t::prepare_rhs_arg_addr( } case broadcasting_strategy_t::per_oc: case broadcasting_strategy_t::per_oc_spatial: { - append_offset_from_operand(rhs_arg_params.vmm_idx_to_oc_off_oprnd, - vmm_idx, rhs_addr_reg, rhs_helper_reg, rhs_arg_elem_size); - append_offset_under_mem_addr( - rhs_arg_params.vmm_idx_to_oc_elem_off_addr, vmm_idx, - rhs_addr_reg, rhs_helper_reg, rhs_arg_elem_size); - append_value_offset(rhs_arg_params.vmm_idx_to_oc_elem_off_val, - vmm_idx, rhs_addr_reg, rhs_arg_elem_size); append_oc_offset(rhs_arg_params.vmm_idx_to_out_addr, rhs_arg_params.vmm_idx_to_out_reg, rhs_arg_params.vmm_idx_to_out_elem_off_val, vmm_idx, @@ -696,13 +604,6 @@ Xbyak::Address jit_uni_binary_injector_t::prepare_rhs_arg_addr( : host_->ptr[rhs_addr_reg]; } case broadcasting_strategy_t::per_mb_spatial: { - append_offset_from_operand(rhs_arg_params.vmm_idx_to_sp_off_oprnd, - vmm_idx, rhs_addr_reg, rhs_helper_reg, rhs_arg_elem_size); - append_offset_under_mem_addr( - rhs_arg_params.vmm_idx_to_sp_elem_off_addr, vmm_idx, - rhs_addr_reg, rhs_helper_reg, rhs_arg_elem_size); - append_value_offset(rhs_arg_params.vmm_idx_to_sp_elem_off_val, - vmm_idx, rhs_addr_reg, rhs_arg_elem_size); append_mb_sp_offset(rhs_arg_params.vmm_idx_to_out_addr, rhs_arg_params.vmm_idx_to_out_reg, rhs_arg_params.vmm_idx_to_out_elem_off_val, vmm_idx, @@ -711,13 +612,6 @@ Xbyak::Address jit_uni_binary_injector_t::prepare_rhs_arg_addr( return host_->ptr[rhs_addr_reg]; } case broadcasting_strategy_t::per_mb_w: { - append_offset_from_operand(rhs_arg_params.vmm_idx_to_mb_w_off_oprnd, - vmm_idx, rhs_addr_reg, rhs_helper_reg, rhs_arg_elem_size); - append_offset_under_mem_addr( - rhs_arg_params.vmm_idx_to_mb_w_elem_off_addr, vmm_idx, - rhs_addr_reg, rhs_helper_reg, rhs_arg_elem_size); - append_value_offset(rhs_arg_params.vmm_idx_to_mb_w_elem_off_val, - vmm_idx, rhs_addr_reg, rhs_arg_elem_size); append_mb_w_offset(rhs_arg_params.vmm_idx_to_out_addr, rhs_arg_params.vmm_idx_to_out_reg, rhs_arg_params.vmm_idx_to_out_elem_off_val, vmm_idx, @@ -726,13 +620,6 @@ Xbyak::Address jit_uni_binary_injector_t::prepare_rhs_arg_addr( return host_->ptr[rhs_addr_reg]; } case broadcasting_strategy_t::per_w: { - append_offset_from_operand(rhs_arg_params.vmm_idx_to_w_off_oprnd, - vmm_idx, rhs_addr_reg, rhs_helper_reg, rhs_arg_elem_size); - append_offset_under_mem_addr( - rhs_arg_params.vmm_idx_to_w_elem_off_addr, vmm_idx, - rhs_addr_reg, rhs_helper_reg, rhs_arg_elem_size); - append_value_offset(rhs_arg_params.vmm_idx_to_w_elem_off_val, - vmm_idx, rhs_addr_reg, rhs_arg_elem_size); append_w_offset(rhs_arg_params.vmm_idx_to_out_addr, rhs_arg_params.vmm_idx_to_out_reg, rhs_arg_params.vmm_idx_to_out_elem_off_val, vmm_idx, @@ -746,57 +633,6 @@ Xbyak::Address jit_uni_binary_injector_t::prepare_rhs_arg_addr( return host_->ptr[rhs_addr_reg]; } -template -void jit_uni_binary_injector_t::append_offset_from_operand( - const std::map &vmm_idx_to_elem_operand_off, - int vmm_idx, const Xbyak::Reg64 &addr_reg, const Xbyak::Reg64 &tmp_reg, - std::size_t elem_size_bytes) const { - - const auto it_operand_off = vmm_idx_to_elem_operand_off.find(vmm_idx); - if (it_operand_off != vmm_idx_to_elem_operand_off.end() - && !rhs_arg_static_params_.is_dst_orig_set()) { - if (elem_size_bytes == 1) { - host_->add(addr_reg, it_operand_off->second); - } else { - const int shift_val = std::log2(elem_size_bytes); - host_->mov(tmp_reg, it_operand_off->second); - host_->sal(tmp_reg, shift_val); - host_->add(addr_reg, tmp_reg); - } - } -} - -template -void jit_uni_binary_injector_t::append_offset_under_mem_addr( - const std::map &vmm_idx_to_elem_addr_off, - int vmm_idx, const Xbyak::Reg64 &addr_reg, const Xbyak::Reg64 &tmp_reg, - std::size_t elem_size_bytes) const { - - const auto it_off_addr = vmm_idx_to_elem_addr_off.find(vmm_idx); - if (it_off_addr != vmm_idx_to_elem_addr_off.end() - && !rhs_arg_static_params_.is_dst_orig_set()) { - if (elem_size_bytes == 1) { - host_->add(addr_reg, it_off_addr->second); - } else { - const int shift_val = std::log2(elem_size_bytes); - host_->mov(tmp_reg, it_off_addr->second); - host_->sal(tmp_reg, shift_val); - host_->add(addr_reg, tmp_reg); - } - } -} - -template -void jit_uni_binary_injector_t::append_value_offset( - const std::map &vmm_idx_to_elem_val_off, int vmm_idx, - const Xbyak::Reg64 &addr_reg, std::size_t elem_size_bytes) const { - - const auto it_off_val = vmm_idx_to_elem_val_off.find(vmm_idx); - if (it_off_val != vmm_idx_to_elem_val_off.end() - && !rhs_arg_static_params_.is_dst_orig_set()) - host_->add(addr_reg, it_off_val->second * elem_size_bytes); -} - template void jit_uni_binary_injector_t::append_no_broadcast_offset( const std::map &vmm_idx_to_out_addr, @@ -811,8 +647,6 @@ void jit_uni_binary_injector_t::append_no_broadcast_offset( const bool is_out_addr = it_out_addr != vmm_idx_to_out_addr.end(); const bool is_out_reg = it_out_reg != vmm_idx_to_out_reg.end(); if (is_out_addr || is_out_reg) { - assert(rhs_arg_static_params_.is_dst_orig_set() - && "dst base addr offset not set"); Xbyak::Address out_addr = is_out_addr ? it_out_addr->second : host_->ptr[it_out_reg->second]; const auto it_off_val = vmm_idx_to_out_elem_off_val.find(vmm_idx); @@ -875,8 +709,6 @@ void jit_uni_binary_injector_t::append_oc_offset( const bool is_out_reg = it_out_reg != vmm_idx_to_out_reg.end(); if (is_out_addr || is_out_reg) { - assert(rhs_arg_static_params_.is_dst_orig_set() - && "dst base addr offset not set"); Xbyak::Address out_addr = is_out_addr ? it_out_addr->second : host_->ptr[it_out_reg->second]; const auto it_off_val = vmm_idx_to_out_elem_off_val.find(vmm_idx); @@ -1105,8 +937,6 @@ void jit_uni_binary_injector_t::append_mb_sp_offset( const bool is_out_reg = it_out_reg != vmm_idx_to_out_reg.end(); if (is_out_addr || is_out_reg) { - assert(rhs_arg_static_params_.is_dst_orig_set() - && "dst base addr offset not set"); Xbyak::Address out_addr = is_out_addr ? it_out_addr->second : host_->ptr[it_out_reg->second]; const auto it_off_val = vmm_idx_to_out_elem_off_val.find(vmm_idx); @@ -1388,8 +1218,6 @@ void jit_uni_binary_injector_t::append_mb_w_offset( const bool is_out_reg = it_out_reg != vmm_idx_to_out_reg.end(); if (is_out_addr || is_out_reg) { - assert(rhs_arg_static_params_.is_dst_orig_set() - && "dst base addr offset not set"); Xbyak::Address out_addr = is_out_addr ? it_out_addr->second : host_->ptr[it_out_reg->second]; const auto it_off_val = vmm_idx_to_out_elem_off_val.find(vmm_idx); @@ -1700,8 +1528,6 @@ void jit_uni_binary_injector_t::append_w_offset( const bool is_out_reg = it_out_reg != vmm_idx_to_out_reg.end(); if (is_out_addr || is_out_reg) { - assert(rhs_arg_static_params_.is_dst_orig_set() - && "dst base addr offset not set"); Xbyak::Address out_addr = is_out_addr ? it_out_addr->second : host_->ptr[it_out_reg->second]; const auto it_off_val = vmm_idx_to_out_elem_off_val.find(vmm_idx); diff --git a/src/cpu/x64/injectors/jit_uni_binary_injector.hpp b/src/cpu/x64/injectors/jit_uni_binary_injector.hpp index 738abed9427..a741e1559ad 100644 --- a/src/cpu/x64/injectors/jit_uni_binary_injector.hpp +++ b/src/cpu/x64/injectors/jit_uni_binary_injector.hpp @@ -105,13 +105,6 @@ bool all_binary_postop_rhs_per_oc_broadcast(const post_ops_t &post_ops, * for load with tail in runtime. */ struct rhs_arg_static_params_t { - rhs_arg_static_params_t(std::size_t rhs_dt_helper_vmm_idx, - const Xbyak::Reg64 &rhs_addr_reg, - const Xbyak::Reg64 &rhs_helper_reg, - const Xbyak::Reg64 &rhs_addr_cache_reg, bool preserve_gpr_helpers, - bool preserve_vmm_helper, std::size_t abi_param_offset, - const memory_desc_wrapper &dst_d, std::size_t tail_size = 0u, - bool use_exact_tail_scalar_bcast = false); rhs_arg_static_params_t(std::size_t rhs_dt_helper_vmm_idx, const Xbyak::Reg64 &rhs_addr_reg, const Xbyak::Reg64 &rhs_helper_reg, @@ -120,13 +113,6 @@ struct rhs_arg_static_params_t { std::size_t dst_orig_offset, const memory_desc_wrapper &dst_d, std::size_t tail_size = 0u, bool use_exact_tail_scalar_bcast = false); - rhs_arg_static_params_t(std::size_t rhs_dt_helper_vmm_idx, - const Xbyak::Reg64 &rhs_addr_reg, - const Xbyak::Reg64 &rhs_helper_reg, - const Xbyak::Reg64 &rhs_addr_cache_reg, bool preserve_gpr_helpers, - bool preserve_vmm_helper, std::size_t abi_param_offset, - const memory_desc_wrapper &dst_d, std::size_t tail_size, - const Xbyak::Opmask &tail_opmask, bool use_exact_tail_scalar_bcast, std::size_t rhs_prelu_helper_vmm_idx = 0); rhs_arg_static_params_t(std::size_t rhs_dt_helper_vmm_idx, const Xbyak::Reg64 &rhs_addr_reg, const Xbyak::Reg64 &rhs_helper_reg, @@ -135,14 +121,6 @@ struct rhs_arg_static_params_t { std::size_t dst_orig_offset, const memory_desc_wrapper &dst_d, std::size_t tail_size, const Xbyak::Opmask &tail_opmask, bool use_exact_tail_scalar_bcast, std::size_t rhs_prelu_helper_vmm_idx = 0); - rhs_arg_static_params_t(std::size_t rhs_dt_helper_vmm_idx, - const Xbyak::Reg64 &rhs_addr_reg, - const Xbyak::Reg64 &rhs_helper_reg, - const Xbyak::Reg64 &rhs_addr_cache_reg, bool preserve_gpr_helpers, - bool preserve_vmm_helper, std::size_t abi_param_offset, - const memory_desc_wrapper &dst_d, std::size_t tail_size, - const Xbyak::Opmask &tail_opmask, const Xbyak::Reg64 ®_tail_size, - bool use_exact_tail_scalar_bcast, std::size_t rhs_prelu_helper_vmm_idx = 0); rhs_arg_static_params_t(std::size_t rhs_dt_helper_vmm_idx, const Xbyak::Reg64 &rhs_addr_reg, const Xbyak::Reg64 &rhs_helper_reg, @@ -154,7 +132,6 @@ struct rhs_arg_static_params_t { bool use_exact_tail_scalar_bcast, std::size_t rhs_prelu_helper_vmm_idx = 0); bool is_opmask_set() const noexcept { return is_opmask_set_; } - bool is_dst_orig_set() const noexcept { return is_dst_orig_set_; } mutable std::size_t rhs_dt_helper_vmm_idx = 0; Xbyak::Reg64 rhs_addr_reg; @@ -182,10 +159,9 @@ struct rhs_arg_static_params_t { std::size_t dst_orig_offset, const memory_desc_wrapper &dst_d, std::size_t tail_size, const Xbyak::Opmask &tail_opmask, bool use_exact_tail_scalar_bcast, const Xbyak::Reg64 ®_tail_size, - bool is_opmask_set, bool is_dst_orig_set); + bool is_opmask_set); bool is_opmask_set_; - bool is_dst_orig_set_; }; /* @@ -237,41 +213,9 @@ enum class tail_lode_mode_t { STATIC, DYNAMIC, DEFAULT }; * @param vmm_idx_to_out_reg - vmm mapped to register containing address of destination * with offset, used to calculate offset in no_broadcast strategy, but also in other * strategies whose calculations are based on no_broadcast strategy. - * @param vmm_idx_to_out_elem_off_addr - vmm mapped to offset in elements stored under - * memory address intended to use in no_broadcast strategy. - * @param vmm_idx_to_out_elem_off_addr - vmm mapped to offset in elements stored under - * memory address intended to use in no_broadcast strategy. * @param vmm_idx_to_out_elem_off_val - vmm mapped to offset in elements passed as raw - * value intended to use in no_broadcast strategy - * @param vmm_idx_to_out_off_oprnd - vmm mapped to offset in elements inside operand - * intended to use in no_broadcast strategy - * @param vmm_idx_to_oc_elem_off_addr - vmm mapped to output channel offset in elements - * stored under memory address intended to use in per_oc broadcast strategies. - * @param vmm_idx_to_oc_elem_off_val - vmm mapped to output channel offset in elements - * passed as raw value intended to use in per_oc broadcast strategies. - * @param vmm_idx_to_oc_off_oprnd - vmm mapped to output channel offset in elements inside - * operand intended to use in per_oc broadcast strategies. - * @param vmm_idx_to_sp_elem_off_addr - vmm mapped to proper output spatial offset in - * elements stored under memory address intended to use in per_mb_spatial strategies. - * @param vmm_idx_to_sp_elem_off_val - vmm mapped to proper output spatial offset in - * elements passed as raw value intended to use in per_mb_spatial strategies. - * @param vmm_idx_to_sp_off_oprnd - vmm mapped to proper output spatial offset in - * elements inside operand intended to use in per_mb_spatial strategies. - * @param vmm_idx_to_mb_w_elem_off_addr - vmm mapped to proper output last dim - * per first dim offset in elements stored under memory address intended to use - * in per_mb_w strategies. - * @param vmm_idx_to_mb_w_elem_off_val - vmm mapped to proper output last dim - * per first dim offset in elements passed as raw value intended to use in - * per_mb_w strategies. - * @param vmm_idx_to_mb_w_off_oprnd - vmm mapped to proper output last dim - * per first dim offset in elements inside operand intended to use in per_mb_w - * strategies. - * @param vmm_idx_to_w_elem_off_addr - vmm mapped to proper output last dim - * offset in elements stored under memory address intended to use in per_w strategy. - * @param vmm_idx_to_w_elem_off_val - vmm mapped to proper output last dim - * offset in elements passed as raw value intended to use in per_w strategy. - * @param vmm_idx_to_w_off_oprnd - vmm mapped to proper output last dim offset - * in elements inside operand intended to use in per_w strategy. + * value intended to use in no_broadcast strategy, but also in other + * strategies whose calculations are based on no_broadcast strategy. * @param vmm_tail_idx - vmm indices that contains data don't fill the whole vector (tail). * @param is_dynamic_tail_load - determines whether to load with tail in * runtime (based on the value from reg_tail_size or opmask) or based on given @@ -281,26 +225,7 @@ enum class tail_lode_mode_t { STATIC, DYNAMIC, DEFAULT }; struct rhs_arg_dynamic_params_t { std::map vmm_idx_to_out_addr; std::map vmm_idx_to_out_reg; - - std::map vmm_idx_to_out_elem_off_addr; std::map vmm_idx_to_out_elem_off_val; - std::map vmm_idx_to_out_off_oprnd; - - std::map vmm_idx_to_oc_elem_off_addr; - std::map vmm_idx_to_oc_elem_off_val; - std::map vmm_idx_to_oc_off_oprnd; - - std::map vmm_idx_to_sp_elem_off_addr; - std::map vmm_idx_to_sp_elem_off_val; - std::map vmm_idx_to_sp_off_oprnd; - - std::map vmm_idx_to_mb_w_elem_off_addr; - std::map vmm_idx_to_mb_w_elem_off_val; - std::map vmm_idx_to_mb_w_off_oprnd; - - std::map vmm_idx_to_w_elem_off_addr; - std::map vmm_idx_to_w_elem_off_val; - std::map vmm_idx_to_w_off_oprnd; std::unordered_set vmm_tail_idx_; tail_lode_mode_t tail_load_mode = tail_lode_mode_t::DEFAULT; @@ -397,18 +322,6 @@ class jit_uni_binary_injector_t { /* * Helper functions responsible for preparing rhs tensor slice address. */ - void append_offset_from_operand( - const std::map &vmm_idx_to_elem_addr_off, - int vmm_idx, const Xbyak::Reg64 &addr_reg, - const Xbyak::Reg64 &tmp_reg, std::size_t elem_size_bytes) const; - void append_offset_under_mem_addr( - const std::map &vmm_idx_to_elem_addr_off, - int vmm_idx, const Xbyak::Reg64 &addr_reg, - const Xbyak::Reg64 &tmp_reg, std::size_t elem_size_bytes) const; - void append_value_offset( - const std::map &vmm_idx_to_elem_val_off, int vmm_idx, - const Xbyak::Reg64 &addr_reg, std::size_t elem_size_bytes) const; - void append_no_broadcast_offset( const std::map &vmm_idx_to_out_addr, const std::map &vmm_idx_to_out_reg,