Skip to content

Commit

Permalink
Adding general function in PaddlePaddle (#12914)
Browse files Browse the repository at this point in the history
Co-authored by MahmoudAshraf97 <hassouna97.ma@gmail.com>
  • Loading branch information
vtsamit authored Mar 25, 2023
1 parent d1d7ae4 commit e82726a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ivy/functional/backends/paddle/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,13 @@ def inplace_increment(
x: Union[ivy.Array, paddle.Tensor],
val: Union[ivy.Array, paddle.Tensor],
) -> ivy.Array:
raise IvyNotImplementedException()

(x_native, val_native), _ = ivy.args_to_native(x, val)
x_native += val_native
if ivy.is_ivy_array(x):
x.data = x_native
else:
x = ivy.Array(x_native)
return x

@with_unsupported_device_and_dtypes(
{"2.4.2 and below": {"cpu": ("uint16", "bfloat16")}}, backend_version
Expand Down

0 comments on commit e82726a

Please sign in to comment.