[Mlir-commits] [mlir] [MLIR][GPUToNVVM] support fastMath and other non-supported mathOp (PR #99890)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Jul 23 07:52:36 PDT 2024
================
@@ -90,9 +91,13 @@ struct OpToFuncCallLowering : public ConvertOpToLLVMPattern<SourceOp> {
return LLVM::LLVMFunctionType::get(resultType, operandTypes);
}
- StringRef getFunctionName(Type type) const {
- if (isa<Float32Type>(type))
- return f32Func;
+ StringRef getFunctionName(Type type, arith::FastMathFlags flag) const {
+ if (isa<Float32Type>(type)) {
+ if (arith::FastMathFlags::fast == flag && !f32FastFunc.empty())
----------------
runseny wrote:
Perhaps i get your point, `fast` should also imply `afn`, so `&` is necessary. Modified to `&`, please see : [link](https://github.com/llvm/llvm-project/pull/99890/files#diff-f9d186a175b0bff9446d83449269fefcf90dd8f9171227afa2ee4fbbd7ce2ef6R105)
Related test case please see : [link](https://github.com/llvm/llvm-project/pull/99890/files#diff-8b41948f461ca1b7b892e0ab0488723021ea6b47df5987c6f442669b6b0652d6R264) and [link](https://github.com/llvm/llvm-project/pull/99890/files#diff-8b41948f461ca1b7b892e0ab0488723021ea6b47df5987c6f442669b6b0652d6R910)
please take a look again :)
https://github.com/llvm/llvm-project/pull/99890
More information about the Mlir-commits
mailing list