Skip to content

Commit

Permalink
Fix op info test for svd_lowrank (#8376)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvhg authored Nov 13, 2024
1 parent bc227f7 commit 7220aee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion experimental/torch_xla2/test/test_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
"special.scaled_modified_bessel_k1",
"special.spherical_bessel_j0",
"special.zeta",
"svd_lowrank",
"unfold_copy",
"unfold",
"randint",
Expand Down Expand Up @@ -122,6 +121,7 @@
"linalg.pinv": (8e-1, 2e0),
"linalg.svd": (1e0, 1e0),
"svd": (1e0, 1e0),
"svd_lowrank": (1e0, 1e0),
"matrix_exp": (2e-1, 2e-4),
"cdist": (5e1, 3e0)}

Expand Down
4 changes: 2 additions & 2 deletions experimental/torch_xla2/torch_xla2/ops/jaten.py
Original file line number Diff line number Diff line change
Expand Up @@ -4559,8 +4559,8 @@ def _aten__linalg_slogdet(input):

# torch.linalg.svd
@op(torch.ops.aten._linalg_svd)
def _aten__linalg_svd(a, full_matrices=True):
return jnp.linalg.svd(a, full_matrices=full_matrices)
def _aten__linalg_svd(a, full_matrices=False, **kwargs):
return jnp.linalg.svd(a, full_matrices=full_matrices, **kwargs)


# torch.linalg.pinv
Expand Down
4 changes: 2 additions & 2 deletions experimental/torch_xla2/torch_xla2/ops/jtorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ def linalg_solve_ex(a, b):
return res, info

@register_function(torch.linalg.svd)
def linalg_svd(a, full_matrices=True, **kwargs):
return jaten._aten__linalg_svd(a, full_matrices=full_matrices, **kwargs)
def linalg_svd(a, full_matrices=True):
return jaten._aten__linalg_svd(a, full_matrices=full_matrices)

@register_function(torch.linalg.matrix_power)
def matrix_power(A, n, *, out=None):
Expand Down

0 comments on commit 7220aee

Please sign in to comment.