<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Apr 4, 2018, at 10:09 AM, Anastasia Stulova <<a href="mailto:Anastasia.Stulova@arm.com" class="">Anastasia.Stulova@arm.com</a>> wrote:</div><div class=""><div id="divtagdefaultwrapper" dir="ltr" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">Hi John,</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">The OpenCL C++ patch contains integration with the SPIR-V translation tool. We have restared the discussion about that tool on llvm dev recently:</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><a href="http://lists.llvm.org/pipermail/llvm-dev/2018-March/121794.html" class="OWAAutoLink">http://lists.llvm.org/pipermail/llvm-dev/2018-March/121794.html</a><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">If you look for example in the README file it explain such things as new option -emit-spirv.</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><a href="https://github.com/KhronosGroup/SPIR/commit/0cfb6f7533d42ae3398a8574efd8abbdac88ac44" class="OWAAutoLink">https://github.com/KhronosGroup/SPIR/commit/0cfb6f7533d42ae3398a8574efd8abbdac88ac44</a></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">Also there is support for the SPIR-V friendly format:</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><a href="https://github.com/KhronosGroup/SPIRV-LLVM/blob/khronos/spirv-3.6.1/docs/SPIRVRepresentationInLLVM.rst" class="OWAAutoLink">https://github.com/KhronosGroup/SPIRV-LLVM/blob/khronos/spirv-3.6.1/docs/SPIRVRepresentationInLLVM.rst</a><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">This is mainly located in<span class="Apple-converted-space"> </span><span class="">lib/CodeGen/OclCxxRewrite</span><span class="Apple-converted-space"> </span>directory.</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">Because, we have a separate activity to redesign the integration with SPIRV, we won't be contributing those bits currently. But the plan is to restart the discussion around this at some point hopefully soon.</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">Supporting SPIR-V is essential to us because it gives to many tool vendor a path to use Clang directly from upstream. So we will be working on its integration as well. But for now we would like to start with the generic OpenCL C++ support - Parsing, Sema, basic CodeGen, etc.<br class=""></div></div></div></blockquote><div><br class=""></div>I see. So this is support for the full language, just not SPIR output. That seems totally reasonable to me.</div><div><br class=""></div><div>John.</div><div><br class=""><blockquote type="cite" class=""><div class=""><div id="divtagdefaultwrapper" dir="ltr" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">I hope it clarifies your question.</div><div style="margin-top: 0px; margin-bottom: 0px;" class="">Thanks!<br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">Anastasia<br class=""></div><br class=""><br class=""><div style="" class=""><hr tabindex="-1" style="display: inline-block; width: 1237.734375px;" class=""><div id="divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span><a href="mailto:rjmccall@apple.com" class="">rjmccall@apple.com</a><span class="Apple-converted-space"> </span><<a href="mailto:rjmccall@apple.com" class="">rjmccall@apple.com</a>> on behalf of John McCall <<a href="mailto:rjmccall@apple.com" class="">rjmccall@apple.com</a>><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>28 March 2018 22:25<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Anastasia Stulova<br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span>clang-dev developer list; nd<br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [cfe-dev] A proposal for adding OpenCL C++ support (Spec v2.2)</font><div class=""> </div></div><div class="" style="word-wrap: break-word; line-break: after-white-space;"><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 23, 2018, at 2:30 PM, Anastasia Stulova via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> wrote:</div><div class=""><div id="x_divtagdefaultwrapper" dir="ltr" class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">There were no objections to this so far. I assume it means nobody is opposing this new feature.</div></div></blockquote><div class=""><br class=""></div>I have no objections.</div><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div id="x_divtagdefaultwrapper" dir="ltr" class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;"><div class=""><div dir="ltr" class=""><div id="x_x_divtagdefaultwrapper" dir="ltr" class="" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;"><div class="" style="margin-top: 0px; margin-bottom: 0px;">Just to give a bit more info and a chance for the last feedback. We don't plan to contribute the whole patch but only around 3K lines + tests. The overall changes will be smaller than OpenCL 2.0. And they will mainly affect <span class="">C++ code paths</span><span class="x_Apple-converted-space"> </span>in Sema and CodeGen, but some parsing bits too.</div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">The time frame to start this work will hopefully be the beginning of April.</div></div></div></div></div></div></blockquote><div class=""><br class=""></div>Okay. Can you explain what it means that you won't be contributing the whole patch?</div><div class=""><br class=""></div><div class="">John.</div><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div id="x_divtagdefaultwrapper" dir="ltr" class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;"><div class=""><div dir="ltr" class=""><div id="x_x_divtagdefaultwrapper" dir="ltr" class="" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;"><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">Cheers,</div><div class="" style="margin-top: 0px; margin-bottom: 0px;">Anastasia<br class=""></div><br class=""><div class=""><hr tabindex="-1" class="" style="display: inline-block; width: 1225px;"><div id="x_x_divRplyFwdMsg" dir="ltr" class=""><font class="" face="Calibri, sans-serif" style="font-size: 11pt;"><b class="">From:</b><span class="x_Apple-converted-space"> </span>cfe-dev <<a href="mailto:cfe-dev-bounces@lists.llvm.org" class="">cfe-dev-bounces@lists.llvm.org</a>> on behalf of Anastasia Stulova via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>><br class=""><b class="">Sent:</b><span class="x_Apple-converted-space"> </span>23 February 2018 16:29<br class=""><b class="">To:</b><span class="x_Apple-converted-space"> </span>clang-dev developer list<br class=""><b class="">Cc:</b><span class="x_Apple-converted-space"> </span>nd<br class=""><b class="">Subject:</b><span class="x_Apple-converted-space"> </span>[cfe-dev] A proposal for adding OpenCL C++ support (Spec v2.2)</font><div class=""> </div></div><div dir="ltr" class=""><div id="x_x_x_divtagdefaultwrapper" dir="ltr" class="" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;"><div class="" style="margin-top: 0px; margin-bottom: 0px;">Hello,</div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">A number of developers from the member companies within the Khronos Group are interested to contribute the prototype implementation of OpenCL C++ that is currently located on github and based on version 3.6:</div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><a href="https://github.com/KhronosGroup/SPIR/commit/0cfb6f7533d42ae3398a8574efd8abbdac88ac44" class="x_x_x_OWAAutoLink">https://github.com/KhronosGroup/SPIR/commit/0cfb6f7533d42ae3398a8574efd8abbdac88ac44</a><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">This implementation is compliant to OpenCL v2.2 standard:</div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><a href="https://www.khronos.org/registry/OpenCL/specs/opencl-2.2-cplusplus.pdf" class="x_x_x_OWAAutoLink">https://www.khronos.org/registry/OpenCL/specs/opencl-2.2-cplusplus.pdf</a><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">Similarly to OpenCL C being based on C99, OpenCL C++ support is entirely based on C++14 with a number of extensions (some of which will be shared with OpenCL C) and a few minor restrictions.</div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">The plan would be to take small patches from the github repository and perform any necessary rework and clean up before putting up for review. From the OpenCL side, I don't see any issue with this plan as it doesn't interfere with any current development I am aware of, and also it would be great to progress to the next OpenCL standard. I just want to check if there are any objections from anyone or things we should be aware of before the start. I'm particularly looking for feedback from C++ implementers as there might be some overlap.</div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">Additionally, there are two more related threads, which I plan to discuss separately. There is:</div><div class="" style="margin-top: 0px; margin-bottom: 0px;">(i) standard library support libclcxx:<a href="https://github.com/KhronosGroup/libclcxx." class="x_x_x_OWAAutoLink"><span class="x_Apple-converted-space"> </span>https://github.com/KhronosGroup/libclcxx.</a><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">(ii) and IR generation to SPIRV: <a href="http://lists.llvm.org/pipermail/llvm-dev/2018-February/121317.html" class="x_x_x_OWAAutoLink">http://lists.llvm.org/pipermail/llvm-dev/2018-February/121317.html</a></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">that we would like to provide as well, in order to allow Clang to produce an end binary targeting a wider range of architectures directly (not just AMD GPU).<span class="x_Apple-converted-space"> </span><span class="">We expect that the complete open source solution for OpenCL C++ will increase significantly Clang users and unify our dev</span><span class="">elopment forces i.e. refactoring, bug hunting, etc. The plan would be to do similar for OpenCL C too at a later point of time. </span></div><span class="" style="color: rgb(255, 0, 0);"></span><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">Please, contact me if you have any thoughts or comments.<br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">Cheers,</div><div class="" style="margin-top: 0px; margin-bottom: 0px;">Anastasia<br class=""></div></div></div></div></div></div></div></div><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; float: none; display: inline !important;">_______________________________________________</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; float: none; display: inline !important;">cfe-dev mailing list</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><a href="mailto:cfe-dev@lists.llvm.org" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">cfe-dev@lists.llvm.org</a><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a></div></blockquote></div></div></div></div></div></blockquote></div><br class=""></body></html>