Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -44,7 +44,6 @@
"equal",
"erfc",
"erfinv",
"exp2",
"expand",
"exponential",
"fft.fft2",
Expand Down
10 changes: 10 additions & 0 deletions experimental/torch_xla2/torch_xla2/ops/jaten.py
Original file line number Diff line number Diff line change
Expand Up @@ -1776,6 +1776,16 @@ def _aten_expm1(input):
return jnp.expm1(input)


# aten.exp2
@op(torch.ops.aten.exp2)
def _aten_exp2(input):
res = jnp.exp2(input)
new_dtype = mappings.t2j_dtype(torch.get_default_dtype())
if input.dtype == jax.numpy.int64:
res = res.astype(new_dtype)
return res


# aten.fill
@op(torch.ops.aten.fill)
@op(torch.ops.aten.full_like)
Expand Down