From 6c6b20a1e4853dfd22eeb3c8265599ea61d37b8f Mon Sep 17 00:00:00 2001 From: Jackson McClintock Date: Sat, 13 Apr 2024 12:38:51 -0400 Subject: [PATCH 1/3] fix: fix input dtypes in frontend tests for torch.tensor --- .../test_frontends/test_torch/test_tensor.py | 637 +++++++++--------- 1 file changed, 319 insertions(+), 318 deletions(-) diff --git a/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py b/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py index 10a8b3385fbf3..20804325a195a 100644 --- a/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py +++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py @@ -453,12 +453,12 @@ def test_torch___add__( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -494,12 +494,12 @@ def test_torch___and__( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -637,12 +637,12 @@ def test_torch___eq__( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -678,12 +678,12 @@ def test_torch___floordiv__( input_dtype, x = dtype_and_x assume(not np.any(np.isclose(x[1], 0))) helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -792,12 +792,12 @@ def test_torch___iand__( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -832,7 +832,7 @@ def test_torch___invert__( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -870,7 +870,7 @@ def test_torch___long__( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -904,12 +904,12 @@ def test_torch___lt__( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -937,14 +937,14 @@ def test_torch___matmul__( on_device, backend_fw, ): - dtype, tensor1, tensor2 = dtype_tensor1_tensor2 + input_dtype, tensor1, tensor2 = dtype_tensor1_tensor2 helpers.test_frontend_method( - init_input_dtypes=dtype, + init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": tensor1, }, - method_input_dtypes=dtype, + method_input_dtypes=input_dtype, method_all_as_kwargs_np={"other": tensor2}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -974,13 +974,14 @@ def test_torch___mod__( backend_fw, ): input_dtype, x = dtype_and_x + assume(not np.any(np.isclose(x[1], 0))) helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -1016,12 +1017,12 @@ def test_torch___mul__( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -1057,12 +1058,12 @@ def test_torch___ne__( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -1102,7 +1103,7 @@ def test_torch___neg__( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -1136,12 +1137,12 @@ def test_torch___or__( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -1177,12 +1178,12 @@ def test_torch___pow__( if "int" in dtype: x[1] = ivy.abs(x[1]) helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "exponent": x[1], }, @@ -1218,12 +1219,12 @@ def test_torch___radd__( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -1259,12 +1260,12 @@ def test_torch___rmul__( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -1301,12 +1302,12 @@ def test_torch___rpow__( if "int" in dtype: x[0] = ivy.abs(x[0]) helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -1339,12 +1340,12 @@ def test_torch___rsub__( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -1414,12 +1415,12 @@ def test_torch___sub__( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -1456,12 +1457,12 @@ def test_torch___truediv__( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -1520,7 +1521,7 @@ def test_torch_abs( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -1556,7 +1557,7 @@ def test_torch_abs_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -1592,7 +1593,7 @@ def test_torch_acos( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -1739,12 +1740,12 @@ def test_torch_add( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], "alpha": alpha, @@ -1790,7 +1791,7 @@ def test_torch_add_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], "alpha": alpha, @@ -1943,10 +1944,10 @@ def test_torch_addcdiv( assume(not np.any(np.isclose(x[2], 0))) helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1], input_dtype[2]], method_all_as_kwargs_np={ "tensor1": x[1], "tensor2": x[2], @@ -1990,10 +1991,10 @@ def test_torch_addcdiv_( assume(not np.any(np.isclose(x[2], 0))) helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1], input_dtype[2]], method_all_as_kwargs_np={ "tensor1": x[1], "tensor2": x[2], @@ -2036,10 +2037,10 @@ def test_torch_addcmul( input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1], input_dtype[2]], method_all_as_kwargs_np={ "tensor1": x[1], "tensor2": x[2], @@ -2083,10 +2084,10 @@ def test_torch_addcmul_( input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1], input_dtype[2]], method_all_as_kwargs_np={ "tensor1": x[1], "tensor2": x[2], @@ -2355,14 +2356,14 @@ def test_torch_addr( on_device, backend_fw, ): - dtype, input, vec1, vec2 = dtype_and_vecs + input_dtype, input, vec1, vec2 = dtype_and_vecs helpers.test_frontend_method( - init_input_dtypes=dtype, + init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": input, }, - method_input_dtypes=dtype, + method_input_dtypes=input_dtype, method_all_as_kwargs_np={ "vec1": vec1, "vec2": vec2, @@ -2411,14 +2412,14 @@ def test_torch_addr_( on_device, backend_fw, ): - dtype, input, vec1, vec2 = dtype_and_vecs + input_dtype, input, vec1, vec2 = dtype_and_vecs helpers.test_frontend_method( - init_input_dtypes=dtype, + init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": input, }, - method_input_dtypes=dtype, + method_input_dtypes=input_dtype, method_all_as_kwargs_np={ "vec1": vec1, "vec2": vec2, @@ -2461,7 +2462,7 @@ def test_torch_adjoint( init_all_as_kwargs_np={ "data": values[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, init_flags=init_flags, method_flags=method_flags, @@ -2503,7 +2504,7 @@ def test_torch_all( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": axis, "keepdim": keepdim, @@ -2545,7 +2546,7 @@ def test_torch_amax( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": axis, "keepdim": keepdim, @@ -2587,7 +2588,7 @@ def test_torch_amin( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": axis, "keepdim": keepdim, @@ -2625,7 +2626,7 @@ def test_torch_aminmax( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -2661,7 +2662,7 @@ def test_torch_angle( init_all_as_kwargs_np={ "data": values[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, init_flags=init_flags, method_flags=method_flags, @@ -2703,7 +2704,7 @@ def test_torch_any( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": axis, "keepdim": keepdim, @@ -2749,7 +2750,7 @@ def func(x): init_all_as_kwargs_np={ "data": values[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "callable": func, }, @@ -2937,7 +2938,7 @@ def test_torch_arcsin( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -3086,7 +3087,7 @@ def test_torch_arctan( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -3117,12 +3118,12 @@ def test_torch_arctan2( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -3155,12 +3156,12 @@ def test_torch_arctan2_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -3199,7 +3200,7 @@ def test_torch_arctan_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -3313,7 +3314,7 @@ def test_torch_argmax( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": axis, "keepdim": keepdim, @@ -3362,7 +3363,7 @@ def test_torch_argmin( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": axis, "keepdim": keepdim, @@ -3411,7 +3412,7 @@ def test_torch_argsort( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": axis, "descending": descending, @@ -3449,7 +3450,7 @@ def test_torch_argwhere( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -3479,7 +3480,7 @@ def test_torch_as_strided( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "size": size, "stride": stride, @@ -3519,7 +3520,7 @@ def test_torch_asin( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -3592,7 +3593,7 @@ def test_torch_asinh( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -3631,7 +3632,7 @@ def test_torch_asinh_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -3669,7 +3670,7 @@ def test_torch_atan( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -3700,12 +3701,12 @@ def test_torch_atan2( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -3739,12 +3740,12 @@ def test_torch_atan2_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -4097,12 +4098,12 @@ def test_torch_bitwise_and( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -4136,12 +4137,12 @@ def test_torch_bitwise_and_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -4174,12 +4175,12 @@ def test_torch_bitwise_left_shift( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -4217,7 +4218,7 @@ def test_torch_bitwise_not( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], frontend_method_data=frontend_method_data, init_flags=init_flags, method_flags=method_flags, @@ -4254,7 +4255,7 @@ def test_torch_bitwise_not_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], frontend_method_data=frontend_method_data, init_flags=init_flags, method_flags=method_flags, @@ -4285,12 +4286,12 @@ def test_torch_bitwise_or( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -4324,12 +4325,12 @@ def test_torch_bitwise_or_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -4368,12 +4369,12 @@ def test_torch_bitwise_right_shift( np.clip(x[1], 0, np.iinfo(input_dtype[1]).bits - 1), dtype=input_dtype[1] ) helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -4412,12 +4413,12 @@ def test_torch_bitwise_right_shift_( np.clip(x[1], 0, np.iinfo(input_dtype[1]).bits - 1), dtype=input_dtype[1] ) helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -4450,12 +4451,12 @@ def test_torch_bitwise_xor( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -4489,12 +4490,12 @@ def test_torch_bitwise_xor_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -4561,7 +4562,7 @@ def test_torch_bool( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -4596,7 +4597,7 @@ def test_torch_byte( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -4631,7 +4632,7 @@ def test_torch_ceil( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -4667,7 +4668,7 @@ def test_torch_ceil_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -4702,7 +4703,7 @@ def test_torch_char( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -5030,7 +5031,7 @@ def test_torch_clone( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -5064,7 +5065,7 @@ def test_torch_conj( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -5100,7 +5101,7 @@ def test_torch_contiguous( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -5132,12 +5133,12 @@ def test_torch_copy_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -5171,12 +5172,12 @@ def test_torch_copysign( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -5211,12 +5212,12 @@ def test_torch_copysign_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -5254,7 +5255,7 @@ def test_torch_cos( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -5291,7 +5292,7 @@ def test_torch_cos_( init_all_as_kwargs_np={ "data": list(x[0]) if isinstance(x[0], int) else x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -5327,7 +5328,7 @@ def test_torch_cosh( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -5364,7 +5365,7 @@ def test_torch_cosh_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -5741,7 +5742,7 @@ def test_torch_det( init_all_as_kwargs_np={ "data": x, }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -5776,7 +5777,7 @@ def test_torch_detach( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -5812,7 +5813,7 @@ def test_torch_detach_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -6053,10 +6054,10 @@ def test_torch_div( assume(not np.any(np.isclose(x[1], 0))) helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], "rounding_mode": rounding_mode, @@ -6098,10 +6099,10 @@ def test_torch_div_( assume(not np.any(np.isclose(x[1], 0))) helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], "rounding_mode": rounding_mode, @@ -6138,12 +6139,12 @@ def test_torch_divide( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -6177,12 +6178,12 @@ def test_torch_dot( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "tensor": x[1], }, @@ -6217,7 +6218,7 @@ def test_torch_double( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -6310,12 +6311,12 @@ def test_torch_eq_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -6352,12 +6353,12 @@ def test_torch_equal( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -6396,7 +6397,7 @@ def test_torch_erf( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -6432,7 +6433,7 @@ def test_torch_erf_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -6470,7 +6471,7 @@ def test_torch_erfinv( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -6509,7 +6510,7 @@ def test_torch_erfinv_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -6544,7 +6545,7 @@ def test_torch_exp( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -6580,7 +6581,7 @@ def test_torch_exp_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -6662,12 +6663,12 @@ def test_torch_expand_as( ): input_dtype, x = dtype_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -6704,7 +6705,7 @@ def test_torch_expm1( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -6740,7 +6741,7 @@ def test_torch_expm1_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -6816,7 +6817,7 @@ def test_torch_fix( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -6853,7 +6854,7 @@ def test_torch_fix_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -6897,7 +6898,7 @@ def test_torch_flatten( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "start_dim": axes[0], "end_dim": axes[1], @@ -6973,7 +6974,7 @@ def test_torch_fliplr( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -7007,7 +7008,7 @@ def test_torch_float( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -7042,7 +7043,7 @@ def test_torch_floor( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -7077,7 +7078,7 @@ def test_torch_floor_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -7108,12 +7109,12 @@ def test_torch_fmax( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -7146,12 +7147,12 @@ def test_torch_fmin( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -7188,10 +7189,10 @@ def test_torch_fmod( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={"other": x[1]}, frontend=frontend, frontend_method_data=frontend_method_data, @@ -7227,10 +7228,10 @@ def test_torch_fmod_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={"other": x[1]}, frontend=frontend, frontend_method_data=frontend_method_data, @@ -7268,7 +7269,7 @@ def test_torch_frac( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -7343,12 +7344,12 @@ def test_torch_gcd( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -7432,12 +7433,12 @@ def test_torch_greater( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -7474,12 +7475,12 @@ def test_torch_greater_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -7515,12 +7516,12 @@ def test_torch_greater_equal( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -7557,12 +7558,12 @@ def test_torch_greater_equal_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -7599,7 +7600,7 @@ def test_torch_half( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -7629,12 +7630,12 @@ def test_torch_heaviside( ): input_dtype, values = dtype_and_values helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": values[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "values": values[1], }, @@ -8008,7 +8009,7 @@ def test_torch_int( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -8044,7 +8045,7 @@ def test_torch_inverse( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -8077,7 +8078,7 @@ def test_torch_is_complex( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -8129,7 +8130,7 @@ def test_torch_is_floating_point( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -8219,7 +8220,7 @@ def test_torch_isfinite( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -8252,7 +8253,7 @@ def test_torch_isinf( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -8285,7 +8286,7 @@ def test_torch_isnan( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -8318,7 +8319,7 @@ def test_torch_isreal( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -8378,12 +8379,12 @@ def test_torch_lcm( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -8424,12 +8425,12 @@ def test_torch_lcm_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -8465,12 +8466,12 @@ def test_torch_less( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -8507,12 +8508,12 @@ def test_torch_less_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -8548,12 +8549,12 @@ def test_torch_less_equal( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -8590,12 +8591,12 @@ def test_torch_less_equal_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -8633,7 +8634,7 @@ def test_torch_log( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -8669,7 +8670,7 @@ def test_torch_log10( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -8706,7 +8707,7 @@ def test_torch_log10_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -8739,7 +8740,7 @@ def test_torch_log1p( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend=frontend, frontend_method_data=frontend_method_data, @@ -8774,7 +8775,7 @@ def test_torch_log1p_( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend=frontend, frontend_method_data=frontend_method_data, @@ -8810,7 +8811,7 @@ def test_torch_log2( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -8847,7 +8848,7 @@ def test_torch_log2_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -8884,7 +8885,7 @@ def test_torch_log_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -8964,12 +8965,12 @@ def test_torch_logaddexp( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -9006,7 +9007,7 @@ def test_torch_logdet( init_all_as_kwargs_np={ "data": x, }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -9037,12 +9038,12 @@ def test_torch_logical_and( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -9079,7 +9080,7 @@ def test_torch_logical_not( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -9117,7 +9118,7 @@ def test_torch_logical_not_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -9148,12 +9149,12 @@ def test_torch_logical_or( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -9186,12 +9187,12 @@ def test_torch_logical_xor( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -9231,7 +9232,7 @@ def test_torch_logit( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -9266,7 +9267,7 @@ def test_torch_long( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -9407,7 +9408,7 @@ def test_torch_max( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -9438,12 +9439,12 @@ def test_torch_maximum( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -9565,7 +9566,7 @@ def test_torch_min( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -9596,12 +9597,12 @@ def test_torch_minimum( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -9752,7 +9753,7 @@ def test_torch_msort( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -9783,12 +9784,12 @@ def test_torch_mul( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -9823,12 +9824,12 @@ def test_torch_mul_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -9861,12 +9862,12 @@ def test_torch_multiply( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -9900,12 +9901,12 @@ def test_torch_multiply_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -9944,7 +9945,7 @@ def test_torch_nanmean( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -9981,7 +9982,7 @@ def test_torch_nansum( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -10098,12 +10099,12 @@ def test_torch_ne( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -10138,12 +10139,12 @@ def test_torch_ne_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -10184,7 +10185,7 @@ def test_torch_neg( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -10223,7 +10224,7 @@ def test_torch_neg_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -10261,7 +10262,7 @@ def test_torch_negative( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -10294,7 +10295,7 @@ def test_torch_new_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -10364,12 +10365,12 @@ def test_torch_new_full( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=[input_dtype[0]], + init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=[input_dtype[1]], + method_input_dtypes=[], method_all_as_kwargs_np={ "size": x[1], "fill_value": x[2], @@ -10544,7 +10545,7 @@ def test_torch_nonzero( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -10674,12 +10675,12 @@ def test_torch_not_equal( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -10715,12 +10716,12 @@ def test_torch_not_equal_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -10850,12 +10851,12 @@ def test_torch_pow( if "int" in dtype: x[1] = ivy.abs(x[1]) helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "exponent": x[1], }, @@ -10892,12 +10893,12 @@ def test_torch_pow_( if "int" in dtype: x[1] = ivy.abs(x[1]) helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "exponent": x[1], }, @@ -11028,7 +11029,7 @@ def test_torch_rad2deg( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -11109,7 +11110,7 @@ def test_torch_ravel( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -11159,7 +11160,7 @@ def test_torch_reciprocal( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -11196,7 +11197,7 @@ def test_torch_reciprocal_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -11232,7 +11233,7 @@ def test_torch_relu( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -11266,12 +11267,12 @@ def test_torch_remainder( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -11310,12 +11311,12 @@ def test_torch_remainder_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -11461,12 +11462,12 @@ def test_torch_reshape_as( ): input_dtype, x = dtype_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -11582,7 +11583,7 @@ def test_torch_rsqrt( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -11618,7 +11619,7 @@ def test_torch_rsqrt_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -11901,7 +11902,7 @@ def test_torch_short( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -11936,7 +11937,7 @@ def test_torch_sigmoid( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -11972,7 +11973,7 @@ def test_torch_sigmoid_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -12005,7 +12006,7 @@ def test_torch_sign( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -12039,7 +12040,7 @@ def test_torch_sign_( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=[input_dtype], + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -12075,7 +12076,7 @@ def test_torch_sin( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -12112,7 +12113,7 @@ def test_torch_sin_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -12146,7 +12147,7 @@ def test_torch_sinc( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -12183,7 +12184,7 @@ def test_torch_sinc_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -12220,7 +12221,7 @@ def test_torch_sinh( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -12257,7 +12258,7 @@ def test_torch_sinh_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -12473,7 +12474,7 @@ def test_torch_sqrt( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -12507,7 +12508,7 @@ def test_torch_sqrt_( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -12540,7 +12541,7 @@ def test_torch_square( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -12576,7 +12577,7 @@ def test_torch_square_( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -12692,7 +12693,7 @@ def test_torch_std( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -12763,12 +12764,12 @@ def test_torch_sub( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], "alpha": alpha, @@ -12809,7 +12810,7 @@ def test_torch_subtract_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -12964,7 +12965,7 @@ def test_torch_t( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -13043,7 +13044,7 @@ def test_torch_tan( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -13116,7 +13117,7 @@ def test_torch_tanh( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -13153,7 +13154,7 @@ def test_torch_tanh_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -13187,7 +13188,7 @@ def test_torch_tensor_corrcoef( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -13223,7 +13224,7 @@ def test_torch_tensor_erfc_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -13260,12 +13261,12 @@ def test_torch_tensor_logaddexp2( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -13305,7 +13306,7 @@ def test_torch_tensor_negative_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -13343,7 +13344,7 @@ def test_torch_tensor_positive( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -13470,12 +13471,12 @@ def test_torch_to( input_dtype, x, method_num_positional_args, method_all_as_kwargs_np = args_kwargs method_flags.num_positional_args = method_num_positional_args helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np=method_all_as_kwargs_np, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -13819,10 +13820,10 @@ def test_torch_true_divide_( assume(not np.any(np.isclose(x[1], 0))) helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -13860,7 +13861,7 @@ def test_torch_trunc( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -13897,7 +13898,7 @@ def test_torch_trunc_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -13967,12 +13968,12 @@ def test_torch_type_as( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -14443,12 +14444,12 @@ def test_torch_view_as( ): input_dtype, x = dtype_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -14520,14 +14521,14 @@ def test_torch_where( on_device, backend_fw, ): - cond, xs, dtypes = broadcastables + cond, xs, input_dtypes = broadcastables helpers.test_frontend_method( - init_input_dtypes=dtypes, + init_input_dtypes=[input_dtypes[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": xs[0], }, - method_input_dtypes=["bool", dtypes[1]], + method_input_dtypes=["bool", input_dtypes[1]], method_all_as_kwargs_np={ "condition": cond, "other": xs[1], @@ -14565,11 +14566,11 @@ def test_torch_xlogy( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -14608,11 +14609,11 @@ def test_torch_xlogy_( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=input_dtype, + init_input_dtypes=[input_dtype[0]], init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[input_dtype[1]], method_all_as_kwargs_np={ "other": x[1], }, @@ -14652,7 +14653,7 @@ def test_torch_zero_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={}, frontend_method_data=frontend_method_data, init_flags=init_flags, From 939ac060fbee312d0bd1b65c83212739bbbf994b Mon Sep 17 00:00:00 2001 From: Jackson McClintock Date: Sat, 13 Apr 2024 17:19:00 -0400 Subject: [PATCH 2/3] fix: remove dtype from arguments without arrays --- .../test_frontends/test_torch/test_tensor.py | 96 +++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py b/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py index 20804325a195a..5d62fb35e837b 100644 --- a/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py +++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py @@ -4741,7 +4741,7 @@ def test_torch_cholesky( init_all_as_kwargs_np={ "data": x, }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "upper": upper, }, @@ -4790,7 +4790,7 @@ def test_torch_chunk( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "chunks": chunks, "dim": dim, @@ -5409,7 +5409,7 @@ def test_torch_count_nonzero( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={"dim": dim}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -5569,7 +5569,7 @@ def test_torch_cummax( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={"dim": dim}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -5706,7 +5706,7 @@ def test_torch_cumsum_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": dim, "dtype": input_dtype[0], @@ -5869,7 +5869,7 @@ def test_torch_diag( init_all_as_kwargs_np={ "data": values[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "diagonal": diagonal, }, @@ -6633,7 +6633,7 @@ def test_torch_expand( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np=size, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -6779,7 +6779,7 @@ def test_torch_fill_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "value": value, }, @@ -8927,7 +8927,7 @@ def test_torch_log_softmax( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": axis, "dtype": dtypes[0], @@ -9371,7 +9371,7 @@ def test_torch_matrix_power( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "n": n, }, @@ -9485,7 +9485,7 @@ def test_torch_mean( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": axis, "keepdim": keepdims, @@ -9528,7 +9528,7 @@ def test_torch_median( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": axis, "keepdim": keepdim, @@ -9714,7 +9714,7 @@ def test_torch_movedim( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": value[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "source": source, "destination": destination, @@ -10012,7 +10012,7 @@ def test_torch_narrow( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": dim, "start": start, @@ -10581,7 +10581,7 @@ def test_torch_norm( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "p": p, "dim": axis, @@ -10949,7 +10949,7 @@ def test_torch_prod( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": axis, "keepdim": keepdims, @@ -11068,7 +11068,7 @@ def test_torch_random_( helpers.test_frontend_method( init_input_dtypes=input_dtype, backend_to_test=backend_fw, - method_input_dtypes=input_dtype, + method_input_dtypes=[], frontend_method_data=frontend_method_data, init_all_as_kwargs_np={ "data": x[0], @@ -11366,7 +11366,7 @@ def test_torch_repeat( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np=repeat, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -11432,7 +11432,7 @@ def test_torch_reshape( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np=shape, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -11506,7 +11506,7 @@ def test_torch_round( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "decimals": decimals, }, @@ -11546,7 +11546,7 @@ def test_torch_round_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "decimals": decimals, }, @@ -12299,7 +12299,7 @@ def test_torch_size( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": dim, }, @@ -12342,7 +12342,7 @@ def test_torch_softmax( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": axis, "dtype": dtype[0], @@ -12389,7 +12389,7 @@ def test_torch_sort( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": dim, "descending": descending, @@ -12438,7 +12438,7 @@ def test_torch_split( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "split_size": split_size, "dim": dim, @@ -12616,7 +12616,7 @@ def test_torch_squeeze( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": axis, }, @@ -12658,7 +12658,7 @@ def test_torch_squeeze_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": axis, }, @@ -12728,7 +12728,7 @@ def test_torch_stride( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={"dim": axis}, frontend=frontend, frontend_method_data=frontend_method_data, @@ -12853,7 +12853,7 @@ def test_torch_sum( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": dim, "keepdim": keepdim, @@ -12899,7 +12899,7 @@ def test_torch_svd( init_all_as_kwargs_np={ "data": x, }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "some": some, "compute_uv": compute_uv, @@ -13440,7 +13440,7 @@ def test_torch_tile( init_all_as_kwargs_np={ "data": values[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "reps": reps, }, @@ -13513,7 +13513,7 @@ def test_torch_topk( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": input[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "k": k, "dim": axis, @@ -13567,7 +13567,7 @@ def test_torch_transpose( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={"dim0": dim0, "dim1": dim1}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -13615,7 +13615,7 @@ def test_torch_transpose_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim0": dim0, "dim1": dim1, @@ -13656,7 +13656,7 @@ def test_torch_tril( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "diagonal": diagonal, }, @@ -13697,7 +13697,7 @@ def test_torch_tril_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "diagonal": diagonal, }, @@ -13741,7 +13741,7 @@ def test_torch_triu( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={"diagonal": diagonal}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -13783,7 +13783,7 @@ def test_torch_triu_( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={"diagonal": diagonal}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -13935,7 +13935,7 @@ def test_torch_type( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dtype": dtype[0], }, @@ -14013,7 +14013,7 @@ def test_torch_unbind( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtypes, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": axis, }, @@ -14097,7 +14097,7 @@ def test_torch_unfold( init_all_as_kwargs_np={ "data": x, }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dimension": axis, "size": size, @@ -14146,7 +14146,7 @@ def test_torch_uniform_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "from_": from_, "to": to, @@ -14191,7 +14191,7 @@ def test_torch_unique( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "sorted": sorted, "return_inverse": return_inverse, @@ -14237,7 +14237,7 @@ def test_torch_unique_consecutive( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "return_inverse": return_inverse, "return_counts": return_counts, @@ -14283,7 +14283,7 @@ def test_torch_unsqueeze( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": dim, }, @@ -14328,7 +14328,7 @@ def test_torch_unsqueeze_( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": dim, }, @@ -14366,7 +14366,7 @@ def test_torch_var( init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": axis, "correction": int(correction), @@ -14410,7 +14410,7 @@ def test_torch_view( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=input_dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "size": shape, }, From 8b18978f7f8fc8d2e32d771e11484b79f1494a88 Mon Sep 17 00:00:00 2001 From: Jackson McClintock Date: Sat, 13 Apr 2024 23:51:30 -0400 Subject: [PATCH 3/3] fix: fix additional dtype issues --- .../test_frontends/test_torch/test_tensor.py | 110 +++++++++--------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py b/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py index 5d62fb35e837b..3969f0de09597 100644 --- a/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py +++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py @@ -4885,14 +4885,14 @@ def test_torch_clamp_min( on_device, method_flags, ): - x_dtype, x, min = input_and_ranges + input_dtype, x, min = input_and_ranges helpers.test_frontend_method( - init_input_dtypes=x_dtype, + init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=x_dtype, + method_input_dtypes=input_dtype, method_all_as_kwargs_np={ "min": min, }, @@ -4920,14 +4920,14 @@ def test_torch_clamp_min_( on_device, method_flags, ): - x_dtype, x, min = input_and_ranges + input_dtype, x, min = input_and_ranges helpers.test_frontend_method( - init_input_dtypes=x_dtype, + init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=x_dtype, + method_input_dtypes=input_dtype, method_all_as_kwargs_np={ "min": min, }, @@ -5448,7 +5448,7 @@ def test_torch_cov( ): input_dtype, x, correction, fweights, aweights = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=["float64", "int64", "float64"], + init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x, @@ -5496,14 +5496,14 @@ def test_torch_cross( on_device, backend_fw, ): - dtype, input, other, dim = dtype_input_other_dim + input_dtype, input, other, dim = dtype_input_other_dim helpers.test_frontend_method( - init_input_dtypes=dtype, + init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": input, }, - method_input_dtypes=dtype, + method_input_dtypes=input_dtype, method_all_as_kwargs_np={ "other": other, "dim": dim, @@ -5613,7 +5613,7 @@ def test_torch_cumprod( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=dtypes, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": dim, "dtype": dtypes[0], @@ -5660,7 +5660,7 @@ def test_torch_cumsum( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=dtypes, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": dim, "dtype": dtypes[0], @@ -5913,9 +5913,9 @@ def test_torch_diagonal( if dim2 < 0: assume(dim1 != dim2 + num_dims) helpers.test_frontend_method( - init_input_dtypes=[input_dtype[0]], + init_input_dtypes=input_dtype, init_all_as_kwargs_np={"data": input}, - method_input_dtypes=[input_dtype[0]], + method_input_dtypes=[], method_all_as_kwargs_np={ "offset": offset, "dim1": dim1, @@ -6929,14 +6929,14 @@ def test_torch_flip( on_device, backend_fw, ): - x, idxes, dtype = dtype_values_axis + x, idxes, input_dtype = dtype_values_axis helpers.test_frontend_method( - init_input_dtypes=dtype, + init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dims": idxes, }, @@ -6967,9 +6967,9 @@ def test_torch_fliplr( on_device, backend_fw, ): - dtype, x = dtype_and_x + input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=dtype, + init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], @@ -7725,16 +7725,16 @@ def test_torch_index_add( ): xs, input_dtypes, axis, indices = xs_dtypes_dim_idx if xs[0].shape[axis] < xs[1].shape[axis]: - source, input = xs + (source, source_dtype), (input, input_dtype) = zip(xs, input_dtypes) else: - input, source = xs + (input, input_dtype), (source, source_dtype) = zip(xs, input_dtypes) helpers.test_frontend_method( - init_input_dtypes=[input_dtypes[0]], + init_input_dtypes=[input_dtype], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": input, }, - method_input_dtypes=["int64", input_dtypes[1]], + method_input_dtypes=["int64", source_dtype], method_all_as_kwargs_np={ "dim": axis, "index": indices, @@ -7772,16 +7772,16 @@ def test_torch_index_add_( ): xs, input_dtypes, axis, indices = xs_dtypes_dim_idx if xs[0].shape[axis] < xs[1].shape[axis]: - source, input = xs + (source, source_dtype), (input, input_dtype) = zip(xs, input_dtypes) else: - input, source = xs + (input, input_dtype), (source, source_dtype) = zip(xs, input_dtypes) helpers.test_frontend_method( - init_input_dtypes=[input_dtypes[0]], + init_input_dtypes=[input_dtype], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": input, }, - method_input_dtypes=["int64", input_dtypes[1]], + method_input_dtypes=["int64", source_dtype], method_all_as_kwargs_np={ "dim": axis, "index": indices, @@ -9293,14 +9293,14 @@ def test_torch_masked_fill( on_device, backend_fw, ): - dtype, x, mask, val = x_mask_val + input_dtype, x, mask, val = x_mask_val helpers.test_frontend_method( - init_input_dtypes=[dtype], + init_input_dtypes=[input_dtype], backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x, }, - method_input_dtypes=["bool", dtype], + method_input_dtypes=["bool"], method_all_as_kwargs_np={ "mask": mask, "value": val, @@ -9329,14 +9329,14 @@ def test_torch_matmul( on_device, backend_fw, ): - dtype, tensor1, tensor2 = dtype_tensor1_tensor2 + input_dtype, tensor1, tensor2 = dtype_tensor1_tensor2 helpers.test_frontend_method( - init_input_dtypes=dtype, + init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": tensor1, }, - method_input_dtypes=dtype, + method_input_dtypes=input_dtype, method_all_as_kwargs_np={"other": tensor2}, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -9630,14 +9630,14 @@ def test_torch_mm( on_device, backend_fw, ): - dtype, x, y = dtype_xy + input_dtype, x, y = dtype_xy helpers.test_frontend_method( - init_input_dtypes=dtype, + init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x, }, - method_input_dtypes=dtype, + method_input_dtypes=input_dtype, method_all_as_kwargs_np={ "mat2": y, }, @@ -10330,12 +10330,12 @@ def test_torch_new_empty( ): input_dtype, x = dtype_and_x helpers.test_frontend_method( - init_input_dtypes=[input_dtype[0]], + init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x, }, - method_input_dtypes=[ivy.int32], + method_input_dtypes=[], method_all_as_kwargs_np={ "size": size, }, @@ -10417,7 +10417,7 @@ def test_torch_new_ones( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=dtypes, + method_input_dtypes=[], method_all_as_kwargs_np={ "size": size, "dtype": dtypes[0], @@ -10505,7 +10505,7 @@ def test_torch_new_zeros( init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=dtypes, + method_input_dtypes=[], method_all_as_kwargs_np={ "size": size, "dtype": dtypes[0], @@ -10618,14 +10618,14 @@ def test_torch_normal_( on_device, backend_fw, ): - dtype, x = dtype_and_x + input_dtype, x = dtype_and_x def call(): return helpers.test_frontend_method( - init_input_dtypes=dtype, + init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x[0]}, - method_input_dtypes=dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "mean": mean, "std": std, @@ -10795,7 +10795,7 @@ def test_torch_permute( on_device, backend_fw, ): - x, idxes, dtype = dtype_values_axis + x, idxes, input_dtype = dtype_values_axis unpack_dims = True if unpack_dims: method_flags.num_positional_args = len(idxes) + 1 @@ -10809,12 +10809,12 @@ def test_torch_permute( "dims": tuple(idxes), } helpers.test_frontend_method( - init_input_dtypes=dtype, + init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=dtype, + method_input_dtypes=[], method_all_as_kwargs_np=dims, frontend_method_data=frontend_method_data, init_flags=init_flags, @@ -11652,7 +11652,7 @@ def test_torch_scatter( init_all_as_kwargs_np={ "data": x, }, - method_input_dtypes=["int64", input_dtypes[0]], + method_input_dtypes=[input_dtypes[1], input_dtypes[2]], method_all_as_kwargs_np={ "dim": axis, "index": indices, @@ -11689,7 +11689,7 @@ def test_torch_scatter_( init_input_dtypes=[input_dtypes[0]], backend_to_test=backend_fw, init_all_as_kwargs_np={"data": x}, - method_input_dtypes=["int64", input_dtypes[0]], + method_input_dtypes=[input_dtypes[1], input_dtypes[2]], method_all_as_kwargs_np={ "dim": axis, "index": indices, @@ -11727,7 +11727,7 @@ def test_torch_scatter_add( init_all_as_kwargs_np={ "data": x, }, - method_input_dtypes=["int64", input_dtypes[0]], + method_input_dtypes=[input_dtypes[1], input_dtypes[2]], method_all_as_kwargs_np={ "dim": axis, "index": indices, @@ -11764,7 +11764,7 @@ def test_torch_scatter_add_( init_all_as_kwargs_np={ "data": x, }, - method_input_dtypes=["int64", input_dtypes[0]], + method_input_dtypes=[input_dtypes[1], input_dtypes[2]], method_all_as_kwargs_np={ "dim": axis, "index": indices, @@ -11803,7 +11803,7 @@ def test_torch_scatter_reduce( init_all_as_kwargs_np={ "data": x, }, - method_input_dtypes=["int64", input_dtypes[0]], + method_input_dtypes=[input_dtypes[1], input_dtypes[2]], method_all_as_kwargs_np={ "dim": axis, "index": indices, @@ -11843,7 +11843,7 @@ def test_torch_scatter_reduce_( init_all_as_kwargs_np={ "data": x, }, - method_input_dtypes=["int64", input_dtypes[0]], + method_input_dtypes=[input_dtypes[1], input_dtypes[2]], method_all_as_kwargs_np={ "dim": axis, "index": indices, @@ -14052,15 +14052,15 @@ def test_torch_unflatten( init_flags, method_flags, ): - dtype, x = dtype_and_values + input_dtype, x = dtype_and_values sizes = sizes_(shape, axis) helpers.test_frontend_method( - init_input_dtypes=dtype, + init_input_dtypes=input_dtype, backend_to_test=backend_fw, init_all_as_kwargs_np={ "data": x[0], }, - method_input_dtypes=dtype, + method_input_dtypes=[], method_all_as_kwargs_np={ "dim": axis, "sizes": sizes,