Skip to content

Commit

Permalink
fix(paddle-frontend) : fixed the bug in paddle.solve frontend function(
Browse files Browse the repository at this point in the history
…ivy-llc#23027)

Co-authored-by: hirwa-nshuti <[email protected]>
  • Loading branch information
dhanush-2501 and fnhirwa authored Sep 5, 2023
1 parent 615d1bc commit 7c8695d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions ivy/functional/frontends/paddle/tensor/linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ def qr(x, mode="reduced", name=None):


# solve
@with_unsupported_dtypes({"2.5.1 and below": ("float16", "bfloat16")}, "paddle")
@with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
@to_ivy_arrays_and_back
def solve(x1, x2, name=None):
return ivy.solve(x1, x2)
def solve(x, y, name=None):
return ivy.solve(x, y)


# transpose
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
)

from ivy_tests.test_ivy.test_frontends.test_tensorflow.test_linalg import (
_get_first_matrix,
_get_second_matrix,
_get_cholesky_matrix,
)
Expand Down Expand Up @@ -872,36 +873,35 @@ def test_paddle_qr(

# solve
@handle_frontend_test(
fn_tree="paddle.solve",
dtype_x=helpers.dtype_and_values(
available_dtypes=helpers.get_dtypes("float"),
num_arrays=2,
shared_dtype=True,
min_value=-10,
max_value=10,
),
aliases=["paddle.tensor.linalg.solve"],
fn_tree="paddle.tensor.linalg.solve",
aliases=["paddle.linalg.solve"],
x=_get_first_matrix(),
y=_get_second_matrix(),
test_with_out=st.just(False),
)
def test_paddle_solve(
*,
dtype_x,
x,
y,
frontend,
test_flags,
backend_fw,
test_flags,
fn_tree,
on_device,
):
input_dtype, x = dtype_x
input_dtype1, x1 = x
input_dtype2, x2 = y
helpers.test_frontend_function(
input_dtypes=input_dtype,
frontend=frontend,
input_dtypes=[input_dtype1, input_dtype2],
backend_to_test=backend_fw,
frontend=frontend,
test_flags=test_flags,
fn_tree=fn_tree,
on_device=on_device,
x=x[0],
y=x[1],
rtol=1e-3,
atol=1e-3,
x=x1,
y=x2,
)


Expand Down

0 comments on commit 7c8695d

Please sign in to comment.