Skip to content

Commit

Permalink
fix: torch frontend linalg & blas_and_lapack_ops cholesky (#28767)
Browse files Browse the repository at this point in the history
Co-authored-by: Jin Wang <jin.wang-12@student.manchester.ac.uk>
  • Loading branch information
Daniel4078 and Jin Wang committed Jun 19, 2024
1 parent 84adbf0 commit 5e71687
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,9 @@ def test_torch_cholesky(
backend_fw,
):
dtype, x = dtype_and_x
x = x[0]
x = (
np.matmul(x.T, x) + np.identity(x.shape[0]) * 1e-3
) # make symmetric positive-definite
x = np.asarray(x[0], dtype=dtype[0])
x = np.matmul(np.conjugate(x.T), x) + np.identity(x.shape[0], dtype=dtype[0])
# make symmetric positive-definite
helpers.test_frontend_function(
input_dtypes=dtype,
backend_to_test=backend_fw,
Expand Down
4 changes: 2 additions & 2 deletions ivy_tests/test_ivy/test_frontends/test_torch/test_linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ def test_torch_cholesky(
):
dtype, x = dtype_and_x
x = np.asarray(x[0], dtype=dtype[0])
x = np.matmul(x.T, x) + np.identity(x.shape[0]) # make symmetric positive-definite

x = np.matmul(np.conjugate(x.T), x) + np.identity(x.shape[0], dtype=dtype[0])
# make symmetric positive-definite
helpers.test_frontend_function(
input_dtypes=dtype,
backend_to_test=backend_fw,
Expand Down

0 comments on commit 5e71687

Please sign in to comment.