From 95af3724478967722de72e66844816b6442088d7 Mon Sep 17 00:00:00 2001 From: Vismay Suramwar <83938053+Vismay-dev@users.noreply.github.com> Date: Thu, 25 Jan 2024 03:07:36 -0600 Subject: [PATCH] fix: Fixed creation `ivy.zeros_like` failing test for all backends (#28032) Co-authored-by: NripeshN --- ivy/functional/backends/paddle/creation.py | 4 ++++ ivy_tests/test_ivy/test_functional/test_core/test_creation.py | 1 + 2 files changed, 5 insertions(+) diff --git a/ivy/functional/backends/paddle/creation.py b/ivy/functional/backends/paddle/creation.py index da61893325591..f4411ff0ba279 100644 --- a/ivy/functional/backends/paddle/creation.py +++ b/ivy/functional/backends/paddle/creation.py @@ -530,6 +530,10 @@ def zeros( return paddle.zeros(shape=shape).cast(dtype) +@with_unsupported_device_and_dtypes( + {"2.6.0 and below": {"cpu": ("uint8", "int8", "int16", "float16", "bfloat16")}}, + backend_version, +) def zeros_like( x: paddle.Tensor, /, diff --git a/ivy_tests/test_ivy/test_functional/test_core/test_creation.py b/ivy_tests/test_ivy/test_functional/test_core/test_creation.py index 99a105e454651..e13e0836f24eb 100644 --- a/ivy_tests/test_ivy/test_functional/test_core/test_creation.py +++ b/ivy_tests/test_ivy/test_functional/test_core/test_creation.py @@ -848,6 +848,7 @@ def test_zeros(*, shape, dtype, test_flags, backend_fw, fn_name, on_device): min_dim_size=1, max_dim_size=5, ), + test_gradients=st.just(False), ) def test_zeros_like(*, dtype_and_x, test_flags, backend_fw, fn_name, on_device): dtype, x = dtype_and_x