From 3d51b40c4a4855a36a503d269c6c484404652949 Mon Sep 17 00:00:00 2001 From: Jevin Jiang Date: Thu, 21 Sep 2023 08:06:44 +0000 Subject: [PATCH] Fix induction variable type in scf.for py binding. - make sure that the type of induction variable should be determined by the type of the lower bound type. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D159534 --- mlir/python/mlir/dialects/_scf_ops_ext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/python/mlir/dialects/_scf_ops_ext.py b/mlir/python/mlir/dialects/_scf_ops_ext.py index 4b2519ef3535..4b0a31327abb 100644 --- a/mlir/python/mlir/dialects/_scf_ops_ext.py +++ b/mlir/python/mlir/dialects/_scf_ops_ext.py @@ -52,7 +52,7 @@ class ForOp: ip=ip, ) ) - self.regions[0].blocks.append(IndexType.get(), *results) + self.regions[0].blocks.append(self.operands[0].type, *results) @property def body(self):