diff --git a/tests/sweep_framework/sweeps/eltwise/binary/add/add_all_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/binary/add/add_all_pytorch2.py index 61421ebb971..b8851386f59 100644 --- a/tests/sweep_framework/sweeps/eltwise/binary/add/add_all_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/binary/add/add_all_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.add.Tensor.md # 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. @@ -548,8 +544,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/binary/add/add_set2_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/binary/add/add_set2_pytorch2.py index 1f251c37e6b..ae166e3bd39 100644 --- a/tests/sweep_framework/sweeps/eltwise/binary/add/add_set2_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/binary/add/add_set2_pytorch2.py @@ -14,6 +14,8 @@ from models.utility_functions import torch_random +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.add.Tensor.md + # 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. # Each suite has a key name (in this case "suite_1") which will associate the test vectors to this specific suite of inputs. diff --git a/tests/sweep_framework/sweeps/eltwise/binary/div/div_tensor_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/binary/div/div_tensor_pytorch2.py index e33c975925d..b1cea5883da 100644 --- a/tests/sweep_framework/sweeps/eltwise/binary/div/div_tensor_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/binary/div/div_tensor_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.div.Tensor.md parameters = { @@ -143,8 +139,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) input_shape = input_specs["shape"] if len(input_shape) == 0: diff --git a/tests/sweep_framework/sweeps/eltwise/binary/eq/eq_scalar_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/binary/eq/eq_scalar_pytorch2.py index 5416bf2e8ec..76886ed0de0 100644 --- a/tests/sweep_framework/sweeps/eltwise/binary/eq/eq_scalar_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/binary/eq/eq_scalar_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.eq.Scalar.md # Parameters provided to the test vector generator are defined here. @@ -63,8 +59,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/binary/floor_divide/floor_divide_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/binary/floor_divide/floor_divide_pytorch2.py index e8c928d4c6b..0818fae74f9 100644 --- a/tests/sweep_framework/sweeps/eltwise/binary/floor_divide/floor_divide_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/binary/floor_divide/floor_divide_pytorch2.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,7 @@ 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) - +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.floor_divide.default.md # 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. @@ -62,8 +57,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/binary/gt/gt_scalar_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/binary/gt/gt_scalar_pytorch2.py index a535184fbd4..e7e5b0a51e6 100644 --- a/tests/sweep_framework/sweeps/eltwise/binary/gt/gt_scalar_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/binary/gt/gt_scalar_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.gt.Scalar.md # Parameters provided to the test vector generator are defined here. @@ -54,8 +50,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/binary/le/le_tensor_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/binary/le/le_tensor_pytorch2.py index ad82ae4120e..1a484d2d1de 100644 --- a/tests/sweep_framework/sweeps/eltwise/binary/le/le_tensor_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/binary/le/le_tensor_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.le.Tensor.md # 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. @@ -53,8 +49,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/binary/lt/lt_scalar_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/binary/lt/lt_scalar_pytorch2.py index 882c1227971..d5b77373c3f 100644 --- a/tests/sweep_framework/sweeps/eltwise/binary/lt/lt_scalar_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/binary/lt/lt_scalar_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.lt.Scalar.md parameters = { @@ -47,8 +43,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/binary/lt/lt_tensor_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/binary/lt/lt_tensor_pytorch2.py index 9bc95e80b0f..f14165c2997 100644 --- a/tests/sweep_framework/sweeps/eltwise/binary/lt/lt_tensor_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/binary/lt/lt_tensor_pytorch2.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,10 +13,7 @@ from tests.ttnn.utils_for_testing import assert_equal, 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.lt.Tensor.md parameters = { "nightly": { @@ -45,8 +41,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype @@ -54,7 +49,7 @@ def run( torch_input_tensor_b = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_b_dtype )(input_shape_b) - + golden_function = ttnn.get_golden_function(ttnn.lt) torch_output_tensor = golden_function(torch_input_tensor_a, torch_input_tensor_b) diff --git a/tests/sweep_framework/sweeps/eltwise/binary/multiply/mul_tensor_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/binary/multiply/mul_tensor_pytorch2.py index 2508cc0dc62..c3b24e3e12c 100644 --- a/tests/sweep_framework/sweeps/eltwise/binary/multiply/mul_tensor_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/binary/multiply/mul_tensor_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.mul.Tensor.md # 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. @@ -427,8 +423,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/binary/multiply/multiply_scalar_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/binary/multiply/multiply_scalar_pytorch2.py index 002be7969e1..b8efc240809 100644 --- a/tests/sweep_framework/sweeps/eltwise/binary/multiply/multiply_scalar_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/binary/multiply/multiply_scalar_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.mul.Scalar.md parameters = { @@ -43,8 +39,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/binary/ne/ne_scalar_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/binary/ne/ne_scalar_pytorch2.py index 0fab592d017..beb409e4fa9 100644 --- a/tests/sweep_framework/sweeps/eltwise/binary/ne/ne_scalar_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/binary/ne/ne_scalar_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.ne.Scalar.md parameters = { @@ -48,8 +44,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/binary/remainder/remainder_scalar_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/binary/remainder/remainder_scalar_pytorch2.py index ea9cb01c98d..59b5fa43506 100644 --- a/tests/sweep_framework/sweeps/eltwise/binary/remainder/remainder_scalar_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/binary/remainder/remainder_scalar_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.remainder.Scalar.md # Parameters provided to the test vector generator are defined here. @@ -52,8 +48,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/binary/subtract/subtract_tensor_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/binary/subtract/subtract_tensor_pytorch2.py index 2ff005c5175..27023ccdfa4 100644 --- a/tests/sweep_framework/sweeps/eltwise/binary/subtract/subtract_tensor_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/binary/subtract/subtract_tensor_pytorch2.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,9 +13,7 @@ from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time from models.utility_functions import torch_random -TIMEOUT = 30 - -random.seed(0) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.sub.Tensor.md parameters = { @@ -127,8 +124,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) input_shape = input_specs["shape"] torch_input_tensor_a = gen_func_with_cast_tt( diff --git a/tests/sweep_framework/sweeps/eltwise/composite/binary/maximum/maximum_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/composite/binary/maximum/maximum_pytorch2.py index 1948a035341..be15bd14bc8 100644 --- a/tests/sweep_framework/sweeps/eltwise/composite/binary/maximum/maximum_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/composite/binary/maximum/maximum_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.maximum.default.md # Parameters provided to the test vector generator are defined here. @@ -32,8 +28,12 @@ {"shape1": [1, 16, 19, 19], "shape2": []}, {"shape1": [1, 16, 59, 59], "shape2": []}, ], - "input_a_dtype": [ttnn.bfloat16, ttnn.bfloat8_b], - "input_b_dtype": [ttnn.bfloat16, ttnn.bfloat8_b], + "input_a_dtype": [ + ttnn.bfloat16, + ], + "input_b_dtype": [ + ttnn.bfloat16, + ], "input_a_layout": [ttnn.TILE_LAYOUT], "input_b_layout": [ttnn.TILE_LAYOUT], "input_a_memory_config": [ttnn.DRAM_MEMORY_CONFIG, ttnn.L1_MEMORY_CONFIG], @@ -59,8 +59,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype )(input_shape["shape1"]) diff --git a/tests/sweep_framework/sweeps/eltwise/composite/binary/minimum/minimum_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/composite/binary/minimum/minimum_pytorch2.py index 15180b3af0e..ad68bf0338b 100644 --- a/tests/sweep_framework/sweeps/eltwise/composite/binary/minimum/minimum_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/composite/binary/minimum/minimum_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.minimum.default.md # Parameters provided to the test vector generator are defined here. @@ -61,8 +57,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype )(input_shape) diff --git a/tests/sweep_framework/sweeps/eltwise/composite/binary/pow/pow_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/composite/binary/pow/pow_pytorch2.py index 852f2c051ea..9ea4d8ab1d0 100644 --- a/tests/sweep_framework/sweeps/eltwise/composite/binary/pow/pow_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/composite/binary/pow/pow_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.pow.Tensor_Scalar.md # Parameters provided to the test vector generator are defined here. @@ -79,8 +75,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype )(input_shape["shape"]) diff --git a/tests/sweep_framework/sweeps/eltwise/composite/binary/pow/pow_scalar_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/composite/binary/pow/pow_scalar_pytorch2.py index 82b54093028..6ca277010cb 100644 --- a/tests/sweep_framework/sweeps/eltwise/composite/binary/pow/pow_scalar_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/composite/binary/pow/pow_scalar_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.pow.Scalar.md # Parameters provided to the test vector generator are defined here. @@ -56,8 +52,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype )(input_shape["shape"]) diff --git a/tests/sweep_framework/sweeps/eltwise/composite/binary/pow/pow_tensor_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/composite/binary/pow/pow_tensor_pytorch2.py index 038c5efb2a2..142bbd8cd6c 100644 --- a/tests/sweep_framework/sweeps/eltwise/composite/binary/pow/pow_tensor_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/composite/binary/pow/pow_tensor_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.pow.Tensor_Tensor.md # Parameters provided to the test vector generator are defined here. @@ -56,8 +52,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype )(input_shape["shape1"]) diff --git a/tests/sweep_framework/sweeps/eltwise/ternary/where/where_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/ternary/where/where_pytorch2.py index 20ad459ec77..9c52e6e869d 100644 --- a/tests/sweep_framework/sweeps/eltwise/ternary/where/where_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/ternary/where/where_pytorch2.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, gen_bin @@ -14,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.where.self.md # Parameters provided to the test vector generator are defined here. @@ -76,8 +72,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt(gen_bin, input_a_dtype)(input_shape["shape1"]) torch_input_tensor_b = gen_func_with_cast_tt( diff --git a/tests/sweep_framework/sweeps/eltwise/unary/abs/abs_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/abs/abs_pytorch2.py index b1c9dba81e7..70f2057dea1 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/abs/abs_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/abs/abs_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.abs.default.md # 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. @@ -50,8 +46,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/bitwise/bitwise_not_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/bitwise/bitwise_not_pytorch2.py index 906765c0c77..68da5744630 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/bitwise/bitwise_not_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/bitwise/bitwise_not_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.bitwise_not.default.md # 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. @@ -55,8 +51,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-2147483647, high=2147483648, dtype=torch.int64), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/ceil/ceil_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/ceil/ceil_pytorch2.py index 76f2da3a7ce..2467fd96975 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/ceil/ceil_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/ceil/ceil_pytorch2.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,10 +13,7 @@ from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time from models.utility_functions import torch_random, is_wormhole_b0 -# Override the default timeout in seconds for hang detection. -TIMEOUT = 30 - -random.seed(0) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.ceil.default.md # 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. @@ -55,8 +51,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/clamp/clamp_min_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/clamp/clamp_min_pytorch2.py index c86fac2d586..7dfbdb196ca 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/clamp/clamp_min_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/clamp/clamp_min_pytorch2.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, gen_low_high_scalars from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt @@ -14,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.clamp_min.default.md parameters = { "nightly": { @@ -50,8 +46,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/clamp/clamp_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/clamp/clamp_pytorch2.py index 66db3c38185..fd5eee54dfb 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/clamp/clamp_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/clamp/clamp_pytorch2.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, gen_low_high_scalars from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt @@ -14,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.clamp.default.md parameters = { "nightly": { @@ -94,8 +90,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/cos/cos_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/cos/cos_pytorch2.py index 24483747e75..f1404029468 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/cos/cos_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/cos/cos_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.cos.default.md # 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. @@ -47,8 +43,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=0, high=6.283185307179586, dtype=torch.float16), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/elu/elu_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/elu/elu_pytorch2.py index 61fe073b6ed..137c40bfd5f 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/elu/elu_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/elu/elu_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.elu.default.md # 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. @@ -51,8 +47,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/exp/exp_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/exp/exp_pytorch2.py index 3717caa08f6..cf019aa3dd2 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/exp/exp_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/exp/exp_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.exp.default.md # 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. @@ -61,8 +57,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-10, high=10, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/floor/floor_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/floor/floor_pytorch2.py index f92f21840a4..cf181fcfee9 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/floor/floor_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/floor/floor_pytorch2.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,10 +13,7 @@ from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time from models.utility_functions import torch_random, is_wormhole_b0 -# Override the default timeout in seconds for hang detection. -TIMEOUT = 30 - -random.seed(0) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.floor.default.md # Parameters provided to the test vector generator are defined here. @@ -56,8 +52,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/gelu/gelu_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/gelu/gelu_pytorch2.py index 56be98e3edc..6f26c75ee5a 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/gelu/gelu_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/gelu/gelu_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.gelu.default.md # 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. @@ -103,8 +99,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float16), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/hardsigmoid/hardsigmoid_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/hardsigmoid/hardsigmoid_pytorch2.py index 01675a87967..64fbe7d228f 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/hardsigmoid/hardsigmoid_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/hardsigmoid/hardsigmoid_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.hardsigmoid.default.md # 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. @@ -63,8 +59,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float16), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/hardswish/hardswish_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/hardswish/hardswish_pytorch2.py index a31379dcd30..9e9d54b53f1 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/hardswish/hardswish_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/hardswish/hardswish_pytorch2.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, gen_low_high_scalars from tests.tt_eager.python_api_testing.sweep_tests.generation_funcs import gen_func_with_cast_tt @@ -14,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.hardswish.default.md parameters = { "nightly": { @@ -67,8 +63,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/hardtanh/hardtanh_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/hardtanh/hardtanh_pytorch2.py index 1a228996e2f..3f2d1ccf800 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/hardtanh/hardtanh_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/hardtanh/hardtanh_pytorch2.py @@ -13,6 +13,7 @@ from tests.ttnn.utils_for_testing import check_with_pcc, start_measuring_time, stop_measuring_time from models.utility_functions import torch_random +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.hardtanh.default.md parameters = { "nightly": { diff --git a/tests/sweep_framework/sweeps/eltwise/unary/leaky_relu/leaky_relu_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/leaky_relu/leaky_relu_pytorch2.py index 68cfa321eca..8fa76028bb6 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/leaky_relu/leaky_relu_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/leaky_relu/leaky_relu_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.leaky_relu.default.md # 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. @@ -69,8 +65,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float16), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/log/log_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/log/log_pytorch2.py index 35380f08bf8..a4513d7a446 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/log/log_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/log/log_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.log.default.md # 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. @@ -47,8 +43,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=1, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/logical_not/logical_not_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/logical_not/logical_not_pytorch2.py index b2e8fd19a7a..5fb105334c0 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/logical_not/logical_not_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/logical_not/logical_not_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.logical_not.default.md parameters = { "nightly": { @@ -41,8 +37,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/neg/neg_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/neg/neg_pytorch2.py index 13d5e9687a7..c073fb50e26 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/neg/neg_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/neg/neg_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.neg.default.md parameters = { "nightly": { @@ -30,8 +26,13 @@ [17, 17], [2, 2], # [s0 + 1, s0 + 1] + # new + [1, 512], + [2, 512], + ], + "input_dtype": [ + ttnn.bfloat16, ], - "input_dtype": [ttnn.bfloat16, ttnn.bfloat8_b], "input_layout": [ttnn.TILE_LAYOUT], "input_memory_config": [ttnn.DRAM_MEMORY_CONFIG, ttnn.L1_MEMORY_CONFIG], "output_memory_config": [ttnn.DRAM_MEMORY_CONFIG, ttnn.L1_MEMORY_CONFIG], @@ -48,8 +49,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/relu/relu_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/relu/relu_pytorch2.py index d89c2cac6eb..c1e9bb749e0 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/relu/relu_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/relu/relu_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.relu.default.md # 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. @@ -478,8 +474,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/rsqrt/rsqrt_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/rsqrt/rsqrt_pytorch2.py index 94383b861b0..9e1bb8bfbea 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/rsqrt/rsqrt_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/rsqrt/rsqrt_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.rsqrt.default.md # 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. @@ -57,8 +53,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/rsub/rsub_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/rsub/rsub_pytorch2.py index 09248706b58..66b90c575c1 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/rsub/rsub_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/rsub/rsub_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.rsub.Scalar.md # Parameters provided to the test vector generator are defined here. @@ -78,7 +74,12 @@ [800, 1], [80], ], - "input_a_dtype": [ttnn.bfloat16, ttnn.bfloat8_b], + "scalar": [ + 1.0, + ], + "input_a_dtype": [ + ttnn.bfloat16, + ], "input_a_layout": [ttnn.TILE_LAYOUT], "input_a_memory_config": [ttnn.DRAM_MEMORY_CONFIG, ttnn.L1_MEMORY_CONFIG], "output_memory_config": [ttnn.DRAM_MEMORY_CONFIG, ttnn.L1_MEMORY_CONFIG], @@ -92,6 +93,7 @@ # If you defined a mesh_device_fixture above, the object you yielded will be passed into this function as 'device'. Otherwise, it will be the default ttnn device opened by the infra. def run( input_shape, + scalar, input_a_dtype, input_a_layout, input_a_memory_config, @@ -99,17 +101,14 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype )(input_shape) - factor = 1.0 - golden_function = ttnn.get_golden_function(ttnn.rsub) - torch_output_tensor = golden_function(torch_input_tensor_a, factor) + torch_output_tensor = golden_function(torch_input_tensor_a, scalar) input_tensor_a = ttnn.from_torch( torch_input_tensor_a, @@ -120,7 +119,7 @@ def run( ) start_time = start_measuring_time() - output_tensor = ttnn.rsub(input_tensor_a, value=factor, memory_config=output_memory_config) + output_tensor = ttnn.rsub(input_tensor_a, value=scalar, memory_config=output_memory_config) output_tensor = ttnn.to_torch(output_tensor) e2e_perf = stop_measuring_time(start_time) diff --git a/tests/sweep_framework/sweeps/eltwise/unary/sigmoid/sigmoid_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/sigmoid/sigmoid_pytorch2.py index 87e9e3da11b..5952b14ba0b 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/sigmoid/sigmoid_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/sigmoid/sigmoid_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.sigmoid.default.md # 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. @@ -105,8 +101,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/silu/silu_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/silu/silu_pytorch2.py index 1e449af8131..a0ec047bfd3 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/silu/silu_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/silu/silu_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.silu.default.md # 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. @@ -75,8 +71,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float16), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/sin/sin_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/sin/sin_pytorch2.py index 39afb69974a..a0afba58eb1 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/sin/sin_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/sin/sin_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.sin.default.md # 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. @@ -50,8 +46,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=0, high=6.283185307179586, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/tanh/tanh_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/tanh/tanh_pytorch2.py index 6c9fffb6de3..9ca638bd294 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/tanh/tanh_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/tanh/tanh_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.tanh.default.md # 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. @@ -66,8 +62,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=-100, high=100, dtype=torch.float32), input_a_dtype diff --git a/tests/sweep_framework/sweeps/eltwise/unary/tril/tril_pytorch2.py b/tests/sweep_framework/sweeps/eltwise/unary/tril/tril_pytorch2.py index a3848e61e90..b783befbe71 100644 --- a/tests/sweep_framework/sweeps/eltwise/unary/tril/tril_pytorch2.py +++ b/tests/sweep_framework/sweeps/eltwise/unary/tril/tril_pytorch2.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,10 +13,7 @@ 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) +# Ref: https://github.com/tenstorrent/pytorch2.0_ttnn/blob/main/docs/operations/aten.tril.default.md # 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. @@ -49,8 +45,7 @@ def run( *, device, ) -> list: - data_seed = random.randint(0, 20000000) - torch.manual_seed(data_seed) + torch.manual_seed(0) torch_input_tensor_a = gen_func_with_cast_tt( partial(torch_random, low=0, high=6.283185307179586, dtype=torch.float32), input_a_dtype