diff --git a/.github/workflows/ttnn-run-sweeps.yaml b/.github/workflows/ttnn-run-sweeps.yaml index 4e0ddec26a8..1bd08c3025a 100644 --- a/.github/workflows/ttnn-run-sweeps.yaml +++ b/.github/workflows/ttnn-run-sweeps.yaml @@ -235,7 +235,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 @@ -266,6 +265,7 @@ on: - eltwise.ternary_backward.addcmul_bw - eltwise.ternary_backward.addcdiv_bw - embedding.embedding + - embedding_bw.embedding_bw - reduction.backward.prod_bw.prod_bw - reduction.topk.topk - reduction.argmax.argmax 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 diff --git a/ttnn/cpp/ttnn/operations/embedding_backward/embedding_backward_pybind.cpp b/ttnn/cpp/ttnn/operations/embedding_backward/embedding_backward_pybind.cpp index f9e93cd87b4..d3daeb0d8f1 100644 --- a/ttnn/cpp/ttnn/operations/embedding_backward/embedding_backward_pybind.cpp +++ b/ttnn/cpp/ttnn/operations/embedding_backward/embedding_backward_pybind.cpp @@ -35,6 +35,8 @@ void py_bind_embedding_backward(py::module& module) { Returns: ttnn.Tensor: the output tensor. + Note: + The input and the output gradient tensors must have the same datatype. Example: >>> device_id = 0