internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: ivy-llc/ivy

Issue:
frac



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py
--- a/ivy/functional/frontends/paddle/tensor/math.py
+++ b/ivy/functional/frontends/paddle/tensor/math.py
@@ -330,3 +330,11 @@ def sgn(x, name=None):
 @to_ivy_arrays_and_back
 def maximum(x, y, name=None):
     return ivy.maximum(x, y)
+
+
+@with_supported_dtypes(
+    {"2.5.0 and below": ("float32", "float64", "int32", "int64")}, "paddle"
+)
+@to_ivy_arrays_and_back
+def frac(x, name=None):
+    return x - ivy.sign(x) * ivy.floor(ivy.abs(x))


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_math.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_math.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_math.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_math.py
@@ -1385,3 +1385,29 @@ def test_paddle_maximum(
         x=x[0],
         y=x[1],
     )
+
+
+# frac
+@handle_frontend_test(
+    fn_tree="paddle.tensor.math.frac",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"), num_arrays=1
+    ),
+)
+def test_paddle_frac(
+    *,
+    dtype_and_x,
+    frontend,
+    test_flags,
+    fn_tree,
+    on_device,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+    )
Repository: ivy-llc/ivy

Issue:
requires_grad
Implement torch.Tensor.requires_grad


Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/torch/tensor.py b/ivy/functional/frontends/torch/tensor.py
--- a/ivy/functional/frontends/torch/tensor.py
+++ b/ivy/functional/frontends/torch/tensor.py
@@ -36,6 +36,7 @@ def __init__(self, array, device=None, _init_overload=False, requires_grad=False
             self._is_leaf = True
         else:
             self._is_leaf = False
+        self._requires_grad = requires_grad
 
     def __len__(self):
         return len(self._ivy_array)


Test patch:
Repository: ivy-llc/ivy

Issue:
requires_grad_
Implement torch.Tensor.requires_grad_


Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/torch/tensor.py b/ivy/functional/frontends/torch/tensor.py
--- a/ivy/functional/frontends/torch/tensor.py
+++ b/ivy/functional/frontends/torch/tensor.py
@@ -1546,6 +1546,10 @@ def apply_(self, callable, /):
         self.ivy_array = callable(self.ivy_array)
         return self
 
+    def requires_grad_(self, requires_grad=True):
+        self._requires_grad = requires_grad
+        return self
+
     def backward(self, gradient=None, retain_graph=None, create_graph=False):
         if gradient is None and int(torch_frontend.numel(self)) > 1:
             raise RuntimeError("grad can be implicitly created only for scalar outputs")


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py b/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py
--- a/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py
+++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py
@@ -233,6 +233,25 @@ def test_torch_tensor_property_grad_fn():
     ivy.utils.assertions.check_equal(z.grad_fn, None, as_array=False)
 
 
+@given(
+    dtype_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid", prune_function=False),
+    ),
+    requires_grad=st.booleans(),
+)
+def test_torch_tensor_requires_grad_(
+    dtype_x,
+    requires_grad,
+):
+    _, data = dtype_x
+    x = Tensor(data[0])
+    assert not x._requires_grad
+    x.requires_grad_()
+    assert x._requires_grad
+    x.requires_grad_(requires_grad)
+    assert x._requires_grad == requires_grad
+
+
 # chunk
 @pytest.mark.skip("Testing takes a lot of time")
 @handle_frontend_method(
Repository: ivy-llc/ivy

Issue:
gradient



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/numpy/mathematical_functions.py b/ivy/functional/frontends/jax/numpy/mathematical_functions.py
--- a/ivy/functional/frontends/jax/numpy/mathematical_functions.py
+++ b/ivy/functional/frontends/jax/numpy/mathematical_functions.py
@@ -44,6 +44,12 @@ def arcsinh(x, /):
     return ivy.asinh(x)
 
 
+@to_ivy_arrays_and_back
+def gradient(f, *varargs, axis=None, edge_order=None):
+    edge_order = edge_order if edge_order is not None else 1
+    return ivy.gradient(f, spacing=varargs, axis=axis, edge_order=edge_order)
+
+
 @to_ivy_arrays_and_back
 def arctan(x, /):
     return ivy.atan(x)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_numpy/test_mathematical_functions.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_numpy/test_mathematical_functions.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_numpy/test_mathematical_functions.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_numpy/test_mathematical_functions.py
@@ -370,7 +370,50 @@ def test_jax_arcsinh(
         x=x[0],
     )
 
+    
+# gradient
+@handle_frontend_test(
+    fn_tree="jax.numpy.gradient",
+    dtype_input_axis=helpers.dtype_values_axis(
+        available_dtypes=("float32", "float16", "float64"),
+        min_num_dims=1,
+        max_num_dims=3,
+        min_dim_size=2,
+        max_dim_size=4,
+        valid_axis=True,
+        force_int_axis=True,
+    ),
+    varargs=helpers.ints(
+        min_value=-3,
+        max_value=3,
+    ),
+)
+def test_jax_gradient(
+    dtype_input_axis, 
+    varargs, 
+    frontend,
+    backend_fw,
+    test_flags,
+    fn_tree,
+    on_device,
+):
+    input_dtype, x, axis = dtype_input_axis
+    test_flags.num_positional_args = 2
+    kw = {}
+    kw["varargs"] = varargs
+    kw["axis"] = axis
+    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,
+        f=x[0],
+        **kw,
+    )
 
+    
 # arctan
 @handle_frontend_test(
     fn_tree="jax.numpy.arctan",
Repository: ivy-llc/ivy

Issue:
broadcast_to



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/manipulation.py b/ivy/functional/frontends/paddle/tensor/manipulation.py
--- a/ivy/functional/frontends/paddle/tensor/manipulation.py
+++ b/ivy/functional/frontends/paddle/tensor/manipulation.py
@@ -78,3 +78,12 @@ def squeeze(x, axis=None, name=None):
 @to_ivy_arrays_and_back
 def cast(x, dtype):
     return ivy.astype(x, dtype)
+
+
+@with_supported_dtypes(
+    {"2.5.0 and below": ("bool", "float32", "float64", "int32", "int64")},
+    "paddle",
+)
+@to_ivy_arrays_and_back
+def broadcast_to(x, shape, name=None):
+    return ivy.broadcast_to(x, shape)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_manipulation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_manipulation.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_manipulation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_manipulation.py
@@ -362,3 +362,46 @@ def test_paddle_cast(
         x=x[0],
         dtype=dtype[0],
     )
+
+
+@st.composite
+def _broadcast_to_helper(draw):
+    dtype_and_x = draw(
+        helpers.dtype_and_values(
+            available_dtypes=helpers.get_dtypes("valid"),
+            min_num_dims=1,
+            max_num_dims=6,
+        )
+    )
+
+    dtype, x = dtype_and_x
+    input_shape = x[0].shape
+
+    max_num_dims = 6 - len(input_shape)
+    shape = draw(helpers.get_shape(max_num_dims=max_num_dims)) + input_shape
+
+    return dtype, x, shape
+
+
+@handle_frontend_test(
+    fn_tree="paddle.broadcast_to",
+    dtype_x_and_shape=_broadcast_to_helper(),
+)
+def test_paddle_broadcast_to(
+    *,
+    dtype_x_and_shape,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+):
+    input_dtype, x, shape = dtype_x_and_shape
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+        shape=shape,
+    )
Repository: ivy-llc/ivy

Issue:
ptp



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/numpy/statistics/order_statistics.py b/ivy/functional/frontends/numpy/statistics/order_statistics.py
--- a/ivy/functional/frontends/numpy/statistics/order_statistics.py
+++ b/ivy/functional/frontends/numpy/statistics/order_statistics.py
@@ -1,5 +1,9 @@
 # global
 import ivy
+from ivy.functional.frontends.numpy.func_wrapper import (
+    to_ivy_arrays_and_back,
+    handle_numpy_out,
+)
 
 
 def _quantile_is_valid(q):
@@ -35,6 +39,17 @@ def _cpercentile(N, percent, key=lambda x: x):
     return d0 + d1
 
 
+@to_ivy_arrays_and_back
+@handle_numpy_out
+def ptp(a, axis=None, out=None, keepdims=False):
+
+    x = ivy.max(a, axis=axis, keepdims=keepdims)
+    y = ivy.min(a, axis=axis, keepdims=keepdims)
+    ret = ivy.subtract(x, y)
+    return ret.astype(a.dtype, copy=False)
+
+
+
 def nanpercentile(
     a,
     /,


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_numpy/test_statistics/test_order_statistics.py b/ivy_tests/test_ivy/test_frontends/test_numpy/test_statistics/test_order_statistics.py
--- a/ivy_tests/test_ivy/test_frontends/test_numpy/test_statistics/test_order_statistics.py
+++ b/ivy_tests/test_ivy/test_frontends/test_numpy/test_statistics/test_order_statistics.py
@@ -6,10 +6,41 @@
 from ivy_tests.test_ivy.test_functional.test_core.test_statistical import (
     _statistical_dtype_values,
 )
+import ivy_tests.test_ivy.helpers as helpers
 import ivy_tests.test_ivy.test_frontends.test_numpy.helpers as np_frontend_helpers
 from ivy_tests.test_ivy.helpers import handle_frontend_test
 
 
+# ptp
+@handle_frontend_test(
+    fn_tree="numpy.ptp",
+    dtype_values_axis=_statistical_dtype_values(function="ptp"),
+    keep_dims=st.booleans(),
+    test_with_out=st.just(False),
+)
+def test_numpy_ptp(
+    dtype_values_axis,
+    frontend,
+    test_flags,
+    fn_tree,
+    keep_dims,
+):
+    input_dtypes, values, axis = dtype_values_axis
+    if isinstance(axis, tuple):
+        axis = axis[0]
+
+    helpers.test_frontend_function(
+        a=values[0],
+        axis=axis,
+        out=None,
+        keepdims=keep_dims,
+        frontend=frontend,
+        fn_tree=fn_tree,
+        test_flags=test_flags,
+        input_dtypes=input_dtypes,
+    )
+
+
 # nanpercentile
 @handle_frontend_test(
     fn_tree="numpy.nanpercentile",
Repository: ivy-llc/ivy

Issue:
searchsorted
#15044 


Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/search.py b/ivy/functional/frontends/paddle/tensor/search.py
--- a/ivy/functional/frontends/paddle/tensor/search.py
+++ b/ivy/functional/frontends/paddle/tensor/search.py
@@ -43,3 +43,19 @@ def nonzero(input, /, *, as_tuple=False):
     if as_tuple is False:
         ret = ivy.matrix_transpose(ivy.stack(ret))
     return ret
+
+
+@with_supported_dtypes(
+    {"2.5.0 and below": ("float32", "float64", "int32", "int64")},
+    "paddle",
+)
+@to_ivy_arrays_and_back
+def searchsorted(sorted_sequence, values, out_int32=False, right=False, name=None):
+    if right:
+        side = "right"
+    else:
+        side = "left"
+    ret = ivy.searchsorted(sorted_sequence, values, side=side)
+    if out_int32:
+        ret = ivy.astype(ret, "int32")
+    return ret


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_search.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_search.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_search.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_search.py
@@ -1,4 +1,5 @@
 # global
+import numpy as np
 from hypothesis import strategies as st
 
 # local
@@ -125,3 +126,40 @@ def test_paddle_nonzero(
         input=input[0],
         as_tuple=as_tuple,
     )
+
+
+# searchsorted
+@handle_frontend_test(
+    fn_tree="paddle.searchsorted",
+    dtype_and_values=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+        shared_dtype=True,
+        min_num_dims=1,
+        num_arrays=2,
+    ),
+    out_int32=st.booleans(),
+    right=st.booleans(),
+)
+def test_paddle_searchsorted(
+    *,
+    dtype_and_values,
+    out_int32,
+    right,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+):
+    dtype, input = dtype_and_values
+    input[0] = np.sort(input[0])
+    helpers.test_frontend_function(
+        input_dtypes=dtype,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        sorted_sequence=input[0],
+        values=input[1],
+        out_int32=out_int32,
+        right=right,
+    )
Repository: ivy-llc/ivy

Issue:
diff



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py
--- a/ivy/functional/frontends/paddle/tensor/math.py
+++ b/ivy/functional/frontends/paddle/tensor/math.py
@@ -398,3 +398,11 @@ def prod(x, axis=None, keepdim=False, dtype=None, name=None):
 @to_ivy_arrays_and_back
 def any(x, axis=None, keepdim=False, name=None):
     return ivy.any(x, axis=axis, keepdims=keepdim)
+
+
+@with_supported_dtypes(
+    {"2.5.1 and below": ("float32", "float64", "int32", "int64")}, "paddle"
+)
+@to_ivy_arrays_and_back
+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)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py
@@ -1,4 +1,5 @@
 # global
+from hypothesis import strategies as st
 
 # local
 import ivy_tests.test_ivy.helpers as helpers
@@ -1782,3 +1783,54 @@ def test_paddle_any(
         axis=axis,
         keepdim=False,
     )
+
+
+# diff
+@handle_frontend_test(
+    fn_tree="paddle.tensor.math.diff",
+    dtype_n_x_n_axis=helpers.dtype_values_axis(
+        available_dtypes=st.shared(helpers.get_dtypes("valid"), key="dtype"),
+        min_num_dims=1,
+        valid_axis=True,
+        force_int_axis=True,
+    ),
+    n=st.integers(min_value=1, max_value=1),
+    dtype_prepend=helpers.dtype_and_values(
+        available_dtypes=st.shared(helpers.get_dtypes("valid"), key="dtype"),
+        min_num_dims=1,
+        max_num_dims=1,
+    ),
+    dtype_append=helpers.dtype_and_values(
+        available_dtypes=st.shared(helpers.get_dtypes("valid"), key="dtype"),
+        min_num_dims=1,
+        max_num_dims=1,
+    ),
+)
+def test_paddle_diff(
+    *,
+    dtype_n_x_n_axis,
+    n,
+    dtype_prepend,
+    dtype_append,
+    test_flags,
+    frontend,
+    backend_fw,
+    fn_tree,
+    on_device,
+):
+    input_dtype, x, axis = dtype_n_x_n_axis
+    _, prepend = dtype_prepend
+    _, append = dtype_append
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        test_flags=test_flags,
+        frontend=frontend,
+        backend_to_test=backend_fw,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+        n=n,
+        axis=axis,
+        prepend=prepend[0],
+        append=append[0],
+    )
Repository: ivy-llc/ivy

Issue:
 log2



Discussion:
working on it again

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/tensor.py b/ivy/functional/frontends/paddle/tensor/tensor.py
--- a/ivy/functional/frontends/paddle/tensor/tensor.py
+++ b/ivy/functional/frontends/paddle/tensor/tensor.py
@@ -489,12 +489,21 @@ def floor_divide(self, y, name=None):
     def conj(self, name=None):
         return ivy.conj(self._ivy_array)
 
+
+
+    @with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
+    def log2(self, name=None):
+        return ivy.log2(self._ivy_array)
+
+
+
     @with_unsupported_dtypes(
         {"2.4.2 and below": ("float32", "float64", "int32", "int64")}, "paddle"
     )
     def neg(self, name=None):
         return paddle_frontend.neg(self)
 
+
     @with_supported_dtypes(
         {
             "2.5.0 and below": (


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py
@@ -2262,8 +2262,6 @@ def test_paddle_conj(
         frontend=frontend,
         on_device=on_device,
     )
-
-
 # floor_
 @handle_frontend_method(
     class_tree=CLASS_TREE,
@@ -2297,6 +2295,39 @@ def test_paddle_instance_floor_(
     )
 
 
+
+# log2
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="paddle.to_tensor",
+    method_name="log2",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+    ),
+)
+def test_paddle_instance_log2(
+    dtype_and_x,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+    frontend,
+    on_device,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_method(
+        init_input_dtypes=input_dtype,
+        init_all_as_kwargs_np={
+            "data": x[0],
+        },
+        method_input_dtypes=input_dtype,
+        method_all_as_kwargs_np={},
+        frontend_method_data=frontend_method_data,
+        init_flags=init_flags,
+        method_flags=method_flags,
+        frontend=frontend,
+        on_device=on_device,
+    )
+
 # neg
 @handle_frontend_method(
     class_tree=CLASS_TREE,
Repository: ivy-llc/ivy

Issue:
 kron



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py
--- a/ivy/functional/frontends/paddle/tensor/math.py
+++ b/ivy/functional/frontends/paddle/tensor/math.py
@@ -322,6 +322,14 @@ def minimum(x, y, name=None):
     return ivy.minimum(x, y)
 
 
+@with_supported_dtypes(
+    {"2.5.1 and below": ("float16", "float32", "float64", "int32", "int64")}, "paddle"
+)
+@to_ivy_arrays_and_back
+def kron(x, y, name=None):
+    return ivy.kron(x, y)
+
+
 @with_supported_dtypes(
     {"2.4.2 and below": ("float32", "float64", "int32", "int64")}, "paddle"
 )


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py
@@ -4,7 +4,9 @@
 # local
 import ivy_tests.test_ivy.helpers as helpers
 from ivy_tests.test_ivy.helpers import handle_frontend_test
-from ivy_tests.test_ivy.test_frontends.test_torch.test_blas_and_lapack_ops import _get_dtype_input_and_matrices
+from ivy_tests.test_ivy.test_frontends.test_torch.test_blas_and_lapack_ops import (
+    _get_dtype_input_and_matrices,
+)
 
 
 # sin
@@ -1892,3 +1894,35 @@ def test_paddle_mm(
         input=x,
         mat2=y,
     )
+
+
+# kron
+@handle_frontend_test(
+    fn_tree="paddle.tensor.math.kron",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+        num_arrays=2,
+        allow_inf=False,
+        shared_dtype=True,
+    ),
+)
+def test_paddle_kron(
+    *,
+    dtype_and_x,
+    on_device,
+    fn_tree,
+    backend_fw,
+    frontend,
+    test_flags,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        frontend=frontend,
+        backend_to_test=backend_fw,
+        fn_tree=fn_tree,
+        test_flags=test_flags,
+        on_device=on_device,
+        x=x[0],
+        y=x[1],
+    )
Repository: ivy-llc/ivy

Issue:
Softplus



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/nn/functional/activation.py b/ivy/functional/frontends/paddle/nn/functional/activation.py
--- a/ivy/functional/frontends/paddle/nn/functional/activation.py
+++ b/ivy/functional/frontends/paddle/nn/functional/activation.py
@@ -211,6 +211,12 @@ def mish(x, name=None):
     return ivy.mish(x)
 
 
+@with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def softplus(x, beta=1, threshold=20, name=None):
+    return ivy.softplus(x, beta=beta, threshold=threshold)
+
+
 @with_supported_dtypes({"2.4.2 and below": ("float32", "float64")}, "paddle")
 @to_ivy_arrays_and_back
 def leaky_relu(x, negative_slope=0.01, name=None):


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
@@ -515,7 +515,33 @@ def test_paddle_mish(
         x=x[0],
     )
 
+    
+@handle_frontend_test(
+    fn_tree="paddle.nn.functional.softplus",
+    dtype_and_input=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+        min_num_dims=1,
+    ),
+)
+def test_paddle_softplus(
+    *,
+    dtype_and_input,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+):
+    input_dtype, x = dtype_and_input
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+    )
 
+    
 @handle_frontend_test(
     fn_tree="paddle.nn.functional.leaky_relu",
     dtype_and_x=helpers.dtype_and_values(