This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Tutorial] Add a section to Toy Ch.2 detailing the custom assembly format.
ClosedPublic

Authored by rriddle on Feb 20 2020, 4:56 PM.

Details

Summary

This details the C++ format as well as the new declarative format. This has been one of the major missing pieces from the toy tutorial.

Depends On D74789

Diff Detail

Event Timeline

rriddle created this revision.Feb 20 2020, 4:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 20 2020, 4:56 PM
mehdi_amini accepted this revision.Feb 20 2020, 8:38 PM
mehdi_amini added inline comments.
mlir/docs/Tutorials/Toy/Ch-2.md
671

Why not provide a custom syntax for all of them?

This revision is now accepted and ready to land.Feb 20 2020, 8:38 PM
ftynse added a subscriber: ftynse.Feb 21 2020, 5:09 AM
ftynse added inline comments.
mlir/docs/Tutorials/Toy/Ch-2.md
671

I think it is valuable to demonstrate the C++ way as well. Partly because the declarative format does not (and probably cannot) support all use cases, and partly to showcase the effort that went into building the infrastructure.

Personally, I really dislike the educational materials that don't offer enough explanation on what is going behind the nice and magic-feeling solution.

rriddle updated this revision to Diff 245942.Feb 21 2020, 11:52 AM

Make all ops pretty.

rriddle marked 2 inline comments as done.Feb 21 2020, 1:14 PM
rriddle updated this revision to Diff 245977.Feb 21 2020, 1:20 PM

Add missing mlir:: to Ch.2 doc

This revision was automatically updated to reflect the committed changes.
mehdi_amini added inline comments.Feb 21 2020, 8:28 PM
mlir/docs/Tutorials/Toy/Ch-2.md
671

The C and C++ are shown above? Not sure if we're talking about the same thing, I was referring to the fact that the IR snippet below was a mix of generic printer and custom printer (so some operation were missing their custom printer/parser) and the mix was a bit ugly / confusing to me.