Skip to content

Commit

Permalink
Avoids error removing linalg.eig from skiplist by modifying atol and …
Browse files Browse the repository at this point in the history
…rtol (#8068)
  • Loading branch information
anishfish2 authored Sep 25, 2024
1 parent 5b6e8cf commit 72fda76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions experimental/torch_xla2/test/test_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"linalg.cholesky_ex",
"linalg.cond",
"linalg.det",
"linalg.eig",
"linalg.eigh",
"linalg.eigvalsh",
"linalg.householder_product",
Expand Down Expand Up @@ -184,7 +183,7 @@
'nn.functional.feature_alpha_dropout',
}

atol_dict = {"matrix_exp": (2e-1, 2e-4), "linalg.pinv": (8e-1, 2e0)}
atol_dict = {"matrix_exp": (2e-1, 2e-4), "linalg.pinv": (8e-1, 2e0), "linalg.eig":(2e0, 3e0)}

def diff_output(testcase, output1, output2, rtol, atol, equal_nan=True, check_output=True):
if isinstance(output1, torch.Tensor):
Expand Down
2 changes: 1 addition & 1 deletion experimental/torch_xla2/torch_xla2/ops/jaten.py
Original file line number Diff line number Diff line change
Expand Up @@ -2196,7 +2196,7 @@ def _aten_igamma(input, other):

@op(torch.ops.aten.linalg_eig)
def _aten_linalg_eig(A):
return jax.numpy.linalg.eig(A)
return jnp.linalg.eig(A)


# aten.lcm
Expand Down

0 comments on commit 72fda76

Please sign in to comment.