This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Math] Support fold SqrtOp with constant dense.
ClosedPublic

Authored by jacquesguan on Jul 10 2022, 8:07 PM.

Details

Summary

This patch uses constFoldUnaryOpConditional to replace current folder in order to support constant dense.

Diff Detail

Event Timeline

jacquesguan created this revision.Jul 10 2022, 8:07 PM
jacquesguan requested review of this revision.Jul 10 2022, 8:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2022, 8:07 PM
rriddle accepted this revision.Jul 12 2022, 12:33 AM
rriddle added inline comments.
mlir/lib/Dialect/Math/IR/MathOps.cpp
129–138

Can this be a switch instead?

This revision is now accepted and ready to land.Jul 12 2022, 12:33 AM

Address comment.

jacquesguan added inline comments.Jul 12 2022, 1:40 AM
mlir/lib/Dialect/Math/IR/MathOps.cpp
129–138

Done.

This revision was landed with ongoing or failed builds.Jul 12 2022, 1:46 AM
This revision was automatically updated to reflect the committed changes.