Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
jansel committed May 24, 2024
1 parent 26bd3b9 commit 4efbed7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions torch/_inductor/codegen/cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,12 @@ def exp(x):
def exp2(x):
return f"{x}.exp2()"

@staticmethod
def expm1(x):
# decompose for a better performance
vec_one = f"decltype({x})(1)"
return f"{x}.exp() - {vec_one}"

@staticmethod
def erf(x):
return f"{x}.erf()"
Expand Down

0 comments on commit 4efbed7

Please sign in to comment.