[all-commits] [llvm/llvm-project] a13c71: [mlir][transform][bufferization][python] Add mix-i...

Ingo Müller via All-commits all-commits at lists.llvm.org
Wed Jul 26 11:00:26 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a13c715aae10fc548356b6b99075a71409fd14be
      https://github.com/llvm/llvm-project/commit/a13c715aae10fc548356b6b99075a71409fd14be
  Author: Ingo Müller <ingomueller at google.com>
  Date:   2023-07-26 (Wed, 26 Jul 2023)

  Changed paths:
    M mlir/python/CMakeLists.txt
    A mlir/python/mlir/dialects/_bufferization_transform_ops_ext.py
    A mlir/test/python/dialects/transform_bufferization_ext.py
    M utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel

  Log Message:
  -----------
  [mlir][transform][bufferization][python] Add mix-in classes for two ops.

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.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D155799




More information about the All-commits mailing list