[all-commits] [llvm/llvm-project] a0fc94: [MLIR][Math] Add round operation

lorenzo chelini via All-commits all-commits at lists.llvm.org
Wed Jun 8 04:07:52 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a0fc94ab618973dc4454d0695abb104f6a8644d2
      https://github.com/llvm/llvm-project/commit/a0fc94ab618973dc4454d0695abb104f6a8644d2
  Author: lorenzo chelini <l.chelini at icloud.com>
  Date:   2022-06-08 (Wed, 08 Jun 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Math/IR/MathOps.td
    M mlir/lib/Conversion/MathToLLVM/MathToLLVM.cpp
    M mlir/lib/Conversion/MathToLibm/MathToLibm.cpp
    M mlir/test/Conversion/MathToLLVM/math-to-llvm.mlir
    M mlir/test/Conversion/MathToLibm/convert-to-libm.mlir
    M mlir/test/Dialect/Math/ops.mlir

  Log Message:
  -----------
  [MLIR][Math] Add round operation

Introduce RoundOp in the math dialect. The operation rounds the operand to the
nearest integer value in floating-point format. RoundOp lowers to LLVM
intrinsics 'llvm.intr.round' or as a function call to libm (round or roundf).

Reviewed By: ftynse

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




More information about the All-commits mailing list