Skip to content

Commit

Permalink
added solve_triangular to frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
alia2109 committed Aug 15, 2023
1 parent 16984fb commit 19f9818
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions ivy_tests/test_ivy/test_frontends/test_torch/test_linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,39 @@ def test_torch_solve(
)


#solve_triangular
@handle_frontend_test(
fn_tree="torch.linalg.solve_triangular",
dtype_x=helpers.dtype_and_values(
available_dtypes=helpers.get_dtypes("valid"),
),
)
def test_solve_triangular(
*,
dtype_and_x,
on_device,
fn_tree,
frontend,
backend_fw,
test_flags,
):
input_dytpe, x = dtype_and_x
A = np.triu(np.random.randn(3,3))
B = np.random.randn(3,1)
upper = True
helpers.test_frontend_function(
input_dtypes=input_dytpe,
frontend=frontend,
backend_to_test=backend_fw,
test_flags=test_flags,
fn_tree=fn_tree,
on_device=on_device,
A=A,
B=B,
upper=upper
)


# tensorinv
@st.composite
def _tensorinv_helper(draw):
Expand Down

0 comments on commit 19f9818

Please sign in to comment.