[llvm-dev] [RFC] Refinement of convergent semantics

Bjarke Roune via llvm-dev llvm-dev at lists.llvm.org
Fri Sep 25 20:24:49 PDT 2015


Hi Owen,

> One approach (Bjarke's idea) to work around such ambiguities is to define:
> a program is convergent-correct if everything marked convergent are indeed
> convergent. Then a transformation is convergent-correct unless it
> transforms a convergent-correct program to a convergent-incorrect one.
> However, defining "convergent-correct" involves SIMT concepts which you
> want to avoid here.
>
>
> There are situations where this is over-conservative as well.  Some
> convergent operations do not require uniformity per se.  For example, a
> gradient operation in graphics programming models requires that all four
> threads in a given quad are either all executing or all not executing,
> though a warp is generally larger than that.  Restricting convergent code
> motion to only be between uniform control flow points in the program would
> penalize that use case.
>
> Sorry to be unresponsive on this; I'm very busy with another matter at the
moment. I should write up what I was thinking of with uniformity, though
for now I'll say that the definition would be flexible in terms of what
threads need to execute with each other. I could see e.g. a uniform-N
property where I think N=4 would fit what you're describing.

I think that a property defined in terms of what transformations are
allowed can be difficult to reason about in the face of not previously
considered transformations. Could there be a property that would serve your
purposes that concerns a program by itself, rather than concerning a
transformation of one program into another?

Bjarke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150925/bde5c904/attachment.html>


More information about the llvm-dev mailing list