Skip to content

Commit

Permalink
Update jaten.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chunnienc committed Sep 15, 2024
1 parent cf9f661 commit 647a0bb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions experimental/torch_xla2/torch_xla2/ops/jaten.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,8 @@ def _aten_relu(self):
@op(torch.ops.aten.cat)
def _aten_cat(tensors, dims=0):
tensors = [t for t in tensors if t.size > 0]
if not tensors:
return tensors[0]
return jnp.concatenate(tensors, dims)


Expand Down

0 comments on commit 647a0bb

Please sign in to comment.