<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<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:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div id="divtagdefaultwrapper" dir="ltr" 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;">
<p style="margin-top:0; margin-bottom:0">Hi Nicholas,</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">A number of developers that are interested in the SPIR-V support will be attending the conference. Sounds good to have a round table. It is important to involve relevant developers outside of Khronos that are affected
too!</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">So far there are the following topics to address:</p>
<p style="margin-top:0; margin-bottom:0">- Generation of SPIR-V binaries in LLVM.</p>
<p style="margin-top:0; margin-bottom:0">- Importing and linking SPIR-V libraries/binaries.</p>
<p style="margin-top:0; margin-bottom:0">- Generic target in Clang for the next OpenCL C and C++ features.</p>
<p style="margin-top:0; margin-bottom:0">- Use of external tools.</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">My only concern now is about the OpenCL C++ implementation that might be stalled while we are waiting for the decisions. But it's probably important to make sure we are going the right route to fit all requirements.<br>
</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">Anastasia<br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Nicholas Wilson <iamthewilsonator@hotmail.com><br>
<b>Sent:</b> 17 September 2018 04:42:32<br>
<b>To:</b> Anastasia Stulova<br>
<b>Cc:</b> clang developer list; llvm-dev@lists.llvm.org; nd; Brian.Sumner@amd.com<br>
<b>Subject:</b> Re: [llvm-dev] [RfC] A proposal of adding SPIR-V Toolchain in Clang</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Given the amount of discussion that has gone on (and in past threads) and the size of the proposal, should we do a roundtable at the dev meeting in October to make sure everyone is on the same page going forward? I would come along for
that if there is sufficient participation from Khronos to make good progress.<br>
<br>
Nic<br>
<br>
<br>
> On 10 Sep 2018, at 11:10 pm, Anastasia Stulova via llvm-dev <llvm-dev@lists.llvm.org> wrote:<br>
> <br>
> Hello,<br>
> <br>
> Since 2015 Khronos has switched to the new portable intermediate format SPIR-V, which has replaced the original SPIR. The advantage is that it offers higher portability across different toolchains. There was a talk about it at a Dev Meeting:<br>
> <a href="http://llvm.org/devmtg/2017-03//2017/02/20/accepted-sessions.html#17">
http://llvm.org/devmtg/2017-03//2017/02/20/accepted-sessions.html#17</a><br>
> <br>
> LLVM currently only supports SPIR format for OpenCL in Clang. Several Khronos vendors (ARM, AMD, Intel, Xilinx, Codeplay and others) are interested in adding support for SPIR-V, which should gradually replace the old SPIR once products are no longer shipped
with the old format. Here is the detailed description:<br>
> <a href="https://github.com/KhronosGroup/SPIRV-LLVM-Translator/wiki/SPIRV-Toolchain-for-Clang">
https://github.com/KhronosGroup/SPIRV-LLVM-Translator/wiki/SPIRV-Toolchain-for-Clang</a><br>
> <br>
> To summarize, the idea is to add a SPIR-V target triple to Clang that can be used to generate a SPIR-V binary for OpenCL code. There was a separate thread regarding generation of SPIR-V binary and the community suggested that a translator from LLVM IR to
SPIR-V can be used as an external tool, called llvm-spirv. This can be invoked similar to such tools as ptxas and fatbinary for the CUDA toolchain:<br>
> <a href="http://lists.llvm.org/pipermail/llvm-dev/2018-February/121440.html">http://lists.llvm.org/pipermail/llvm-dev/2018-February/121440.html</a><br>
> <br>
> An example of how Clang can be used to target SPIR-V:<br>
> <br>
> clang -c test.cl -target spirv[32|64]-unknown-unknown -o test.spv<br>
> <br>
> This will result in the following Clang actions:<br>
> <br>
> (1) clang -cc1 -triple spirv[32|64]-unknown-unknown test.cl -emit-llvm-bc -o test.bc<br>
> <br>
> (2) llvm-spirv test.bc -o test.spv<br>
> <br>
> SPIR-V generation is essential for completion of OpenCL C++ support in Clang, as newer OpenCL standards require frontend invocation to be performed offline, producing the SPIR-V binary that can be then loaded at application execution time. Besides that, it
will also allow Clang to be used as a complete standalone tool to generate portable binaries that can then be consumed by different proprietary toolchains. In addition, this will open a path to the LLVM backends for various languages and frontends that already
generate SPIR-V.<br>
> <br>
> A more detailed explanation of the complete design proposal is given in this Wiki page:<br>
> <a href="https://github.com/KhronosGroup/SPIRV-LLVM-Translator/wiki/SPIRV-Toolchain-for-Clang">
https://github.com/KhronosGroup/SPIRV-LLVM-Translator/wiki/SPIRV-Toolchain-for-Clang</a><br>
> <br>
> Looking forward to any feedback about the proposal or possible collaborations,<br>
> <br>
> Thanks!<br>
> <br>
> Anastasia<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>
</div>
</span></font></div>
</div>
</body>
</html>