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

added digamma in paddle frontend #22959

Merged
merged 28 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
fce115a
Added foldr for tensorflow frontend
AbdullahSabry Aug 15, 2023
492f45d
fixed formatting
AbdullahSabry Aug 15, 2023
03b9a65
fixed formatting
AbdullahSabry Aug 15, 2023
86ae03e
Fixed formatting
AbdullahSabry Aug 18, 2023
03a5751
Fixed formatting
AbdullahSabry Aug 18, 2023
2d1fd84
Merge branch 'unifyai:main' into main
AbdullahSabry Aug 25, 2023
249407f
Dealt with conflicts
AbdullahSabry Aug 26, 2023
bd14e9b
Dealt with conflicts
AbdullahSabry Aug 26, 2023
f097188
Dealt with conflicts
AbdullahSabry Aug 26, 2023
fc83ed1
Merge branch 'unifyai:main' into main
AbdullahSabry Aug 26, 2023
bad94ee
Dealt with conflicts
AbdullahSabry Aug 26, 2023
0656e23
Merge branch 'main' of github.com:AbdullahSabry/ivy into main
AbdullahSabry Aug 26, 2023
eef77f8
Merge branch 'unifyai:main' into main
AbdullahSabry Aug 27, 2023
1fd46a6
Merge branch 'unifyai:main' into main
AbdullahSabry Aug 28, 2023
ff7eb13
Cleaned branch
AbdullahSabry Aug 28, 2023
11307bb
Cleaned branch
AbdullahSabry Aug 28, 2023
8fe6050
resolving conflicts
AbdullahSabry Aug 29, 2023
eb6905c
resolving conflicts
AbdullahSabry Aug 29, 2023
fb454e8
Merge branch 'unifyai:main' into main
AbdullahSabry Aug 29, 2023
d9ae52b
resolving conflicts
AbdullahSabry Aug 29, 2023
a5026c1
Merge branch 'main' of github.com:AbdullahSabry/ivy into main
AbdullahSabry Aug 29, 2023
68f2511
Update general_functions.py
AbdullahSabry Sep 1, 2023
aa8736f
Fixed paddle backend failing test
AbdullahSabry Sep 1, 2023
76af30e
Cleaned branch
AbdullahSabry Sep 2, 2023
ef9b65c
Fixed issues with testing in the paddle backend
AbdullahSabry Sep 2, 2023
efc1738
Fixed formatting
AbdullahSabry Sep 2, 2023
e480dd4
Fixed formatting
AbdullahSabry Sep 2, 2023
4ca623d
Fixed formatting
AbdullahSabry Sep 2, 2023
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
7 changes: 7 additions & 0 deletions ivy/functional/frontends/paddle/tensor/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@ def diff(x, n=1, axis=-1, prepend=None, append=None, name=None):
return ivy.diff(x, n=n, axis=axis, prepend=prepend, append=append)


@with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
@to_ivy_arrays_and_back
def digamma(x, name=None):
digamma_fun = ivy.digamma
return ivy.array(digamma_fun(x), dtype=x.dtype)


@with_unsupported_dtypes({"2.5.1 and below": ("float16", "bfloat16")}, "paddle")
@to_ivy_arrays_and_back
def divide(x, y, name=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,36 @@ def test_paddle_diff(
)


# digamma
@handle_frontend_test(
fn_tree="paddle.tensor.math.digamma",
dtype_and_x=helpers.dtype_and_values(
available_dtypes=helpers.get_dtypes("float"),
safety_factor_scale="log",
),
)
def test_paddle_digamma(
*,
dtype_and_x,
on_device,
fn_tree,
frontend,
backend_fw,
test_flags,
):
input_dtype, x = dtype_and_x
helpers.test_frontend_function(
input_dtypes=input_dtype,
frontend=frontend,
backend_to_test=backend_fw,
test_flags=test_flags,
fn_tree=fn_tree,
on_device=on_device,
atol=1e-4,
x=x[0],
)


# divide
@handle_frontend_test(
fn_tree="paddle.divide",
Expand Down
Loading