[Mlir-commits] [mlir] [mlir][python] remove mixins (PR #68853)

Maksim Levental llvmlistbot at llvm.org
Thu Oct 12 20:43:44 PDT 2023


================
@@ -3,4 +3,40 @@
 #  SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
 from ._bufferization_ops_gen import *
+from ._bufferization_ops_gen import _Dialect
 from ._bufferization_enum_gen import *
+
+try:
+    from typing import Sequence, Union
+    from ..ir import *
+    from ._ods_common import get_default_loc_context, _cext as _ods_cext
+
+    from typing import Any, List, Union
+except ImportError as e:
+    raise RuntimeError("Error loading imports from extension module") from e
+
+
+ at _ods_cext.register_operation(_Dialect, replace=True)
+class AllocTensorOp(AllocTensorOp):
+    """Extends the bufferization.alloc_tensor op."""
+
+    def __init__(
+        self,
+        tensor_type: Type,
+        dynamic_sizes: Sequence[Value],
+        copy: Value,
+        size_hint: Value,
+        escape: BoolAttr,
----------------
makslevental wrote:

yup - i checked [BufferizationOps.td](https://github.com/llvm/llvm-project/blob/main/mlir/include/mlir/Dialect/Bufferization/IR/BufferizationOps.td) and it doesn't appear.

https://github.com/llvm/llvm-project/pull/68853


More information about the Mlir-commits mailing list