Add math.erf lowering to libm call.
Add math.erf polynomial approximation.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM. Probably wait for another pair of eyes to LGTM it. @ezhulenev perhaps?
mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp | ||
---|---|---|
507 | nit: can you mention the source of the approximation? | |
mlir/test/Analysis/test-shape-fn-report.mlir | ||
15 | nit: I wouldn't add this test in this patch (it's redundant with the tanh one) |
mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp | ||
---|---|---|
188 | Maybe pass ArrayRef<Value> instead of a pair of iterators and a template parameter? Both call sites seems to pass values. |
Remove math.erf test from test-shape-fn-report.mlir.
Update math.erf polynomial approximation description.
Use ArrayRef in makePolynomialCalculation.
mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp | ||
---|---|---|
507 | I used Boost's minimax tool that utilizes the Remez method to find the constants. I will update the comment with the info. |
Maybe pass ArrayRef<Value> instead of a pair of iterators and a template parameter? Both call sites seems to pass values.