<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 Nov 18, 2014, at 2:35 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com" class="">chandlerc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Nov 14, 2014 at 1:09 PM, Sahasrabuddhe, Sameer <span dir="ltr" class=""><<a href="mailto:sameer.sahasrabuddhe@amd.com" target="_blank" class="">sameer.sahasrabuddhe@amd.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 id=":3ze" class="a3s" style="overflow:hidden">1. Update the synchronization <span class="il">scope</span> field in <span class="il">atomic</span> instructions from a<span class=""><br class="">
single bit to a wider field, say 32-bit unsigned integer.<br class=""></span></div></blockquote><div class=""><br class=""></div><div class="">I think this should be an arbitrary bit width integer. I think baking any size into this is a mistake unless that size is "1”.</div></div></div></div></div></blockquote><div><br class=""></div>...<br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">If we go with your proposed constraint below, I think it is essential to model single-thread-scope as the maximum integer. It should be a strict subset of all inter-thread scopes.</div></div></div></div></blockquote><div><br class=""></div><div>These seem mutually contradictory.</div><br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":3ze" class="a3s" style="overflow:hidden"><span class=""></span>
5. Possibly add the following constraint on <span class="il">memory</span> <span class="il">scopes</span>: "The <span class="il">scope</span><span class=""><br class="">
represented by a larger value is nested inside (is a proper subset<br class="">
of) the <span class="il">scope</span> represented by a smaller value." This would also imply<br class="">
that the value used for single-thread <span class="il">scope</span> must be the largest<br class="">
value used by the target.<br class="">
This constraint on "nesting" is easily satisfied by HSAIL (and also<br class="">
OpenCL), where synchronization <span class="il">scopes</span> increase from a single<br class="">
work-item to the entire system. But it is conceivable that other<br class="">
targets do not have this constraint. For example, a platform may<br class="">
define synchronization <span class="il">scopes</span> in terms of overlapping sets instead<br class="">
of proper subsets.<br class=""></span></div></blockquote><div class=""><br class=""></div><div class="">I think this is the important thing to settle on in the design. I'd really like to hear from a diverse set of vendors and folks operating in the GPU space to understand whether having this constraint is critically important or problematic for any reasons.</div></div></div></div></blockquote><br class=""></div><div>I am not aware of any systems (including GPUs) that would need non-nested memory scopes. If such exist, I might expect them to be some kind of clustered NUMA HPC machine.</div><div><br class=""></div><div>—Owen</div><div><br class=""></div><br class=""></body></html>