Skip to content

Commit

Permalink
fix: fixed ivy.equal for paddle backend support all dtype (#28426)
Browse files Browse the repository at this point in the history
  • Loading branch information
samthakur587 authored Feb 28, 2024
1 parent 24a56b6 commit cd8f8ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 0 additions & 4 deletions ivy/functional/backends/paddle/elementwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ def isinf(
return paddle.zeros(shape=x.shape, dtype=bool)


@with_unsupported_device_and_dtypes(
{"2.6.0 and below": {"cpu": ("bfloat16", "complex128", "float64", "float32")}},
backend_version,
)
def equal(
x1: Union[float, paddle.Tensor],
x2: Union[float, paddle.Tensor],
Expand Down
10 changes: 7 additions & 3 deletions ivy_tests/test_ivy/test_functional/test_core/test_elementwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,11 @@ def test_divide(*, dtype_and_x, test_flags, backend_fw, fn_name, on_device):
@handle_test(
fn_tree="functional.ivy.equal",
dtype_and_x=helpers.dtype_and_values(
available_dtypes=helpers.get_dtypes("valid", full=False), num_arrays=2
available_dtypes=helpers.get_dtypes("valid", full=False),
num_arrays=2,
large_abs_safety_factor=6,
small_abs_safety_factor=6,
safety_factor_scale="log",
),
test_gradients=st.just(False),
)
Expand All @@ -708,8 +712,8 @@ def test_equal(*, dtype_and_x, test_flags, backend_fw, fn_name, on_device):
on_device=on_device,
x1=x[0],
x2=x[1],
atol_=1e-03,
rtol_=1e-03,
atol_=1e-02,
rtol_=1e-02,
)


Expand Down

0 comments on commit cd8f8ac

Please sign in to comment.