From 07bf9e593623f587046c2de084181baadf42f20c Mon Sep 17 00:00:00 2001 From: Jay Choy <91728831+ZJay07@users.noreply.github.com> Date: Fri, 22 Mar 2024 11:21:48 +0000 Subject: [PATCH 1/2] fixed torch tril --- .../test_ivy/test_frontends/test_torch/test_tensor.py | 11 +++++++++++ 1 file changed, 11 insertions(+) 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..3aa80e30d185e 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 @@ -13649,6 +13649,17 @@ def test_torch_tril( backend_fw, ): input_dtype, x = dtype_and_values + if backend_fw == "paddle" and input_dtype not in [ + "int32", + "int64", + "float64", + "complex128", + "float16", + "float32", + "complex64", + "bool", + ]: + return helpers.test_frontend_method( init_input_dtypes=input_dtype, backend_to_test=backend_fw, From 63c2da9827173ed99a387aa0c86cb509b482bb3d Mon Sep 17 00:00:00 2001 From: Jay Choy <91728831+ZJay07@users.noreply.github.com> Date: Sat, 23 Mar 2024 17:45:06 +0000 Subject: [PATCH 2/2] proper fix --- ivy/functional/backends/paddle/creation.py | 14 +++++++++----- .../test_frontends/test_torch/test_tensor.py | 11 ----------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/ivy/functional/backends/paddle/creation.py b/ivy/functional/backends/paddle/creation.py index 65d826733c439..df752c1c36df8 100644 --- a/ivy/functional/backends/paddle/creation.py +++ b/ivy/functional/backends/paddle/creation.py @@ -510,14 +510,18 @@ def ones_like( return paddle_backend.ones(shape=x.shape, dtype=dtype, device=device) -@with_unsupported_device_and_dtypes( +@with_supported_device_and_dtypes( { "2.6.0 and below": { "cpu": ( - "int8", - "int16", - "uint8", - "complex", + "int32", + "int64", + "float64", + "complex128", + "float16", + "float32", + "complex64", + "bool", ) } }, 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 3aa80e30d185e..10a8b3385fbf3 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 @@ -13649,17 +13649,6 @@ def test_torch_tril( backend_fw, ): input_dtype, x = dtype_and_values - if backend_fw == "paddle" and input_dtype not in [ - "int32", - "int64", - "float64", - "complex128", - "float16", - "float32", - "complex64", - "bool", - ]: - return helpers.test_frontend_method( init_input_dtypes=input_dtype, backend_to_test=backend_fw,