[Mlir-commits] [mlir] [MLIR][Math] add canonicalize-f32-promotion pass (PR #92482)

Ivy Zhang llvmlistbot at llvm.org
Wed May 22 01:52:44 PDT 2024


crazydemo wrote:

BTW, I think we could have different conversion target for `bf16` and `fp16`. Like `arith::AddFOp, arith::SubFOp, arith::MulFOp, arith::DivFOp, math::AbsFOp, math::CeilOp, math::FloorOp, math::RoundOp, math::SqrtOp, math::RsqrtOp, math::Exp2Op`, these ops should be legalized to `f32` when their `original data type is bf16`, while they will not need to be legalized when their original datatype is `fp16` and is compiled on machine with `fp16 instruction` support. What's your opinion on this? Maybe I can open another PR to discuss this issue. @krzysz00

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


More information about the Mlir-commits mailing list