Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed ivy.equal for paddle backend support all dtype #28426

Merged
merged 3 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading