This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Python] Implement pybind adapters for MlirBlock
ClosedPublic

Authored by apaszke on Jul 12 2023, 8:21 AM.

Diff Detail

Event Timeline

apaszke created this revision.Jul 12 2023, 8:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 12 2023, 8:21 AM
apaszke requested review of this revision.Jul 12 2023, 8:21 AM
apaszke retitled this revision from Implement pybind adapters for MlirBlock to [MLIR][Python] Implement pybind adapters for MlirBlock.Jul 12 2023, 8:25 AM

Is there any way to test this?

mlir/include/mlir-c/Bindings/Python/Interop.h
187

Nit: copy-pasta from pass manager.

apaszke updated this revision to Diff 539610.Jul 12 2023, 9:49 AM

Addressed review comments

I have tested this in my code, so I know it works (at least right now). Not sure if you have any tests for the other pybind adapters? All the methods in the Python bindings that take blocks use PyBlock, but that's not going to work for my own plugins that can only depend on the C types.

jpienaar accepted this revision.Jul 12 2023, 11:12 AM

I think mlir/test/python/lib/PythonTestModule.cpp could fit here. If you could create a small test to avoid regressions that would be good

This revision is now accepted and ready to land.Jul 12 2023, 11:12 AM
This revision was landed with ongoing or failed builds.Jul 12 2023, 10:27 PM
This revision was automatically updated to reflect the committed changes.