[Mlir-commits] [mlir] [mlir][python] remove mixins (PR #68853)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Oct 12 18:28:11 PDT 2023
================
@@ -1,5 +1,50 @@
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
from ._affine_ops_gen import *
+from ._affine_ops_gen import _Dialect
+
+try:
+ from ..ir import *
+ from ._ods_common import (
+ get_op_result_or_value as _get_op_result_or_value,
+ get_op_results_or_values as _get_op_results_or_values,
+ _cext as _ods_cext,
+ )
+except ImportError as e:
+ raise RuntimeError("Error loading imports from extension module") from e
+
+from typing import Optional, Sequence, Union
+
+
+ at _ods_cext.register_operation(_Dialect, replace=True)
----------------
rkayaith wrote:
I suppose one downside of this approach is if you forget the decorator, things would break in non-obvious ways since constructing the op would still work (I don't have any specific concern/request here, just pointing it out)
https://github.com/llvm/llvm-project/pull/68853
More information about the Mlir-commits
mailing list