[all-commits] [llvm/llvm-project] 4da965: [mlir][math] Expand math.exp2 to use math.exp.

Balaji V. Iyer. via All-commits all-commits at lists.llvm.org
Thu Apr 13 09:08:27 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4da96515ea8552cdf14c6aa6310d2a91fbe74641
      https://github.com/llvm/llvm-project/commit/4da96515ea8552cdf14c6aa6310d2a91fbe74641
  Author: Balaji V. Iyer <bviyer at gmail.com>
  Date:   2023-04-13 (Thu, 13 Apr 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Math/Transforms/Passes.h
    M mlir/lib/Dialect/Math/Transforms/ExpandPatterns.cpp
    M mlir/test/Dialect/Math/expand-math.mlir
    M mlir/test/lib/Dialect/Math/TestExpandMath.cpp
    A mlir/test/mlir-cpu-runner/test-expand-math-approx.mlir

  Log Message:
  -----------
  [mlir][math] Expand math.exp2 to use math.exp.

Exp2 functions are pushed directly to libm. This is problematic for
situations where libm is not available. This patch will expand the exp2
function to use exp2 with the input multiplied by ln2 (natural log).

Reviewed By: rsuderman

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




More information about the All-commits mailing list