This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vector] add support for printing f16 and bf16
ClosedPublic

Authored by aartbik on Mar 2 2023, 5:38 PM.

Details

Summary

Love or hate it, but the vector.print operation was the very
first operation that actually made "end-to-end" CHECK integration
testing possible for MLIR. This revision adds support for
the -until recently- less common but important floating-point
types f16 and bf16.

This will become useful for accelerator specific testing (e.g. NVidia GPUs)

Diff Detail

Event Timeline

aartbik created this revision.Mar 2 2023, 5:38 PM
Herald added a project: Restricted Project. · View Herald Transcript
aartbik requested review of this revision.Mar 2 2023, 5:38 PM
aartbik edited the summary of this revision. (Show Details)Mar 2 2023, 5:39 PM
aartbik added a reviewer: christopherbate.
wrengr accepted this revision.Mar 2 2023, 6:06 PM
wrengr added inline comments.
mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
1478

I know you're just repeating the pattern used for the other cases, but I think it'd be cleaner to save this in a local variable before entering the conditional

This revision is now accepted and ready to land.Mar 2 2023, 6:06 PM
aartbik marked an inline comment as done.Mar 2 2023, 8:16 PM
aartbik added inline comments.
mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
1478

fair enough, let me make the change for all cases

aartbik updated this revision to Diff 502045.Mar 2 2023, 8:30 PM
aartbik marked an inline comment as done.

Addressed Wren's feedback

This revision was automatically updated to reflect the committed changes.