There's currently no way to get accurate cube roots in the math dialect.
powf(x, 1/3.0) is too inaccurate in some cases.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Paths
| Differential D140842
Add a math.cbrt instruction and lowering to libm. ClosedPublic Authored by jreiffers on Jan 2 2023, 6:26 AM.
Details Summary There's currently no way to get accurate cube roots in the math dialect.
Diff Detail
Event Timelinejreiffers retitled this revision from Add a math.cbrt instruction. to Add a math.cbrt instruction and lowering to libm..Jan 2 2023, 6:28 AM This revision is now accepted and ready to land.Jan 2 2023, 11:36 PM Closed by commit rG998a3a38948c: Add a math.cbrt instruction and lowering to libm. (authored by jreiffers). · Explain WhyJan 2 2023, 11:44 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 485924 mlir/include/mlir/Dialect/Math/IR/MathOps.td
mlir/lib/Conversion/MathToLibm/MathToLibm.cpp
mlir/test/Conversion/MathToLibm/convert-to-libm.mlir
mlir/test/Dialect/Math/ops.mlir
|