[Mlir-commits] [mlir] [mlir][affine] allow iter args as valid dims (PR #139069)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri May 9 07:37:52 PDT 2025


asraa wrote:

Hey, HEIR maintainer here - I don't really know whether what we are doing (updating the upper bound using an operand from the iter_args) counts as an "affine" loop. 

In that fastNTT algorithm, all the accessors are affine expressions of the induction var - so by that definition it seems like it might be an affine loop.

But the upper bound's expression uses loop-carried vars as operands and not just induction vars and constants. I don't know whether the loop-carried vars are considered to be regular enough that they can be used as operands to the bound maps.

I was thinking that if this change is valid to make reduce the scope of an affine for loop, I would have to rewrite this at a lower level, which I can do. But I don't know the "right" answer.


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


More information about the Mlir-commits mailing list