This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vector] Add constant folding for fp16 to fp32 bitcast
ClosedPublic

Authored by antiagainst on Feb 4 2021, 8:00 AM.

Diff Detail

Event Timeline

antiagainst created this revision.Feb 4 2021, 8:00 AM
antiagainst requested review of this revision.Feb 4 2021, 8:00 AM
ThomasRaoux added inline comments.Feb 4 2021, 8:25 AM
mlir/lib/Dialect/Vector/VectorOps.cpp
2826

I believe passing the value as float can be risky as Nan encoding can be changed. I'm not positive this is a problem here but it might be better to create an APFloat directly from bits?

Address comments

mlir/lib/Dialect/Vector/VectorOps.cpp
2826

Good point! Changed to directly use APFloat.

ThomasRaoux accepted this revision.Feb 4 2021, 5:56 PM
This revision is now accepted and ready to land.Feb 4 2021, 5:56 PM
This revision was landed with ongoing or failed builds.Feb 5 2021, 6:16 AM
This revision was automatically updated to reflect the committed changes.