HomePhabricator

[mlir] Add support for lowering tanh to LLVMIR.

Authored by hanchung on Jun 15 2020, 10:26 AM.

Description

[mlir] Add support for lowering tanh to LLVMIR.

Summary:
Fixed build of D81618

Add a pattern for expanding tanh op into exp form.
A tanh is expanded into:

  1. 1-exp^{-2x} / 1+exp^{-2x}, if x => 0
  2. exp^{2x}-1 / exp^{2x}+1 , if x < 0.

Differential Revision: https://reviews.llvm.org/D82040

Details

Committed
hanchungJun 18 2020, 10:42 AM
Differential Revision
D82040: [mlir] Add support for expanding tanh op into exp form.
Parents
rGc835b5cc1df6: [NFC][TableGen] Fix some clang-tidy warnings
Branches
Unknown
Tags
Unknown