[all-commits] [llvm/llvm-project] be9115: [mlir][math] Expand math.round to truncate, compar...
Balaji V. Iyer. via All-commits
all-commits at lists.llvm.org
Thu Apr 13 11:02:41 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: be9115788c7f223dfc6d369455ce84c0e443743b
https://github.com/llvm/llvm-project/commit/be9115788c7f223dfc6d369455ce84c0e443743b
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
M mlir/test/mlir-cpu-runner/test-expand-math-approx.mlir
Log Message:
-----------
[mlir][math] Expand math.round to truncate, compare and increment.
Round functions are pushed directly to libm. This is problematic for
situations where libm is not available. This patch will decompose the
roundf function by adding 0.5 to positive number to input
(subtracting for negative) following by a truncate.
Reviewed By: rsuderman
Differential Revision: https://reviews.llvm.org/D148026
More information about the All-commits
mailing list