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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Oct 12 18:28:10 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,
----------------
rkayaith wrote:

the `escape` arg is unused now?

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


More information about the Mlir-commits mailing list