[Mlir-commits] [mlir] [mlir][python] Yield results of `scf.for_` (PR #93610)
Maksim Levental
llvmlistbot at llvm.org
Tue May 28 13:44:54 PDT 2024
================
@@ -132,8 +132,8 @@ def for_(
iter_args = tuple(for_op.inner_iter_args)
with InsertionPoint(for_op.body):
if len(iter_args) > 1:
- yield iv, iter_args
+ yield iv, iter_args, for_op.results
elif len(iter_args) == 1:
- yield iv, iter_args[0]
+ yield iv, iter_args[0], for_op.results
----------------
makslevental wrote:
I've actually never double checked this but I believe for a single iter args, the result my also be "single"? Thus, you can do this
```suggestion
yield iv, iter_args[0], for_op.results[0]
```
https://github.com/llvm/llvm-project/pull/93610
More information about the Mlir-commits
mailing list