-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ttnn-pytorch and tt-forge conv2d sweeps to nightly
- Loading branch information
Pavle Josipovic
committed
Feb 19, 2025
1 parent
7193d38
commit f9c1a62
Showing
2 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
tests/ttnn/nightly/unit_tests/operations/conv2d/test_conv2d_sweeps.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
from tests.sweep_framework.sweep_utils.conv2d_common import run_conv2d_short_sweep | ||
from tests.sweep_framework.sweeps.conv2d.short.conv2d_short_sweep import parameters as parameters_ttnn_pytorch | ||
from tests.sweep_framework.sweeps.conv2d.short.conv2d_short_sweep import ( | ||
failing_parameters as failing_parameters_ttnn_pytorch, | ||
) | ||
|
||
from tests.sweep_framework.sweeps.conv2d.short.conv2d_ttforge_sweep import parameters as parameters_ttnn_forge | ||
from tests.sweep_framework.sweeps.conv2d.short.conv2d_ttforge_sweep import ( | ||
failing_parameters as failing_parameters_ttnn_forge, | ||
) | ||
|
||
from models.utility_functions import ( | ||
skip_for_grayskull, | ||
is_wormhole_b0, | ||
) | ||
|
||
import pytest | ||
|
||
|
||
@skip_for_grayskull() | ||
@pytest.mark.parametrize("input_spec", parameters_ttnn_pytorch["short_sweep_suite_conv2d"]["input_specs"]) | ||
@pytest.mark.parametrize("device_params", [{"l1_small_size": 16384}], indirect=True) | ||
def test_ttnn_pytorch_sweep(device, input_spec): | ||
if device.core_grid.y != 8 and is_wormhole_b0(): | ||
pytest.skip("Needs 8x8 grid for wormhole_b0") | ||
|
||
# Check if input_spec is in failing_parameters | ||
if input_spec in failing_parameters_ttnn_pytorch: | ||
pytest.skip(f"Skipping test for failing input_spec: {input_spec}") | ||
|
||
pcc, messsage = run_conv2d_short_sweep( | ||
input_spec, | ||
device, | ||
)[0] | ||
assert pcc, messsage | ||
|
||
|
||
@skip_for_grayskull() | ||
@pytest.mark.parametrize("input_spec", parameters_ttnn_forge["ttforge_sweep_conv2d"]["input_specs"]) | ||
@pytest.mark.parametrize("device_params", [{"l1_small_size": 16384}], indirect=True) | ||
def test_tt_forge_sweep(device, input_spec): | ||
if device.core_grid.y != 8 and is_wormhole_b0(): | ||
pytest.skip("Needs 8x8 grid for wormhole_b0") | ||
|
||
# Check if input_spec is in failing_parameters | ||
if input_spec in failing_parameters_ttnn_forge: | ||
pytest.skip(f"Skipping test for failing input_spec: {input_spec}") | ||
|
||
pcc, messsage = run_conv2d_short_sweep( | ||
input_spec, | ||
device, | ||
)[0] | ||
assert pcc, messsage |