Skip to content

Commit

Permalink
Add __nv_fast_expf to InstructionDerivatives.td (#2068)
Browse files Browse the repository at this point in the history
* Add __nv_fast_expf to InstructionDerivatives.td

* Update InstructionDerivatives.td
  • Loading branch information
wsmoses authored Sep 3, 2024
1 parent 457320d commit ce81c9c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions enzyme/Enzyme/InstructionDerivatives.td
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,13 @@ def : CallPattern<(Op $x),
[ReadNone, NoUnwind]
>;

def : CallPattern<(Op $x),
["__nv_fast_expf"],
[(FMul (DiffeRet), (Call<(SameFunc), [ReadNone,NoUnwind]> $x) )],
(ForwardFromSummedReverse),
[ReadNone, NoUnwind]
>;

def : CallPattern<(Op $x),
["exp10"],
[(FMul (FMul (DiffeRet), (Call<(SameFunc), [ReadNone,NoUnwind]> $x) ), (ConstantFP<"2.30258509299404568401799145468"> $x))],
Expand Down

0 comments on commit ce81c9c

Please sign in to comment.