[Mlir-commits] [mlir] 7c3dfb2 - [mlir][python] fix memref._is_constant_int_like (#89447)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Apr 19 14:52:07 PDT 2024
Author: Maksim Levental
Date: 2024-04-19T16:52:04-05:00
New Revision: 7c3dfb29dc4b5345da6a7fb25f92bf8d2919bce9
URL: https://github.com/llvm/llvm-project/commit/7c3dfb29dc4b5345da6a7fb25f92bf8d2919bce9
DIFF: https://github.com/llvm/llvm-project/commit/7c3dfb29dc4b5345da6a7fb25f92bf8d2919bce9.diff
LOG: [mlir][python] fix memref._is_constant_int_like (#89447)
Added:
Modified:
mlir/python/mlir/dialects/memref.py
Removed:
################################################################################
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)
)
More information about the Mlir-commits
mailing list