[Mlir-commits] [mlir] [MLIR][Linalg] Add aggregate ops decomposition pass and softmax decom… (PR #97582)
Petr Kurapov
llvmlistbot at llvm.org
Thu Jul 25 03:15:00 PDT 2024
kurapov-peter wrote:
> I have been trying to find a way to help land this PR without asking for too much "as a precursor" work
I actually don't mind it as long as we agree on the direction. After revisiting our discussion, @MaheshRavishankar, I think we are talking about a similar end state using different languages. I'll try to confirm it below.
> An op might have multiple ways of decomposition that should be controllable
Agree. This is a more generic description of what I named partial generalization to reach the same end state of the current decomposition. How about we make this the first step? I can start with an rfc to collect the requirements and we can team up on the design/implementation.
> If named ops didnt have (what I consider) an outdated semantics for broadcast handling, then there would be a path where you could just lower to named ops without structurally changing the lowering. That is also another path to make this work. This is also worth doing, but requires a broader agreement on direction.
Right, this is what I referred to as implicit casting. It is less clear to me whether it is a good thing, but again, I am happy to work on it if there's a broad agreement. Here I might be missing something though. I see you both suggesting this would be a solution *and* you disagree and call it an "explicit representation of broadcasting behavior". This looks contradictory to me. Still, I assume we both think of "named ops can accept tensors of different ranks and decomposition does not produce an actual `linalg.broadcast`" as a target state, correct?
> I can see the value in the "named op everything" viewpoint iff it is part of a holistic design supporting configurable specialization and robust generalization.
@stellaraccident, right, the PR is a naive attempt to go there. I assumed that this was an agreed-upon direction.
https://github.com/llvm/llvm-project/pull/97582
More information about the Mlir-commits
mailing list