[Mlir-commits] [mlir] [MLIR][Transforms] add eliminate-explicit-rounding pass (PR #93443)

Jianhui Li llvmlistbot at llvm.org
Wed Jun 5 00:46:16 PDT 2024


Jianhui-Li wrote:

> > Why Not Modify the Passes Introducing These Ops:

> The promotion passes that introduce these op pairs are quite scattered; some are in the math dialect, while others are in the arith dialect. We cannot be sure if future passes might also introduce similar promotions. Therefore, I believe having a separate, dedicated pass to handle these promotion-generated op pairs uniformly is a more robust and maintainable solution.

Just add one more point, the extf and truncf are not necessary introduced by one pass. For example, there are separate passes between handling bf16 matmul ops and rest ops.   So trying to eliminate the extf/truncf in the same pass which introduces them is limited approach.  Attaching the "fastmath==contract" attributes and using a separate pass is more general. 

https://github.com/llvm/llvm-project/pull/93443


More information about the Mlir-commits mailing list