<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 Feb 9, 2016, at 9:15 PM, Hal Finkel <<a href="mailto:hfinkel@anl.gov" class="">hfinkel@anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span 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; float: none; display: inline !important;" class="">----- Original Message -----</span><br 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=""><blockquote type="cite" 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="">From: "Pete Cooper via llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>><br class="">To: "Sean Silva" <<a href="mailto:chisophugis@gmail.com" class="">chisophugis@gmail.com</a>><br class="">Cc: "llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>><br class="">Sent: Tuesday, February 9, 2016 10:59:58 PM<br class="">Subject: Re: [llvm-dev] [RFC] Lanai backend<br class=""><br class=""><br class="">Hi Sean<br class=""><br class=""><br class="">I think you’ve summed it up really well here.<br class=""><br class=""><br class="">Personally I don’t think we should accept backends for which there is<br class="">no way to run the code. The burden (however small) on the community<br class="">to having an in-tree backend they can’t use is too high IMO.<br class=""><br class=""><br class="">As you point out ‘no way to run the code’ may mean not having access<br class="">to HW, or having HW but no API.<br class=""><br class=""></blockquote><br 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=""><span 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; float: none; display: inline !important;" class="">Out of curiosity, would the existence of some kind of open-source emulator affect your opinion on this? Or does it need to be actual hardware?</span><br 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></blockquote>I guess hardware isn’t even the correct term given we have BPF which I think is a virtual ISA of some kind.</div><div><br class=""></div><div>I’d be ok with targeting an emulator, but with the caveat that people are actually using the emulator. An emulator which exists purely to get this backend in to LLVM isn’t useful, but one which people do use for education or otherwise is useful. But it really should have users outside of just the people who have access to the real HW.</div><div><br class=""></div><div>Perhaps this can be an experimental backend to give time for an emulator and community to grow around it, and then we can decide later whether to promote to a first class backend? Then we still have options, including just continuing as an experimental backend for longer if thats best.</div><div><br class=""></div><div>As a small digression, I would say that this has raised a very valid discussion about the code that ends up in LLVM and is built as standard. I don’t know, nor am I going to look, but I think the same could (should?) be applied to other code like passes. If a pass isn’t used by anyone in tree then should it be in tree?</div><div><br class=""></div><div>Pete<br class=""><blockquote type="cite" class=""><div class=""><br 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=""><span 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; float: none; display: inline !important;" class="">-Hal<span class="Apple-converted-space"> </span></span><br 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 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=""><blockquote type="cite" 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="">NVPTX is a good example. Now you can take the output from LLVM and<br class="">run it on HW. It may or may not be how Nvidia do it in their code,<br class="">but that doesn’t matter, you can do it. Same for AMDGPU.<br class=""><br class=""><br class="">So -1 from me to having backends we can’t make use of.<br class=""><br class=""><br class="">Finally, one option is to have perpetually experimental backends.<br class="">Then all the code is in tree but no-one in tree should ever be<br class="">expected to update it. That does have the big advantage that all of<br class="">the code is there to discuss and the maintainers can make<br class="">contributions to common code and gain/provide help in the community.<br class="">They can also be involved in discussions which impact them such as<br class="">changes to common code.<br class=""><br class=""><br class="">Cheers,<br class="">Pete<br class=""><br class=""><br class=""><br class=""><br class="">On Feb 9, 2016, at 4:18 PM, Sean Silva via llvm-dev <<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a> > wrote:<br class=""><br class=""><br class="">One data point (IIRC) is that the NVPTX backend sat in tree for a<br class="">long time without a way to actually use them. But lately this has<br class="">been opening up (e.g. <a href="http://llvm.org/docs/CompileCudaWithLLVM.html" class="">http://llvm.org/docs/CompileCudaWithLLVM.html</a><br class="">). However, the obstacle for NVPTX was mostly a software<br class="">proprietary-ness (no way to plug it into the driver stack really,<br class="">except via nvidia's own proprietary software), whereas the actual<br class="">hardware was available. For the Lanai stuff, it seems like the<br class="">hardware is fundamentally not available for purchase.<br class=""><br class=""><br class="">The reverse situation is with e.g. Apple's GPU backends, where the<br class="">devices are readily available, but (AFAIK) even if the backend were<br class="">open-source you couldn't run the code produced by the open-source<br class="">compiler.<br class=""><br class=""><br class="">Or to put it in matrix form (this is all heavily prefixed by "AFAIK";<br class="">corrections welcome):<br class=""><br class=""><br class="">AMDGPU: InTree:Yes DevicesAvailable:Yes CanIRunTheCode:Yes<br class="">NVPTX: InTree:Yes DevicesAvailable:Yes CanIRunTheCode :Yes<br class="">Lanai: InTree:? DevicesAvailable:No CanIRunTheCode :No<br class="">Apple GPU's: InTree:No DevicesAvailable:Yes CanIRunTheCode :No<br class=""><br class="">I couldn't come up with a good name for "Can I Run The Code" column.<br class="">Basically it means: "assuming the backend were in open source, could<br class="">I actually run the code produced by the open source backend<br class="">somehow?".<br class=""><br class=""><br class="">I had a quick look at lib/Target and it seems like every backend we<br class="">have has "CanIRunTheCode:Yes" in theory.<br class="">IIRC, the NVPTX stuff used to actually be "No" though?<br class=""><br class=""><br class="">Anyway, just a random thought. Not sure what the conclusion is.<br class=""><br class="">_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class=""><br class=""></blockquote><br 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=""><span 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; float: none; display: inline !important;" class="">--<span class="Apple-converted-space"> </span></span><br 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=""><span 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; float: none; display: inline !important;" class="">Hal Finkel</span><br 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=""><span 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; float: none; display: inline !important;" class="">Assistant Computational Scientist</span><br 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=""><span 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; float: none; display: inline !important;" class="">Leadership Computing Facility</span><br 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=""><span 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; float: none; display: inline !important;" class="">Argonne National Laboratory</span></div></blockquote></div><br class=""></body></html>