[PATCH] D147116: [RFC] Introduce convergence control intrinsics

Sameer Sahasrabuddhe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 19 09:35:49 PDT 2023


sameerds added a comment.

In D147116#4431982 <https://reviews.llvm.org/D147116#4431982>, @efriedma wrote:

> Spent a bit more time thinking about this... the whole "explicit convergence" thing is starting to make more sense.  At a conceptual level, I can see why the notion of barriers is sort of incompatible with what you want to do with tokens.  And if you don't have a barrier, then there's nothing actually keeping anything inside the loop, so the notion of an extended loop region is the natural result.
>
> That said, I still think it would be very inconvenient to adapt certain transforms, like unrolling and LSR, to actually handle extended loop regions effectively.  It might make sense to have a utility to transform an extended loop into a plain loop.

Thanks Eli, for all the attention you are giving here! It's really important to see that people are understanding the spec enough to look beyond it at the implications!

About unrolling, please do see D85605 <https://reviews.llvm.org/D85605> for an initial attempt at fixing those passes. It only unrolls in the trivial cases. If a token defined inside a loop is used outside, then there is no attempt at reconstructing the extended region. Instead, we rely on the super-conservative existing behaviour that unrolling is disabled if a token type is used outside the block where it is defined. Clearly, there is a long way to go from there.

Notably, the stack of reviews starting D85603 <https://reviews.llvm.org/D85603> is the original attempt at introducing convergence tokens. The new stack of reviews attempt is mostly a rebase with some simplifications as we discovered them.

Good to know that the rule about nesting convergence regions works out. It is indeed enforced by the verifier in the lambda "checkBundle", where it tracks a stack of "live tokens" and ensures that these intervals are well-nested.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147116/new/

https://reviews.llvm.org/D147116



More information about the llvm-commits mailing list