Skip to content

Commit

Permalink
#14032: change bfp8 pack src format to fp16
Browse files Browse the repository at this point in the history
  • Loading branch information
rdjogoTT committed Nov 13, 2024
1 parent b324bec commit 0501fe4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tt_metal/jit_build/data_format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ const DataFormat get_single_pack_src_format(
TT_FATAL(arch != tt::ARCH::GRAYSKULL, "Dest Fp32 mode is not supported for arch grayskull");

if (is_bfp_format(output_format)) {
pack_src_format = DataFormat::Bfp8_b;
pack_src_format = is_exp_b_format(output_format) ? DataFormat::Float16_b : DataFormat::Float16;
} else if(is_exp_b_format(output_format) || (output_format == DataFormat::Float32)) {
pack_src_format = output_format;
} else if(output_format == DataFormat::Float16){
Expand Down Expand Up @@ -374,7 +374,7 @@ const DataFormat get_single_pack_src_format(
}
pack_src_format = unpack_conditional_dst_format;
} else if (is_bfp_format(output_format)) {
pack_src_format = is_exp_b_format(output_format) ? DataFormat::Bfp8_b : DataFormat::Bfp8;
pack_src_format = is_exp_b_format(output_format) ? DataFormat::Float16_b : DataFormat::Float16;
} else {
pack_src_format = output_format;
}
Expand All @@ -390,7 +390,7 @@ const DataFormat get_single_pack_src_format(
DataFormat pack_src_format_tmp = output_format;

if (is_bfp_format(output_format)) {
pack_src_format_tmp = is_exp_b_format(output_format) ? DataFormat::Bfp8_b : DataFormat::Bfp8;
pack_src_format_tmp = is_exp_b_format(output_format) ? DataFormat::Float16_b : DataFormat::Float16;
}

if (pack_src_format_tmp != DataFormat::Float32) {
Expand Down

0 comments on commit 0501fe4

Please sign in to comment.