Skip to content

Commit

Permalink
#8364: Disable implicit fallback for ttnn.pad
Browse files Browse the repository at this point in the history
  • Loading branch information
ayerofieiev-tt committed May 23, 2024
1 parent 35236b6 commit 9e5a8b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tests/ttnn/unit_tests/operations/test_pad.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from models.utility_functions import skip_for_wormhole_b0


@pytest.mark.skip(reason="ttnn.pad does not support row_major tensors because the kernel currently causes a PCC error")
@pytest.mark.parametrize("h", [32])
@pytest.mark.parametrize("w", [64])
@pytest.mark.parametrize("padding,torch_padding", [(((0, 1), (0, 2)), (0, 2, 0, 1)), (((1, 1), (4, 2)), (4, 2, 1, 1))])
Expand All @@ -35,6 +36,7 @@ def test_pad(device, h, w, padding, torch_padding, value):
assert_with_pcc(torch_output_tensor, output_tensor, 0.9999)


@pytest.mark.skip(reason="ttnn.pad does not support row_major tensors because the kernel currently causes a PCC error")
@pytest.mark.parametrize("h", [32])
@pytest.mark.parametrize("w", [64])
@pytest.mark.parametrize("padding,torch_padding", [(((0, 1), (0, 2)), (0, 2, 0, 1)), (((1, 1), (4, 2)), (4, 2, 1, 1))])
Expand Down Expand Up @@ -62,6 +64,7 @@ def test_pad_back_to_back(device, h, w, padding, torch_padding, value):
assert_with_pcc(torch_output_tensor, output_tensor, 0.9999)


@pytest.mark.skip(reason="ttnn.pad requires pad to start at 0")
@pytest.mark.parametrize("h", [32])
@pytest.mark.parametrize("w", [64])
@pytest.mark.parametrize("padding", [((0, 32), (0, 32)), ((1, 64), (0, 96)), ((0, 64), (0, 43)), ((32, 64), (64, 96))])
Expand Down
2 changes: 1 addition & 1 deletion ttnn/ttnn/operations/data_movement.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _pad_validate_input_tensors(operation_name, input_tensor, *args, **kwargs):
golden_function=_golden_function,
preprocess_golden_function_inputs=_preprocess_golden_function_inputs,
postprocess_golden_function_outputs=_postprocess_golden_function_outputs,
allow_to_fallback_to_golden_function_on_failure=True,
allow_to_fallback_to_golden_function_on_failure=False,
)
def pad(
input_tensor: ttnn.Tensor,
Expand Down

0 comments on commit 9e5a8b6

Please sign in to comment.