[Mlir-commits] [mlir] [mlir][python] fix memref._is_constant_int_like (PR #89447)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Apr 19 13:01:14 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Maksim Levental (makslevental)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/89447.diff
1 Files Affected:
- (modified) mlir/python/mlir/dialects/memref.py (+2-1)
``````````diff
diff --git a/mlir/python/mlir/dialects/memref.py b/mlir/python/mlir/dialects/memref.py
index a3d783415855e1..bc9a3a52728ad4 100644
--- a/mlir/python/mlir/dialects/memref.py
+++ b/mlir/python/mlir/dialects/memref.py
@@ -8,12 +8,13 @@
from ._memref_ops_gen import *
from ._ods_common import _dispatch_mixed_values, MixedValues
from .arith import ConstantOp, _is_integer_like_type
-from ..ir import Value, MemRefType, StridedLayoutAttr, ShapedType
+from ..ir import Value, MemRefType, StridedLayoutAttr, ShapedType, Operation
def _is_constant_int_like(i):
return (
isinstance(i, Value)
+ and isinstance(i.owner, Operation)
and isinstance(i.owner.opview, ConstantOp)
and _is_integer_like_type(i.type)
)
``````````
</details>
https://github.com/llvm/llvm-project/pull/89447
More information about the Mlir-commits
mailing list