[Mlir-commits] [mlir] [MLIR][Math] Add fine-grained populate-patterns functions for math function rewrites. (PR #126103)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Feb 7 13:34:05 PST 2025
================
@@ -48,6 +48,27 @@ struct MathPolynomialApproximationOptions {
void populatePolynomialApproximateTanhPattern(RewritePatternSet &patterns);
void populatePolynomialApproximateErfPattern(RewritePatternSet &patterns);
+// Adds patterns to convert to f32 around math functions for which `predicate`
+// returns true.
+void populateMathF32ExpansionPatterns(
+ RewritePatternSet &patterns,
+ const std::function<bool(StringRef)> &predicate);
----------------
MaheshRavishankar wrote:
maybe, but I have found it to be a bit too much of a footgun. Id just maybe stick with std::function copy by value.
https://github.com/llvm/llvm-project/pull/126103
More information about the Mlir-commits
mailing list