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

Issue:
tanh_



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
@@ -239,3 +239,11 @@ def softmax_(x, axis=-1, dtype=None, name=None):
     ret = ivy.softmax(x, axis=axis)
     ivy.inplace_update(x, ret)
     return x
+
+
+@with_supported_dtypes({"2.4.2 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def tanh_(x, name=None):
+    ret = ivy.tanh(x)
+    ivy.inplace_update(x, ret)
+    return x


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_activation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_activation.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_activation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_activation.py
@@ -706,3 +706,29 @@ def test_paddle_softmax_(
         axis=axis,
         dtype=ivy.as_ivy_dtype(dtypes[0]),
     )
+
+
+# tanh_
+@handle_frontend_test(
+    fn_tree="paddle.nn.functional.tanh_",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+    ),
+)
+def test_paddle_tanh_(
+    *,
+    dtype_and_x,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+):
+    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:
gumbel_softmax



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
@@ -247,3 +247,17 @@ def tanh_(x, name=None):
     ret = ivy.tanh(x)
     ivy.inplace_update(x, ret)
     return x
+
+
+@with_supported_dtypes({"2.4.2 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def gumbel_softmax(x, temperature=1.0, hard=False, axis=-1, name=None):
+    gumbel_noice = -ivy.log(-ivy.log(ivy.random_uniform(ivy.shape(x) + 1e-20) + 1e-20))
+    gumbel_logits = (x + gumbel_noice) / temperature
+    y_soft = ivy.softmax(gumbel_logits, axis=axis)
+
+    if hard:
+        y_hard = ivy.one_hot(ivy.argmax(y_soft, axis=axis), ivy.shape(y_soft)[axis])
+        return y_hard
+    else:
+        return y_soft


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_activation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_activation.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_activation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_activation.py
@@ -732,3 +732,45 @@ def test_paddle_tanh_(
         on_device=on_device,
         x=x[0],
     )
+
+
+# gumbel_softmax
+@handle_frontend_test(
+    fn_tree="paddle.nn.functional.gumbel_softmax",
+    dtype_x_and_axis=helpers.dtype_values_axis(
+        available_dtypes=helpers.get_dtypes("float"),
+        min_num_dims=1,
+        max_axes_size=1,
+        force_int_axis=True,
+        valid_axis=True,
+        min_value=-30.0,
+        max_value=30.0,
+    ),
+    dtypes=helpers.get_dtypes("float", none=False, full=False),
+    temperature=st.floats(min_value=1e-3, max_value=10),
+    hard=st.booleans(),
+)
+def test_paddle_gumbel_softmax(
+    *,
+    dtype_x_and_axis,
+    dtypes,
+    temperature,
+    hard,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+):
+    input_dtype, x, axis = dtype_x_and_axis
+    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],
+        axis=axis,
+        dtype=ivy.as_ivy_dtype(dtypes[0]),
+        temperature=temperature,
+        hard=hard,
+    )
Repository: ivy-llc/ivy

Issue:
conj



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
@@ -1590,6 +1590,12 @@ def logaddexp(self, other):
     def adjoint(self):
         return torch_frontend.adjoint(self)
 
+    @with_unsupported_dtypes(
+        {"2.0.1 and below": ("int16", "float16", "bfloat16")}, "torch"
+    )
+    def conj(self):
+        return torch_frontend.conj(self)
+
 
 class Size(tuple):
     def __new__(cls, iterable=()):


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
@@ -10432,3 +10432,35 @@ def test_torch_instance_adjoint(
         frontend=frontend,
         on_device=on_device,
     )
+
+
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="torch.tensor",
+    method_name="conj",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float_and_complex")
+    ),
+)
+def test_torch_instance_conj(
+    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,
+    )
Repository: ivy-llc/ivy

Issue:
imag



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/lax/operators.py b/ivy/functional/frontends/jax/lax/operators.py
--- a/ivy/functional/frontends/jax/lax/operators.py
+++ b/ivy/functional/frontends/jax/lax/operators.py
@@ -12,6 +12,11 @@
 _slice = builtins.slice
 
 
+@to_ivy_arrays_and_back
+def imag(x):
+    return ivy.imag(x)
+
+
 @to_ivy_arrays_and_back
 def abs(x):
     return ivy.abs(x)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_lax/test_operators.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_lax/test_operators.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_lax/test_operators.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_lax/test_operators.py
@@ -24,6 +24,35 @@
 )
 
 
+# imag
+@handle_frontend_test(
+    fn_tree="jax.lax.imag",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("complex")
+    ),
+)
+def test_jax_imag(
+    *,
+    dtype_and_x,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+    backend_fw,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        backend_to_test=backend_fw,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        test_values=True,
+        x=x[0],
+    )
+
+
 # add
 @handle_frontend_test(
     fn_tree="jax.lax.add",
Repository: ivy-llc/ivy

Issue:
fftshift
This subtask is to add the `fftshift` function to the Jax frontend


Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/numpy/fft.py b/ivy/functional/frontends/jax/numpy/fft.py
--- a/ivy/functional/frontends/jax/numpy/fft.py
+++ b/ivy/functional/frontends/jax/numpy/fft.py
@@ -1,6 +1,25 @@
 # local
 import ivy
 from ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_back
+from ivy.func_wrapper import with_unsupported_dtypes
+
+
+@to_ivy_arrays_and_back
+@with_unsupported_dtypes({"2.4.2 and below": ("float16", "bfloat16")}, "paddle")
+def fftshift(x, axes=None, name=None):
+    shape = x.shape
+
+    if axes is None:
+        axes = tuple(range(x.ndim))
+        shifts = [(dim // 2) for dim in shape]
+    elif isinstance(axes, int):
+        shifts = shape[axes] // 2
+    else:
+        shifts = [shape[ax] // 2 for ax in axes]
+
+    roll = ivy.roll(x, shifts, axis=axes)
+
+    return roll
 
 
 @to_ivy_arrays_and_back


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_numpy/test_fft.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_numpy/test_fft.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_numpy/test_fft.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_numpy/test_fft.py
@@ -46,3 +46,27 @@ def test_jax_numpy_fft(
         atol=1e-02,
         rtol=1e-02,
     )
+
+
+# fftshift
+@handle_frontend_test(
+    fn_tree="jax.numpy.fft.fftshift",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"), shape=(4,), array_api_dtypes=True
+    ),
+)
+def test_jax_numpy_fftshift(
+    dtype_and_x, backend_fw, frontend, test_flags, fn_tree, on_device
+):
+    input_dtype, arr = 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,
+        test_values=True,
+        x=arr[0],
+        axes=None,
+    )
Repository: ivy-llc/ivy

Issue:
margin_ranking_loss



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/nn/functional/loss.py b/ivy/functional/frontends/paddle/nn/functional/loss.py
--- a/ivy/functional/frontends/paddle/nn/functional/loss.py
+++ b/ivy/functional/frontends/paddle/nn/functional/loss.py
@@ -210,3 +210,23 @@ def kl_div(
     else:
         pass
     return out.astype(label.dtype)
+
+
+@with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def margin_ranking_loss(input, other, label, margin=0.0, reduction="mean", name=None):
+    reduction = _get_reduction_func(reduction)
+
+    out = ivy.subtract(input, other)
+    neg_label = ivy.negative(label)
+    out = ivy.multiply(neg_label, out)
+
+    if margin != 0.0:
+        margin_var = ivy.full([1], margin, dtype=out.dtype)
+        out = ivy.add(out, margin_var)
+
+    out = ivy.where(out < 0, 0, out)
+    out = reduction(out).astype(input.dtype)
+    out = ivy.atleast_1d(out)
+
+    return out


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_loss.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_loss.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_loss.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_loss.py
@@ -346,3 +346,47 @@ def test_paddle_kl_div(
         label=x[1],
         reduction=reduction,
     )
+
+
+@handle_frontend_test(
+    fn_tree="paddle.nn.functional.margin_ranking_loss",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+        num_arrays=3,
+        shared_dtype=True,
+        min_num_dims=2,
+        max_num_dims=5,
+        min_dim_size=1,
+        max_dim_size=10,
+    ),
+    margin=st.floats(
+        min_value=-1.0,
+        max_value=1.0,
+        width=16,
+    ),
+    reduction=st.sampled_from(["mean", "sum", "none"]),
+)
+def test_paddle_margin_ranking_loss(
+    dtype_and_x,
+    margin,
+    reduction,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+    backend_fw,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        backend_to_test=backend_fw,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        input=x[0],
+        other=x[1],
+        label=x[2],
+        margin=margin,
+        reduction=reduction,
+    )
Repository: ivy-llc/ivy

Issue:
cbrt



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/lax/operators.py b/ivy/functional/frontends/jax/lax/operators.py
--- a/ivy/functional/frontends/jax/lax/operators.py
+++ b/ivy/functional/frontends/jax/lax/operators.py
@@ -652,3 +652,8 @@ def conj(x):
 @to_ivy_arrays_and_back
 def is_finite(x):
     return ivy.isfinite(x)
+
+
+@to_ivy_arrays_and_back
+def cbrt(x):
+    return ivy.pow(x, 1 / 3)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_lax/test_operators.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_lax/test_operators.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_lax/test_operators.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_lax/test_operators.py
@@ -2960,3 +2960,30 @@ def test_jax_is_finite(
         on_device=on_device,
         x=x[0],
     )
+
+
+# cbrt
+@handle_frontend_test(
+    fn_tree="jax.lax.cbrt",
+    dtype_and_x=helpers.dtype_and_values(available_dtypes=helpers.get_dtypes("valid")),
+    test_with_out=st.just(False),
+)
+def test_jax_cbrt(
+    *,
+    dtype_and_x,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+    backend_fw,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        backend_to_test=backend_fw,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+    )
Repository: ivy-llc/ivy

Issue:
qr
Adding the qr function to paddle.tensor.linalg as per the todo issue


Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/linalg.py b/ivy/functional/frontends/paddle/tensor/linalg.py
--- a/ivy/functional/frontends/paddle/tensor/linalg.py
+++ b/ivy/functional/frontends/paddle/tensor/linalg.py
@@ -181,6 +181,13 @@ def pinv(x, rcond=1e-15, hermitian=False, name=None):
     return ivy.pinv(x, rtol=rcond)
 
 
+# qr
+@with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def qr(x, mode="reduced", name=None):
+    return ivy.qr(x, mode=mode)
+
+
 # solve
 @with_unsupported_dtypes({"2.5.1 and below": ("float16", "bfloat16")}, "paddle")
 @to_ivy_arrays_and_back


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_linalg.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_linalg.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_linalg.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_linalg.py
@@ -7,6 +7,10 @@
 import ivy_tests.test_ivy.helpers as helpers
 from ivy_tests.test_ivy.helpers import assert_all_close
 from ivy_tests.test_ivy.helpers import handle_frontend_test, matrix_is_stable
+from ivy_tests.test_ivy.test_functional.test_core.test_linalg import (
+    _get_dtype_and_matrix,
+)
+
 from ivy_tests.test_ivy.test_frontends.test_tensorflow.test_linalg import (
     _get_second_matrix,
     _get_cholesky_matrix,
@@ -835,6 +839,37 @@ def test_paddle_pinv(
     )
 
 
+# qr
+@handle_frontend_test(
+    fn_tree="paddle.tensor.linalg.qr",
+    dtype_and_x=_get_dtype_and_matrix(),
+    mode=st.sampled_from(("reduced", "complete")),
+    test_with_out=st.just(False),
+)
+def test_paddle_qr(
+    dtype_and_x,
+    mode,
+    frontend,
+    test_flags,
+    fn_tree,
+    backend_fw,
+    on_device,
+):
+    dtype, x = dtype_and_x
+    assume(matrix_is_stable(x[0]))
+    helpers.test_frontend_function(
+        input_dtypes=dtype,
+        frontend=frontend,
+        test_flags=test_flags,
+        backend_to_test=backend_fw,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        rtol=1e-01,
+        x=x[0],
+        mode=mode,
+    )
+
+
 # solve
 @handle_frontend_test(
     fn_tree="paddle.solve",
Repository: ivy-llc/ivy

Issue:
conv1d_transpose



Discussion:

Resolving patch:
diff --git a/ivy/functional/backends/paddle/layers.py b/ivy/functional/backends/paddle/layers.py
--- a/ivy/functional/backends/paddle/layers.py
+++ b/ivy/functional/backends/paddle/layers.py
@@ -136,7 +136,10 @@ def conv1d(
     raise IvyNotImplementedException()
 
 
-# noinspection PyUnresolvedReferences
+@with_unsupported_device_and_dtypes(
+    {"2.5.0 and below": {"cpu": ("float16", "bfloat16")}},
+    backend_version,
+)
 def conv1d_transpose(
     x: paddle.Tensor,
     filters: paddle.Tensor,
@@ -149,7 +152,28 @@ def conv1d_transpose(
     dilations: Union[int, Tuple[int]] = 1,
     out: Optional[paddle.Tensor] = None,
 ):
-    raise IvyNotImplementedException()
+    if data_format == "NWC":
+        x = x.transpose([0, 2, 1])
+    strides = [strides] if isinstance(strides, int) else strides
+    dilations = [dilations] if isinstance(dilations, int) else dilations
+    filters = filters.transpose([1, 2, 0])
+    not_valid_pad, padding_list, output_padding = _pad_before_conv_tranpose(
+        x, filters, strides, padding, 1, dilations, output_shape, filters.shape[2:]
+    )
+    res = paddle.nn.functional.conv1d_transpose(
+        x,
+        filters,
+        stride=strides,
+        padding=padding_list,
+        output_padding=output_padding,
+        dilation=dilations,
+        data_format="NCL",
+    )
+    if not_valid_pad[0]:
+        res = res[:, :, 0:-1]
+    if data_format == "NWC":
+        res = res.transpose([0, 2, 1])
+    return res
 
 
 # noinspection PyUnresolvedReferences


Test patch:
Repository: ivy-llc/ivy

Issue:
multi_label_so



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/nn/functional/loss.py b/ivy/functional/frontends/paddle/nn/functional/loss.py
--- a/ivy/functional/frontends/paddle/nn/functional/loss.py
+++ b/ivy/functional/frontends/paddle/nn/functional/loss.py
@@ -411,3 +411,21 @@ def triplet_margin_loss(
 
     loss = reduction(loss).astype(input.dtype)
     return loss
+
+
+@with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def multi_label_soft_margin_loss(
+    input, label, weight=None, reduction="mean", name=None
+):
+    reduction = _get_reduction_func(reduction)
+    loss = -(
+        label * ivy.log(ivy.sigmoid(input))
+        + (1 - label) * ivy.log(1 - ivy.sigmoid(input))
+    )
+
+    if weight is not None:
+        loss = ivy.multiply(weight, loss)
+    loss = ivy.mean(loss, axis=-1)
+    ret = reduction(loss).astype(input.dtype)
+    return ret


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_loss.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_loss.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_loss.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_loss.py
@@ -660,3 +660,55 @@ def test_paddle_triplet_margin_loss(
         swap=swap,
         reduction=reduction,
     )
+
+
+@handle_frontend_test(
+    fn_tree="paddle.nn.functional.multi_label_soft_margin_loss",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+        num_arrays=2,
+        min_value=-2,
+        max_value=2,
+        shared_dtype=True,
+        allow_inf=False,
+        min_num_dims=2,
+        max_num_dims=5,
+        min_dim_size=1,
+        max_dim_size=10,
+    ),
+    dtype_and_weight=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+        min_num_dims=2,
+        min_value=-2,
+        max_value=2,
+    ),
+    reduction=st.sampled_from(["mean", "none", "sum"]),
+)
+def test_paddle_multi_label_soft_margin_loss(
+    dtype_and_x,
+    dtype_and_weight,
+    reduction,
+    on_device,
+    fn_tree,
+    backend_fw,
+    frontend,
+    test_flags,
+):
+    x_dtype, x = dtype_and_x
+    weight_dtype, weight = dtype_and_weight
+    helpers.test_frontend_function(
+        input_dtypes=[
+            x_dtype[0],
+            x_dtype[1],
+            weight_dtype[0],
+        ],
+        frontend=frontend,
+        backend_to_test=backend_fw,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        input=x[0],
+        label=x[1],
+        weight=weight[0],
+        reduction=reduction,
+    )
Repository: ivy-llc/ivy

Issue:
mm



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
@@ -406,3 +406,11 @@ def any(x, axis=None, keepdim=False, name=None):
 @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)
+
+
+@with_supported_dtypes(
+    {"2.5.1 and below": ("float32", "float64", "int32", "int64")}, "paddle"
+)
+@to_ivy_arrays_and_back
+def mm(input, mat2, name=None):
+    return ivy.matmul(input, mat2)


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,6 +4,7 @@
 # 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
 
 
 # sin
@@ -1834,3 +1835,30 @@ def test_paddle_diff(
         prepend=prepend[0],
         append=append[0],
     )
+
+
+# mm
+@handle_frontend_test(
+    fn_tree="paddle.tensor.math.mm",
+    dtype_xy=_get_dtype_input_and_matrices(),
+)
+def test_paddle_mm(
+    *,
+    dtype_xy,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+    backend_fw,
+):
+    input_dtype, x, y = dtype_xy
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        backend_to_test=backend_fw,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        input=x,
+        mat2=y,
+    )