<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 21, 2016, at 8:51 PM, Sameer Sahasrabuddhe <<a href="mailto:sameer@sbuddhe.net" class="">sameer@sbuddhe.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Sun, Aug 21, 2016 at 11:49 PM, Mehdi Amini <span dir="ltr" class=""><<a href="mailto:mehdi.amini@apple.com" target="_blank" class="">mehdi.amini@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><span class=""><blockquote type="cite" class=""><div class="">On Aug 21, 2016, at 11:14 AM, Philip Reames <<a href="mailto:listmail@philipreames.com" target="_blank" class="">listmail@philipreames.com</a>> wrote:</div><br class=""><div class="">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000" class="">Given my current time commitments, having me on the critical path
    for any proposal is not a good idea.  I'm willing to step aside here
    as long as the proposal is well reviewed by someone who's familiar
    with the memory model.  Hal, Sanjoy, JF, Chandler, and Danny would
    all be reasonable alternates.  </div></div></blockquote><div class=""><br class=""></div></span><span class=""><div class="">OK, good to know. I put you on the path because you wrote:</div><div class=""><br class=""></div><div class="">"I am opposed to extending the instructions without a strong motivating case.  I don't care anywhere near as much about metadata based schemes, but extending the instruction semantics imposes a much larger burden on the rest of the community.  That burden has to be well justified and supported."</div><div class=""><br class=""></div></span><div class="">It is not clear to me right now if the "use case" makes it "well justified" or not (an alternative being using intrinsic for OpenCL as Justin Lebar mentioned). I don’t feel I can answer this, so adding CC Chandler and Sanjoy to begin with.<br class=""></div></div></div></blockquote></div><br class=""></div><div class="gmail_extra">One yardstick to determine if this is "well justified" is to ask if any LLVM backend has an undefined behaviour similar to OpenCL if the scope metadata is dropped. For every LLVM target X which can be potentially targetted from OpenCL, if the metadata is dropped (in one module but not another), does the memory model for X still produce behaviour that is compatible with the behaviour intended by the original program? If that question cannot be answered satisfactorily for all cases, then metadata is not a reliable way to move forward.<br class=""><br class=""></div><div class="gmail_extra">To put it differently, when viewed as an "OpenCL implementation", can every LLVM backend guarantee that when OpenCL scopes are lowered to metadata, the synchronisation specified in the original program is preserved?<br class=""></div></div></div></blockquote><div><br class=""></div><div>This does not address why you can’t use intrinsics (like the CUDA implementation does apparently).</div><div><br class=""></div><div>— </div><div>Mehdi</div><div><br class=""></div></div></body></html>