<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;"><br>
</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;"><font size="2"><span style="font-size:11pt;">> It's important to demonstrate that there is a developer community backing<br>
> the tool and that it won't be abandoned if it is added as an llvm<br>
> sub-project.<br>
> <br>
> -Tom</span></font><br>
</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;"><br>
</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">Just to complete the picture, this is an initiative from within Khronos Group</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">to unify our effort to make this available as an LLVM component. A number of</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">companies have been involved in the original development of this converter and</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">there are more that have adopted this design in their propriety or open source</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">toolchains. Mesa and AMD Vulkan driver (<a href="https://github.com/GPUOpen-Drivers/AMDVLK" class="OWAAutoLink">https://github.com/GPUOpen-Drivers/AMDVLK</a>)</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">are just some examples of the open source ones. There were a number of threads</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">regarding putting this work upstream in the past years. And due to several</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">conceptual differences it, unfortunately, took us a while to get an agreement
<br>
</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">on the best integration approach. During this time a number of forks were created</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">that rebased this work to the top of trunk and also committed several improvements.</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">Some of them are just duplicated in various forks. It would help us if we finally</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">have it integrated with LLVM so we can keep it up to date and contribute common</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">changes. So there are a number of companies that want to contribute to this</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">currently.
</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;"><br>
</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">@Tom, if you have any valuable experience to share with us on how to get this</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">accepted/integrated as a tool, it would be very helpful.</span></font><br>
</p>
<br>
Thanks,<br>
Anastasia<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> llvm-dev <llvm-dev-bounces@lists.llvm.org> on behalf of Pierre Moreau via llvm-dev <llvm-dev@lists.llvm.org><br>
<b>Sent:</b> 21 February 2018 23:34<br>
<b>To:</b> tstellar@redhat.com<br>
<b>Cc:</b> LLVM Developers; Tomeu Vizoso<br>
<b>Subject:</b> Re: [llvm-dev] SPIRV-LLVM as an external tool</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On 2018-02-21 — 14:55, Tom Stellard via llvm-dev wrote:<br>
> On 02/21/2018 12:15 AM, Tomeu Vizoso via llvm-dev wrote:<br>
> > Hi,<br>
> > <br>
> > for a few months already I have been asking around for opinions on how<br>
> > people could best work together on Khronos' SPIR-V <-> LLVM-IR converter<br>
> > and some consensus seems to have formed.<br>
> > <br>
> > Most of the people I talked to favored having the converter become an<br>
> > external tool within the LLVM project, similar to libclc. I think that<br>
> > the LLVM project's processes, infrastructure and community form the best<br>
> > place for this collaboration to happen.<br>
> > <br>
> > I hope that having the converter as part of LLVM can help expand LLVM's<br>
> > value proposition in heterogeneous computing, in part by complementing<br>
> > the OpenCL C backend in clang.<br>
> > <br>
> > Thus I would like to ask what the LLVM community needs to see from us<br>
> > before SPIRV-LLVM can be accepted as an external tool, if at all.<br>
> > <br>
> <br>
> Does the external tool exist already?  I recommend starting by posting<br>
> the code publicly and then ensuring that going forward all development<br>
> and discussions about the tool are happening in a public space.<br>
<br>
The code is publicly available at <a href="https://github.com/pierremoreau/llvm-spirv">
https://github.com/pierremoreau/llvm-spirv</a>.<br>
It is based on <a href="https://github.com/KhronosGroup/SPIRV-LLVM/">https://github.com/KhronosGroup/SPIRV-LLVM/</a> and<br>
<a href="https://github.com/thewilsonator/llvm-target-spirv/">https://github.com/thewilsonator/llvm-target-spirv/</a>, stripped off of everything<br>
not related to SPIR-V and updated to work with llvm HEAD.<br>
(Some of the commits were lost on the way, so we are in the process of redoing<br>
the stripping and updating.)<br>
<br>
One user of that external tool will be Mesa [1] (for its OpenCL implementation<br>
named clover) for<br>
1. enabling clCreateProgramWithIL(KHR)? on AMD cards through clover, by<br>
   translating SPIR-V to LLVM IR; (patches under review [2])<br>
2. allowing additional drivers (nouveau, freedreno, etnativ) to be supported by<br>
   clover, by compiling OpenCL C (via LLVM IR) to SPIR-V (and then translating<br>
   from SPIR-V to NIR).<br>
<br>
Regards,<br>
Pierre<br>
<br>
[1]: <a href="https://www.mesa3d.org/">https://www.mesa3d.org/</a><br>
[2]: <a href="https://patchwork.freedesktop.org/series/38728/">https://patchwork.freedesktop.org/series/38728/</a><br>
<br>
> It's important to demonstrate that there is a developer community backing<br>
> the tool and that it won't be abandoned if it is added as an llvm<br>
> sub-project.<br>
> <br>
> -Tom<br>
> <br>
> > Thanks,<br>
> > <br>
> > Tomeu<br>
> > _______________________________________________<br>
> > LLVM Developers mailing list<br>
> > llvm-dev@lists.llvm.org<br>
> > <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
> <br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> llvm-dev@lists.llvm.org<br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>