| 212 | //! EQ: x == y ? 1 : 0 |
| 213 | template <> |
| 214 | mlir::Value lower_mode<Mode::EQ>( |
| 215 | mlir::OpBuilder& builder, mlir::Location loc, ValueRange operands) { |
| 216 | ValueBuilderHelper helper(builder, loc); |
| 217 | return helper.select( |
| 218 | helper.eq(operands[0], operands[1]), helper.const_f32(1.f), |
| 219 | helper.const_f32(0.f)); |
| 220 | } |
| 221 | |
| 222 | //! FAST_TANH_GRAD: ((-48.f * x * x) / (3.f + x * x) + 27.f + x * x) / (3.f + x |
| 223 | //! * x) * y |