<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Hi Owen, </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><span class=""><blockquote type="cite"><div><div dir="ltr"><div><span style="font-size:12.8px">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. </span></div></div></div></blockquote><br></span></div><div>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.</div><span class=""><font color="#888888"><div><br></div></font></span></div></blockquote><div>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.</div><div><br></div><div>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?</div><div><br></div><div>Bjarke</div></div></div></div>