This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Add basic lowering test to library calls
ClosedPublic

Authored by nicolasvasilache on Jun 24 2021, 12:02 AM.

Details

Summary

This test shows how convert-linalg-to-std rewrites named linalg ops as library calls.
This can be coupled with a C++ shim to connect to existing libraries such as https://gist.github.com/nicolasvasilache/691ef992404c49dc9b5d543c4aa6db38.
Everything can then be linked together with mlir-cpu-runner and MLIR can call C++ (which can itself call MLIR if needed).

This should evolve into specific rewrite patterns that can be applied on op instances independently rather than having to use a full conversion.

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Jun 24 2021, 12:02 AM
gysit accepted this revision.Jun 24 2021, 12:37 AM
This revision is now accepted and ready to land.Jun 24 2021, 12:37 AM