From b99c195d30f0acacf1876d219f76962a9fa39a50 Mon Sep 17 00:00:00 2001 From: mcw-anasuya Date: Mon, 4 Nov 2024 16:38:12 +0000 Subject: [PATCH] #13685: Move sweep test --- .github/workflows/ttnn-run-sweeps.yaml | 2 +- .../binary_backward => }/embedding_bw/embedding_bw.py | 9 +-------- .../{eltwise/backward => }/test_backward_embedding.py | 0 3 files changed, 2 insertions(+), 9 deletions(-) rename tests/sweep_framework/sweeps/{eltwise/binary_backward => }/embedding_bw/embedding_bw.py (96%) rename tests/ttnn/unit_tests/operations/{eltwise/backward => }/test_backward_embedding.py (100%) diff --git a/.github/workflows/ttnn-run-sweeps.yaml b/.github/workflows/ttnn-run-sweeps.yaml index fabd9c76050..5026d0c059e 100644 --- a/.github/workflows/ttnn-run-sweeps.yaml +++ b/.github/workflows/ttnn-run-sweeps.yaml @@ -232,7 +232,6 @@ on: - eltwise.binary_backward.ldexp_bw - eltwise.binary_backward.logaddexp_bw - eltwise.binary_backward.logaddexp2_bw - - eltwise.binary_backward.embedding_bw.embedding_bw - eltwise.binary_backward.addalpha_bw.addalpha_bw - eltwise.binary_backward.subalpha_bw.subalpha_bw - eltwise.binary_backward.xlogy_bw.xlogy_bw @@ -263,6 +262,7 @@ on: - eltwise.ternary_backward.addcmul_bw - eltwise.ternary_backward.addcdiv_bw - embedding.embedding + - embedding_bw.embedding_bw - reduction.topk.topk - reduction.argmax.argmax - reduction.prod diff --git a/tests/sweep_framework/sweeps/eltwise/binary_backward/embedding_bw/embedding_bw.py b/tests/sweep_framework/sweeps/embedding_bw/embedding_bw.py similarity index 96% rename from tests/sweep_framework/sweeps/eltwise/binary_backward/embedding_bw/embedding_bw.py rename to tests/sweep_framework/sweeps/embedding_bw/embedding_bw.py index a19fd9f1751..b7e748f9510 100644 --- a/tests/sweep_framework/sweeps/eltwise/binary_backward/embedding_bw/embedding_bw.py +++ b/tests/sweep_framework/sweeps/embedding_bw/embedding_bw.py @@ -6,7 +6,6 @@ from functools import partial import torch -import random import ttnn from tests.sweep_framework.sweep_utils.utils import gen_shapes from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt @@ -14,11 +13,6 @@ from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time from models.utility_functions import torch_random -# Override the default timeout in seconds for hang detection. -TIMEOUT = 30 - -random.seed(0) - # Parameters provided to the test vector generator are defined here. # They are defined as dict-type suites that contain the arguments to the run function as keys, and lists of possible inputs as values. @@ -91,8 +85,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) batch_size, seq_length, embeddings_dim, num_embeddings = embedding_args diff --git a/tests/ttnn/unit_tests/operations/eltwise/backward/test_backward_embedding.py b/tests/ttnn/unit_tests/operations/test_backward_embedding.py similarity index 100% rename from tests/ttnn/unit_tests/operations/eltwise/backward/test_backward_embedding.py rename to tests/ttnn/unit_tests/operations/test_backward_embedding.py