<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div class="moz-cite-prefix">On 02/09/2016 08:59 PM, Pete Cooper via
llvm-dev wrote:<br>
</div>
<blockquote
cite="mid:610708AB-92C4-41D4-9260-06EB0A9819B9@apple.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Hi Sean
<div class=""><br class="">
</div>
<div class="">I think you’ve summed it up really well here.</div>
<div class=""><br class="">
</div>
<div class="">Personally I don’t think we should accept backends
for which there is no way to run the code. The burden (however
small) on the community to having an in-tree backend they can’t
use is too high IMO.</div>
<div class=""><br class="">
</div>
<div class="">As you point out ‘no way to run the code’ may mean
not having access to HW, or having HW but no API.</div>
<div class=""><br class="">
</div>
<div class="">NVPTX is a good example. Now you can take the
output from LLVM and run it on HW. It may or may not be how
Nvidia do it in their code, but that doesn’t matter, you can do
it. Same for AMDGPU.</div>
<div class=""><br class="">
</div>
<div class="">So -1 from me to having backends we can’t make use
of.</div>
</blockquote>
For the record, I strongly disagree with this position. I
understand where you're coming from, but I see great value in having
backends publicly available even for hardware we can't directly
run. I do see the support concerns and we need to address them, but
the utter rejection of backends based on the non-runnable nature is
something I strongly disagree with. <br>
<br>
To layout a couple of benefits that no one has mentioned so far:<br>
1) This is a highly visible clue as to what Google is running
internally (admittedly, we don't know for what). Given how
secretive companies tend to be about such things, providing an
incentive (upstreaming) to talk publicly about internal
infrastructure is valuable. I could see that being very useful to
academics evaluating hardware ideas for instance.<br>
2) Just because a backend generates code which isn't "officially"
runnable doesn't mean there aren't people who'd be interested in
using it. For instance, reverse engineering for security analysis,
open source software on otherwise closed hardware, and supporting
legacy products after the manufacture drops support are all
realistic use cases.<br>
3) By getting more people involved in the open source project, we
have an opportunity to further infect people inside companies with
the desire to be good citizens in the community. :) That could be
a very positive thing for all of us and the project as a whole in
the long run. <br>
<blockquote
cite="mid:610708AB-92C4-41D4-9260-06EB0A9819B9@apple.com"
type="cite">
<div class=""><br class="">
</div>
<div class="">Finally, one option is to have perpetually
experimental backends. Then all the code is in tree but no-one
in tree should ever be expected to update it. That does have
the big advantage that all of the code is there to discuss and
the maintainers can make contributions to common code and
gain/provide help in the community. They can also be involved
in discussions which impact them such as changes to common code.</div>
<div class=""><br class="">
</div>
<div class="">Cheers,</div>
<div class="">Pete<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Feb 9, 2016, at 4:18 PM, Sean Silva via
llvm-dev <<a moz-do-not-send="true"
href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing:
0px; -webkit-text-stroke-width: 0px;" class="">One data
point (IIRC) is that the NVPTX backend sat in tree for a
long time without a way to actually use them. But lately
this has been opening up (e.g. <a moz-do-not-send="true"
href="http://llvm.org/docs/CompileCudaWithLLVM.html"
class="">http://llvm.org/docs/CompileCudaWithLLVM.html</a>).
However, the obstacle for NVPTX was mostly a software
proprietary-ness (no way to plug it into the driver
stack really, except via nvidia's own proprietary
software), whereas the actual hardware was available.
For the Lanai stuff, it seems like the hardware is
fundamentally not available for purchase.</div>
<div style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing:
0px; -webkit-text-stroke-width: 0px;" class=""><br
class="">
</div>
<div style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing:
0px; -webkit-text-stroke-width: 0px;" class="">The
reverse situation is with e.g. Apple's GPU backends,
where the devices are readily available, but (AFAIK)
even if the backend were open-source you couldn't run
the code produced by the open-source compiler.</div>
<div style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing:
0px; -webkit-text-stroke-width: 0px;" class=""><br
class="">
</div>
<div style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing:
0px; -webkit-text-stroke-width: 0px;" class="">Or to put
it in matrix form (this is all heavily prefixed by
"AFAIK"; corrections welcome):</div>
<div style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing:
0px; -webkit-text-stroke-width: 0px;" class=""><br
class="">
</div>
<div style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing:
0px; -webkit-text-stroke-width: 0px;" class=""><font
class="" face="monospace, monospace">AMDGPU:
InTree:Yes DevicesAvailable:Yes CanIRunTheCode:Yes</font></div>
<div style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing:
0px; -webkit-text-stroke-width: 0px;" class=""><font
class="" face="monospace, monospace">NVPTX:
InTree:Yes DevicesAvailable:Yes </font><span
style="font-family: monospace, monospace;" class="">CanIRunTheCode</span><font
class="" face="monospace, monospace">:Yes</font></div>
<div style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing:
0px; -webkit-text-stroke-width: 0px;" class=""><font
class="" face="monospace, monospace">Lanai:
InTree:? DevicesAvailable:No </font><span
style="font-family: monospace, monospace;" class="">CanIRunTheCode</span><font
class="" face="monospace, monospace">:No</font></div>
<div style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing:
0px; -webkit-text-stroke-width: 0px;" class=""><font
class="" face="monospace, monospace">Apple GPU's:
InTree:No DevicesAvailable:Yes </font><span
style="font-family: monospace, monospace;" class="">CanIRunTheCode</span><font
class="" face="monospace, monospace">:No</font></div>
<div style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing:
0px; -webkit-text-stroke-width: 0px;" class=""> </div>
<div style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing:
0px; -webkit-text-stroke-width: 0px;" class="">I
couldn't come up with a good name for "Can I Run The
Code" column. Basically it means: "assuming the backend
were in open source, could I actually run the code
produced by the open source backend somehow?".</div>
<div style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing:
0px; -webkit-text-stroke-width: 0px;" class=""><br
class="">
</div>
<div style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing:
0px; -webkit-text-stroke-width: 0px;" class="">I had a
quick look at lib/Target and it seems like every backend
we have has "CanIRunTheCode:Yes" in theory.</div>
<div style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing:
0px; -webkit-text-stroke-width: 0px;" class="">IIRC,
the NVPTX stuff used to actually be "No" though?</div>
<div style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing:
0px; -webkit-text-stroke-width: 0px;" class=""><br
class="">
</div>
<div style="font-family: Helvetica; font-size: 12px;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform:
none; white-space: normal; widows: auto; word-spacing:
0px; -webkit-text-stroke-width: 0px;" class="">Anyway,
just a random thought. Not sure what the conclusion is.</div>
</div>
</blockquote>
</div>
<br class="">
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>