Skip to content

Commit

Permalink
Fix torch.linalg.matrix_power (#7495) (#8351)
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Teo <[email protected]>
  • Loading branch information
simonteozw and Simon Teo authored Nov 4, 2024
1 parent a19a996 commit 7dda437
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion experimental/torch_xla2/test/test_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"linalg.det",
"linalg.ldl_solve",
"linalg.lu_solve",
"linalg.matrix_power",
"max_pool2d_with_indices_backward",
"nn.functional.adaptive_avg_pool3d",
"nn.functional.adaptive_max_pool1d",
Expand Down
4 changes: 4 additions & 0 deletions experimental/torch_xla2/torch_xla2/ops/jtorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,10 @@ def linalg_solve_ex(a, b):
def linalg_svd(a, full_matrices=True, **kwargs):
return jaten._aten__linalg_svd(a, full_matrices=full_matrices, **kwargs)

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

@register_function(torch.svd)
def svd(a, some=True, compute_uv=True):
if not compute_uv:
Expand Down

0 comments on commit 7dda437

Please sign in to comment.