This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Enable converting properties during C create
ClosedPublic

Authored by jpienaar on Jul 23 2023, 7:31 PM.

Details

Summary

This enables querying properties passed as attributes during
construction time. In particular needed for type inference where the
Operation has not been created at this point. This allows Python
construction of operations whose type inference depends on properties.

Depends on D156041

Diff Detail

Event Timeline

jpienaar created this revision.Jul 23 2023, 7:31 PM
Herald added a project: Restricted Project. · View Herald Transcript
jpienaar requested review of this revision.Jul 23 2023, 7:31 PM
mehdi_amini added inline comments.Jul 23 2023, 8:54 PM
mlir/include/mlir/IR/OperationSupport.h
986

If you can, push this as a separate commit, seems unrelated to me and it's the only change in this file.

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

Seems weird to me?

mlir/lib/Bindings/Python/IRModule.h
659

Squash in parent?

mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
933

Squash in parent

jpienaar updated this revision to Diff 543363.Jul 23 2023, 9:07 PM
jpienaar marked an inline comment as done.

Move changes to parent

mehdi_amini accepted this revision.Jul 23 2023, 9:17 PM
mehdi_amini added inline comments.
mlir/lib/CAPI/IR/IR.cpp
369

Could add !attributes.empty() as well here

This revision is now accepted and ready to land.Jul 23 2023, 9:17 PM
jpienaar updated this revision to Diff 543367.Jul 23 2023, 9:36 PM

Add check & clang-format

This revision was landed with ongoing or failed builds.Jul 23 2023, 9:40 PM
This revision was automatically updated to reflect the committed changes.