[Mlir-commits] [mlir] [mlir][affine]introduce AffineSymbol trait and use it for using gpu.threadid op in the inner loops. (PR #118478)
lonely eagle
llvmlistbot at llvm.org
Sun Jan 12 01:21:54 PST 2025
linuxlonelyeagle wrote:
> > I designed AffineSymbol at the beginning by referring to constant's properties for design.
> > 1.The ops should be pure.
>
> But `gpu.thread_id` not pure! It's not marked so.
>
> > 2.Yes.
> > 3.Yes.
>
> Why can't an `AffineSymbol` trait op as proposed here be allowed to have operands which are also in turn valid affine symbols? Can we generalize/extend this?
>
> If "zero operand" is a hard implied property, the trait verifier should be checking for it, but it isn't in the PR.
You are right, pure and no side effects should be correct.
https://github.com/llvm/llvm-project/pull/118478
More information about the Mlir-commits
mailing list