Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Jun 1, 2024
1 parent 6338ca8 commit 315e0db
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/enzyme_ad/jax/Implementations/HLODerivatives.td
Original file line number Diff line number Diff line change
Expand Up @@ -561,14 +561,6 @@ def : HLODerivative<"Atan2Op", (Op $x, $y),
]
>;

def : HLODerivative<"CoshOp", (Op $x), [(CheckedMul (DiffeRet), (Sinh $x))]>;

def : HLODerivative<"SinhOp", (Op $x), [(CheckedMul (DiffeRet), (Cosh $x))]>;

def : HLODerivative<"TanOp", (Op $x), [
(CheckedDiv (DiffeRet), (Pow (Cos $x), (HLOConstantFP<"2">)), (HLOConstantFP<"1">))
]>;

def : HLOReadOnlyIdentityOp<"BroadcastInDimOp">;

def : HLOInactiveOp<"BroadcastAndOp">;
Expand Down Expand Up @@ -614,6 +606,8 @@ def : HLODerivative<"ConvolutionOp", (Op $lhs, $rhs),

def : HLODerivative<"CosineOp", (Op $x), [(CheckedMul (DiffeRet), (Neg (Sin $x)))]>;

def : HLODerivative<"CoshOp", (Op $x), [(CheckedMul (DiffeRet), (Sinh $x))]>;

def : HLOInactiveOp<"CreateTokenOp">;

def : HLODerivative<"DivOp", (Op $x, $y),
Expand Down Expand Up @@ -741,6 +735,8 @@ def : HLOInactiveOp<"SignOp">;

def : HLODerivative<"SineOp", (Op $x), [(CheckedMul (DiffeRet), (Cos $x))]>;

def : HLODerivative<"SinhOp", (Op $x), [(CheckedMul (DiffeRet), (Cosh $x))]>;

def : HLOReadOnlyIdentityOp<"SliceOp">;

def : HLODerivative<"SubtractOp", (Op $x, $y),
Expand All @@ -757,6 +753,10 @@ def : HLODerivative<"SqrtOp", (Op $x),
]
>;

def : HLODerivative<"TanOp", (Op $x), [
(CheckedDiv (DiffeRet), (Pow (Cos $x), (HLOConstantFP<"2">)), (HLOConstantFP<"1">))
]>;

def : HLODerivative<"TanhOp", (Op $x),
[
(CheckedMul (DiffeRet), (Sub (HLOConstantFP<"1">), (Mul (Tanh $x), (Tanh $x))))
Expand Down

0 comments on commit 315e0db

Please sign in to comment.