diff --git a/tests/tt_eager/python_api_testing/unit_testing/backward_ops/test_backward_logaddexp.py b/tests/tt_eager/python_api_testing/unit_testing/backward_ops/test_backward_logaddexp.py index ebc4388a810..4f0e06d37f0 100644 --- a/tests/tt_eager/python_api_testing/unit_testing/backward_ops/test_backward_logaddexp.py +++ b/tests/tt_eager/python_api_testing/unit_testing/backward_ops/test_backward_logaddexp.py @@ -5,7 +5,7 @@ import torch import pytest import tt_lib -from tests.tt_eager.python_api_testing.unit_testing.backward_ops.utility_funcs import data_gen_pt_tt, compare_results +from tests.tt_eager.python_api_testing.unit_testing.backward_ops.utility_funcs import data_gen_with_range, compare_pcc @pytest.mark.parametrize( @@ -17,10 +17,10 @@ ), ) def test_bw_logaddexp(input_shapes, device): - in_data, input_tensor = data_gen_pt_tt(input_shapes, device, True) - other_data, other_tensor = data_gen_pt_tt(input_shapes, device, True) + in_data, input_tensor = data_gen_with_range(input_shapes, -10, 10, device, True) + other_data, other_tensor = data_gen_with_range(input_shapes, -20, 20, device, True) - grad_data, grad_tensor = data_gen_pt_tt(input_shapes, device) + grad_data, grad_tensor = data_gen_with_range(input_shapes, -5, 5, device) tt_output_tensor_on_device = tt_lib.tensor.logaddexp_bw(grad_tensor, input_tensor, other_tensor) @@ -32,5 +32,5 @@ def test_bw_logaddexp(input_shapes, device): pyt_y.backward(gradient=grad_data) golden_tensor = [in_data.grad, other_data.grad] - status = compare_results(tt_output_tensor_on_device, golden_tensor) + status = compare_pcc(tt_output_tensor_on_device, golden_tensor) assert status diff --git a/tests/tt_eager/python_api_testing/unit_testing/backward_ops/test_backward_logaddexp2.py b/tests/tt_eager/python_api_testing/unit_testing/backward_ops/test_backward_logaddexp2.py index 3e0baf44f11..cf77a981049 100644 --- a/tests/tt_eager/python_api_testing/unit_testing/backward_ops/test_backward_logaddexp2.py +++ b/tests/tt_eager/python_api_testing/unit_testing/backward_ops/test_backward_logaddexp2.py @@ -5,7 +5,10 @@ import torch import pytest import tt_lib -from tests.tt_eager.python_api_testing.unit_testing.backward_ops.utility_funcs import data_gen_pt_tt, compare_results +from tests.tt_eager.python_api_testing.unit_testing.backward_ops.utility_funcs import ( + data_gen_with_range, + compare_pcc, +) @pytest.mark.parametrize( @@ -17,10 +20,10 @@ ), ) def test_bw_logaddexp2(input_shapes, device): - in_data, input_tensor = data_gen_pt_tt(input_shapes, device, True) - other_data, other_tensor = data_gen_pt_tt(input_shapes, device, True) + in_data, input_tensor = data_gen_with_range(input_shapes, -10, 10, device, True) + other_data, other_tensor = data_gen_with_range(input_shapes, -20, 20, device, True) - grad_data, grad_tensor = data_gen_pt_tt(input_shapes, device) + grad_data, grad_tensor = data_gen_with_range(input_shapes, -5, 5, device) tt_output_tensor_on_device = tt_lib.tensor.logaddexp2_bw(grad_tensor, input_tensor, other_tensor) @@ -32,5 +35,5 @@ def test_bw_logaddexp2(input_shapes, device): pyt_y.backward(gradient=grad_data) golden_tensor = [in_data.grad, other_data.grad] - status = compare_results(tt_output_tensor_on_device, golden_tensor) + status = compare_pcc(tt_output_tensor_on_device, golden_tensor) assert status