Skip to content

Commit

Permalink
Added flag to disable src zero detection flag for eltwise unary/sfpu …
Browse files Browse the repository at this point in the history
…ops in blackhole
  • Loading branch information
atatuzunerTT committed Feb 24, 2025
1 parent 2456a22 commit a7c822c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 11 additions & 4 deletions tt_metal/hw/ckernels/blackhole/metal/llk_api/llk_unpack_A_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,33 @@
* LLK UNPACK A
*************************************************************************/

template <bool is_fp32_dest_acc_en = false, StochRndType stoch_rnd_mode = StochRndType::None>
template <
bool is_fp32_dest_acc_en = false,
StochRndType stoch_rnd_mode = StochRndType::None,
bool disable_src_zero_flag = false>
inline void llk_unpack_A_hw_configure(
const llk_unpack_A_params_t* unpack_A_params, const int within_face_16x16_transpose = 0) {
const uint32_t unpA_operand_id = get_operand_id(unpack_A_params->unpA_operand);
const uint32_t unpA_num_faces = get_operand_num_faces(unpA_operand_id);
const uint32_t unpA_face_r_dim = get_operand_face_r_dim(unpA_operand_id);

_llk_unpack_A_hw_configure_<is_fp32_dest_acc_en, stoch_rnd_mode>(
_llk_unpack_A_hw_configure_<is_fp32_dest_acc_en, stoch_rnd_mode, disable_src_zero_flag>(
unpack_src_format[unpA_operand_id],
unpack_dst_format[unpA_operand_id],
unpA_face_r_dim,
within_face_16x16_transpose,
unpA_num_faces);
}

template <bool is_fp32_dest_acc_en = false, StochRndType stoch_rnd_mode = StochRndType::None>
template <
bool is_fp32_dest_acc_en = false,
StochRndType stoch_rnd_mode = StochRndType::None,
bool disable_src_zero_flag = false>
inline void llk_unpack_A_hw_configure_disaggregated(
const std::uint32_t unpA_operand, const int within_face_16x16_transpose = 0) {
const llk_unpack_A_params_t unpack_A_params = {.unpA_operand = unpA_operand};
llk_unpack_A_hw_configure<is_fp32_dest_acc_en, stoch_rnd_mode>(&unpack_A_params, within_face_16x16_transpose);
llk_unpack_A_hw_configure<is_fp32_dest_acc_en, stoch_rnd_mode, disable_src_zero_flag>(
&unpack_A_params, within_face_16x16_transpose);
}

template <
Expand Down

0 comments on commit a7c822c

Please sign in to comment.