[Mlir-commits] [mlir] [mlir][python] python binding for the affine.store op (PR #68816)

Amy Wang llvmlistbot at llvm.org
Wed Oct 11 11:48:09 PDT 2023


================
@@ -0,0 +1,54 @@
+#  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
+
+try:
+    from ..ir import *
+    from ._ods_common import get_op_result_or_value as _get_op_result_or_value
+    from ._ods_common import get_op_results_or_values as _get_op_results_or_values
+except ImportError as e:
+    raise RuntimeError("Error loading imports from extension module") from e
+
+from typing import Optional, Sequence, Union
+
+
+class AffineStoreOp:
+    """Specialization for the Affine store operation."""
+
+    def __init__(
+        self,
+        value: Value,
+        memref: Union[Operation, OpView, Value],
+        map,
+        *,
+        map_operands=[],
----------------
kaitingwang wrote:

Fixed. :)  I still kept 2 commits so the fix for map_operands is squashed into previous review commit.

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


More information about the Mlir-commits mailing list