This is an archive of the discontinued LLVM Phabricator instance.

[mlir][math] Modified the 'math.exp' lowering for higher precision
ClosedPublic

Authored by rsuderman on Jun 22 2023, 3:39 PM.

Details

Summary

The existing lowering has lower precision for certain use cases, e.g.
tanh. Improved version should demonstrate an overall higher level of precision.

Diff Detail

Event Timeline

rsuderman created this revision.Jun 22 2023, 3:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 22 2023, 3:39 PM
rsuderman requested review of this revision.Jun 22 2023, 3:39 PM
jpienaar accepted this revision.Jun 22 2023, 10:23 PM
jpienaar added a subscriber: jpienaar.

Thanks! (well and Emilio for his help here too)

mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp
898

Nit: clampWithNormals to follow naming convention.

900

lowerBound, upperBound

908

selectCmp

935

You can drop getType here (getElementTypeOrSelf has a Value overload)

936

MLIR style is to elide trivial braces

This revision is now accepted and ready to land.Jun 22 2023, 10:23 PM
cota accepted this revision.Jun 23 2023, 7:57 AM