Skip to content

Commit

Permalink
#0: Adjust pcc + test some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
TT-BrianLiu committed Jan 23, 2025
1 parent 755a0d9 commit 6828830
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def run_pre_allgather_layernorm(
@pytest.mark.parametrize(
"min_pcc_ex2",
[
0.983,
0.982,
],
)
@pytest.mark.parametrize(("fuse_residual", "max_atol_ex2"), [(False, 0.04), (True, 0.09)])
Expand Down Expand Up @@ -275,7 +275,7 @@ def test_pre_allgather_layernorm(
@pytest.mark.parametrize(("mean", "std"), ([0, 1],))
@pytest.mark.parametrize("core_grid", ((4, 1),))
@pytest.mark.parametrize(("min_pcc_ex", "max_atol_ex"), [(0.9997, 0.01)])
@pytest.mark.parametrize(("min_pcc_ex2", "max_atol_ex2"), [(0.987, 0.04)])
@pytest.mark.parametrize(("min_pcc_ex2", "max_atol_ex2"), [(0.986, 0.04)])
def test_pre_allgather_layernorm_1d_reduce(
device,
use_program_cache,
Expand Down
2 changes: 1 addition & 1 deletion tt_metal/api/tt-metalium/blockfloat_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ inline uint8_t convert_u32_to_bfp(uint32_t input, uint32_t shared_exp, bool is_e
// add hidden 1
mantissa = (1 << 23) | mantissa;

if (shared_exp >= exp) {
if (shared_exp > exp) {
int exp_diff = shared_exp - exp;
// shift mantissa further down by exp diff
// In bit-shift operation (A >> B), the result is undefined if B is greater than or equal to the number of bits
Expand Down

0 comments on commit 6828830

Please sign in to comment.