This is an archive of the discontinued LLVM Phabricator instance.

[mlir][py] Reuse more of CAPI build time inference.
ClosedPublic

Authored by jpienaar on Jul 22 2023, 8:06 PM.

Details

Summary

This reduces code generated for type inference and instead reuses
facilities CAPI side that performed same role.

Diff Detail

Event Timeline

jpienaar created this revision.Jul 22 2023, 8:06 PM
Herald added a project: Restricted Project. · View Herald Transcript
jpienaar requested review of this revision.Jul 22 2023, 8:06 PM

It's interesting that mlirOperationCreate in the C API is failable: it makes it a discrepancy with the C++ model right?

mlir/lib/Bindings/Python/IRCore.cpp
1483

Can we outline this?

2871

Can you update the kOperationCreateDocstring?

jpienaar updated this revision to Diff 543336.Jul 23 2023, 4:29 PM
jpienaar marked 2 inline comments as done.

Outline result unpacking & update doc string.

jpienaar updated this revision to Diff 543337.Jul 23 2023, 4:31 PM

Update one comment string that got changed.

Also the diff shown is unfortunate as the changes to buildGeneric seems large due to outlining.

It's interesting that mlirOperationCreate in the C API is failable: it makes it a discrepancy with the C++ model right?

I think this only happens in invalid cases and in those cases one is in UB C++ side too (well mostly it crashes). But yes pre-existing difference here.

mehdi_amini accepted this revision.Jul 23 2023, 8:51 PM
This revision is now accepted and ready to land.Jul 23 2023, 8:51 PM

You have things from the subsequent revision to squash here fist

You have things from the subsequent revision to squash here fist

Will fix, thanks

Woops I forgot to submit this