Skip to content

Commit

Permalink
#6991 WHB0 tests file updates
Browse files Browse the repository at this point in the history
* #6991: Update test skips

* #6991: Rename to update the position of the test files

---------

Co-authored-by: umadevimcw <[email protected]>
  • Loading branch information
umadevimcw authored Nov 6, 2024
1 parent 1f87f38 commit d400890
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 19 deletions.
5 changes: 0 additions & 5 deletions tests/ttnn/unit_tests/operations/test_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import ttnn
from tests.ttnn.utils_for_testing import assert_with_pcc
from models.utility_functions import torch_random, is_wormhole_b0


@pytest.mark.parametrize("batch_size", [1, 16])
Expand All @@ -17,8 +16,6 @@
@pytest.mark.parametrize("dim", [-1, -2])
def test_std(device, batch_size, h, w, dim):
torch.manual_seed(0)
if is_wormhole_b0() and dim == -2:
pytest.skip("Issue #6991: PCC mismatch for dim=-2")

torch_input_tensor = torch.randn((batch_size, h, w), dtype=torch.bfloat16)
torch_output_tensor = torch.std(torch_input_tensor, dim=dim, keepdim=True)
Expand All @@ -39,8 +36,6 @@ def test_std(device, batch_size, h, w, dim):
@pytest.mark.parametrize("dim", [-1, -2])
def test_var(device, batch_size, h, w, dim):
torch.manual_seed(0)
if is_wormhole_b0() and dim == -2:
pytest.skip("Issue #6991: PCC mismatch for dim=-2")

torch_input_tensor = torch.randn((batch_size, h, w), dtype=torch.bfloat16)
torch_output_tensor = torch.var(torch_input_tensor, dim=dim, keepdim=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import ttnn
from tests.ttnn.utils_for_testing import assert_with_pcc
from models.utility_functions import torch_random, is_wormhole_b0, is_wormhole_b0
from models.utility_functions import torch_random


@pytest.mark.parametrize("batch_size", [1, 16, 1, 16])
Expand All @@ -18,9 +18,6 @@
def test_mean(device, batch_size, h, w, dim):
torch.manual_seed(0)

if is_wormhole_b0() and dim == -2:
pytest.skip("Issue #6991: Wormhole B0: mean operation fails for dim=-2")

torch_input_tensor = torch_random((batch_size, h, w), -1, 1, dtype=torch.bfloat16)
torch_output_tensor = torch.mean(torch_input_tensor, dim=dim, keepdim=True, dtype=torch.bfloat16)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@

import ttnn
from tests.ttnn.utils_for_testing import assert_with_pcc
from models.utility_functions import torch_random, is_wormhole_b0
from models.utility_functions import torch_random


@pytest.mark.parametrize("batch_size", [1, 16, 1, 16])
@pytest.mark.parametrize("h", [32, 64, 41, 37])
@pytest.mark.parametrize("w", [32, 64, 31, 63])
@pytest.mark.parametrize("dim", [-1, -2])
def test_min(device, batch_size, h, w, dim):
if is_wormhole_b0() and dim == -2:
pytest.skip("Issue #6991: PCC mismatch for dim=-2")
torch.manual_seed(0)

torch_input_tensor = torch_random((batch_size, h, w), -100, 100, dtype=torch.bfloat16)
Expand All @@ -37,8 +35,6 @@ def test_min(device, batch_size, h, w, dim):
@pytest.mark.parametrize("h", [32, 64, 41, 37])
@pytest.mark.parametrize("w", [32, 64, 31, 63])
def test_min_global(device, batch_size, h, w):
if is_wormhole_b0():
pytest.skip("Issue #6991: PCC mismatch")
torch.manual_seed(0)

torch_input_tensor = torch_random((batch_size, h, w), -100, 100, dtype=torch.bfloat16)
Expand Down
6 changes: 1 addition & 5 deletions tests/ttnn/unit_tests/operations/test_sum.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import ttnn
from tests.ttnn.utils_for_testing import assert_with_pcc
from models.utility_functions import torch_random, is_wormhole_b0
from models.utility_functions import torch_random


@pytest.mark.parametrize("batch_size", [1, 16, 1, 16])
Expand All @@ -17,8 +17,6 @@
@pytest.mark.parametrize("dim", [-1, -2, (2, 1)])
def test_sum(device, batch_size, h, w, dim):
torch.manual_seed(0)
if is_wormhole_b0():
pytest.skip("Issue #6991: PCC mismatch")

torch_input_tensor = torch_random((batch_size, h, w), -100, 100, dtype=torch.bfloat16)
torch_output_tensor = torch.sum(torch_input_tensor, dim=dim, keepdim=True)
Expand All @@ -38,8 +36,6 @@ def test_sum(device, batch_size, h, w, dim):
@pytest.mark.parametrize("w", [32, 64, 31, 63])
def test_sum_global(device, batch_size, h, w):
torch.manual_seed(0)
if is_wormhole_b0():
pytest.skip("Issue #6991: PCC mismatch")

torch_input_tensor = torch_random((batch_size, h, w), -100, 100, dtype=torch.bfloat16)
torch_output_tensor = torch.sum(torch_input_tensor)
Expand Down

0 comments on commit d400890

Please sign in to comment.