Skip to content

Commit ffce7fb

Browse files
authored
implement diagonal_copy (#9416)
Signed-off-by: Chenyaaang <[email protected]>
1 parent 1da7309 commit ffce7fb

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

torchax/test/test_ops.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"bincount", # NOTE: dtype for int input torch gives float. This is weird.
1515
"byte",
1616
"cholesky_solve",
17-
"diagonal_copy",
1817
"geqrf",
1918
"histogram", # hard op: AssertionError: Tensor-likes are not close!
2019
"histogramdd", # TypeError: histogram requires ndarray or scalar arguments, got <class 'list'> at position 1.

torchax/torchax/ops/jaten.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2495,6 +2495,7 @@ def _aten_diag(input, diagonal=0):
24952495

24962496
# aten.diagonal
24972497
@op(torch.ops.aten.diagonal)
2498+
@op(torch.ops.aten.diagonal_copy)
24982499
def _aten_diagonal(input, offset=0, dim1=0, dim2=1):
24992500
return jnp.diagonal(input, offset, dim1, dim2)
25002501

0 commit comments

Comments
 (0)