Skip to content

Commit

Permalink
Fix torch.mvlgamma and torch.lgamma
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Teo committed Sep 28, 2024
1 parent a836357 commit 2036806
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions experimental/torch_xla2/torch_xla2/ops/jaten.py
Original file line number Diff line number Diff line change
Expand Up @@ -2197,6 +2197,13 @@ def _aten_hypot(input, other):
def _aten_igamma(input, other):
return jax.scipy.special.gammainc(input, other)

@op(torch.ops.aten.lgamma)
def _aten_lgamma(input, *, out=None):
return jax.scipy.special.gammaln(input).astype(jnp.float32)

@op(torch.ops.aten.mvlgamma)
def _aten_mvlgamma(input, p, *, out=None):
return jax.scipy.special.multigammaln(input, d)

@op(torch.ops.aten.linalg_eig)
def _aten_linalg_eig(A):
Expand Down

0 comments on commit 2036806

Please sign in to comment.