This is an archive of the discontinued LLVM Phabricator instance.

[mlir][transform][bufferization][python] Add mix-in classes for two ops.
ClosedPublic

Authored by ingomueller-net on Jul 20 2023, 1:32 AM.

Details

Summary

This patch adds mix-in classes for the Python bindings of
EmptyTensorToAllocTensorOp and OneShotBufferizeOp. For both classes,
the mix-in add overloads to the __init__ functions that allow to
construct them without providing the return type, which is defaulted to
the only allowed type and AnyOpType, respectively.

Note that the mix-in do not expose the
function_boundary_type_conversion attribute. The attribute has a
custom type from the bufferization dialect that is currently not exposed
in the Python bindings. Handling of that attribute can be added easily
to the mix-in class when the need arises.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2023, 1:32 AM
ingomueller-net requested review of this revision.Jul 20 2023, 1:32 AM
springerm accepted this revision.Jul 20 2023, 1:34 AM
This revision is now accepted and ready to land.Jul 20 2023, 1:34 AM
  • Updating BUILD files. This is best-effort: the Python tests are not exposed through Bazel, so I could only test that the build finishes but not that it produces a working result.