Skip to content

Commit

Permalink
#6721: Fix log nan issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthreshx committed Sep 23, 2024
1 parent 96fd0df commit 792f99d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
import torch

import ttnn
from models.utility_functions import comp_pcc
from models.utility_functions import comp_pcc, skip_for_grayskull, skip_for_wormhole_b0
from loguru import logger


@skip_for_grayskull("https://github.com/tenstorrent/tt-metal/issues/12776")
@skip_for_wormhole_b0("https://github.com/tenstorrent/tt-metal/issues/12776")
def test_pow_fractional_composite(device):
torch.manual_seed(577215)
N = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ sfpi_inline void calculate_log_body(const uint log_base_scale_factor) {
}
v_endif;

v_if (in < 0.0F) {
result = std::numeric_limits<float>::quiet_NaN();
}
v_endif;

dst_reg[0] = result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ sfpi_inline void calculate_log_body(const uint log_base_scale_factor)
}
v_endif;

v_if (in < 0.0F) {
result = std::numeric_limits<float>::quiet_NaN();
}
v_endif;

dst_reg[0] = result;
}

Expand Down

0 comments on commit 792f99d

Please sign in to comment.