This is an archive of the discontinued LLVM Phabricator instance.

[mlir][python] Add facility for extending generated python ODS.
ClosedPublic

Authored by stellaraccident on Jan 14 2021, 10:59 PM.

Details

Summary
  • This isn't exclusive with other mechanisms for more ODS centric op definitions, but based on discussions, we feel that we will always benefit from a python escape hatch, and that is the most natural way to write things that don't fit the mold.
  • I suspect this facility needs further tweaking, and once it settles, I'll document it and add more tests.
  • Added extensions for linalg, since it is unusable without them and continued to evolve my e2e example.

Diff Detail

Event Timeline

stellaraccident requested review of this revision.Jan 14 2021, 10:59 PM
ftynse accepted this revision.Jan 19 2021, 1:50 AM
ftynse added inline comments.
mlir/lib/Bindings/Python/mlir/dialects/_linalg.py
23–24

Isn't there a trait? Not sure how to expose traits to Python though

This revision is now accepted and ready to land.Jan 19 2021, 1:50 AM
mlir/lib/Bindings/Python/mlir/dialects/_linalg.py
23–24

I'm sure there is a way. I'm using TODOs guide the next step work on these things to keep them more bite-sized.

This revision was landed with ongoing or failed builds.Jan 19 2021, 1:20 PM
This revision was automatically updated to reflect the committed changes.