[Mlir-commits] [mlir] [MLIR][ROCDL] Refactor conversion of math operations to ROCDL calls to a separate pass (PR #98653)
Krzysztof Drewniak
llvmlistbot at llvm.org
Fri Jul 12 09:42:25 PDT 2024
================
@@ -733,6 +733,24 @@ def ConvertMathToLLVMPass : Pass<"convert-math-to-llvm"> {
];
}
+//===----------------------------------------------------------------------===//
+// MathToLibm
+//===----------------------------------------------------------------------===//
+
+def ConvertMathToROCDL : Pass<"convert-math-to-rocdl", "ModuleOp"> {
+ let summary = "Convert Math dialect to ROCDL library calls";
+ let description = [{
+ This pass converts supported Math ops to ROCDL library calls.
+ }];
+ let dependentDialects = [
+ "arith::ArithDialect",
+ "func::FuncDialect",
+ "math::MathDialect",
----------------
krzysz00 wrote:
You don't need to depend on `math` if there are cases where you create a `math` op without there being one in the input.
(The point of the dependencies field is to let you access stuff from dialects that wouldn't "naturally" be loaded)
https://github.com/llvm/llvm-project/pull/98653
More information about the Mlir-commits
mailing list