<div dir="ltr">Hi folks,<br><br>The 7th issue of LLVM GPU News, a bi-weekly newsletter on all the GPU things under the LLVM umbrella, is now available at <<a href="https://llvm-gpu-news.github.io/2021/03/05/issue-7.html">https://llvm-gpu-news.github.io/2021/03/05/issue-7.html</a>>.<div><br>I'm also pasting the content below, in case you prefer to read in your email client.<br><div><br>-Jakub<br><br>======================================================================<br><br># LLVM GPU News Issue #7, March 5 2021<br>Authors: Jakub Kuderski, Johannes Doerfert, Lei Zhang</div></div><div><br>Welcome to LLVM GPU News, a bi-weekly newsletter on all the GPU things under the LLVM umbrella.<br>This issue covers the period from February 19 to March 4 2021.<br><br>We welcome your feedback and suggestions. Let us know if we missed anything interesting, or want us to bring attention to your (sub)project, revisions under review, or proposals. Please see the bottom of the page for details on how to submit suggestions and contribute.<br><br><br>## Industry News and Conference Talks<br><br>*  [PyTorch 1.8 was released](<a href="https://pytorch.org/blog/pytorch-1.8-released/">https://pytorch.org/blog/pytorch-1.8-released/</a>) and for the first time includes AMD ROCm support. AMD GPU binaries are available through the [PyTorch installation selector](<a href="https://pytorch.org/get-started/locally/">https://pytorch.org/get-started/locally/</a>), where you can select `ROCm 4.0 (beta)` as the Compute Platform of choice.<br><br>##  LLVM and Clang<br><br>### Discussions<br><br>*  Konrad Trifunovic of Intel [proposes to upstream a SPIR-V backend](<a href="https://lists.llvm.org/pipermail/llvm-dev/2021-March/148905.html">https://lists.llvm.org/pipermail/llvm-dev/2021-March/148905.html</a>) for LLVM. The implementation would be primarily based on GlobalISel and produce the kernel flavor of SPIR-V (for OpenCL), with a future possibility of being extended to the shader flavor (for Vulkan). A long discussion followed the RFC, mostly revolving around the question whether this should be a new LLVM backend, or implemented leveraging MLIR, and how to eventually unify to avoid duplication. The existing SPIR-V support in MLIR targets mostly the shader flavor, with community interests and contributions to grow support for kernel favor too. The big hurdle for reusing the implementation is that it's not currently possible to directly emit MLIR from the LLVM infrastructure and Clang.<br>*  Sebastian Neubauer of AMD described the [current state of register spilling, function calls, and related problems](<a href="https://llvm.discourse.group/t/the-current-state-of-spilling-function-calls-and-related-problems/2863">https://llvm.discourse.group/t/the-current-state-of-spilling-function-calls-and-related-problems/2863</a>) in [SIMT](<a href="https://en.wikipedia.org/wiki/Single_instruction,_multiple_threads">https://en.wikipedia.org/wiki/Single_instruction,_multiple_threads</a>) targets, e.g., AMDGPU. These start with LLVM IR expressing a single execution thread, instead of multiple threads executing the same instructions in lockstep. In Machine IR, multiple execution threads are represented implicitly. This causes issues for operations that involve more than a single vector lane. Sebastian suggests that the long term solution for some of the problems would be tracking the live ranges of VGPR registers of other lanes.<br><br>### Commits<br><br>*  Clang driver for HIP will [detect ROCm installations built by Spack](<a href="https://reviews.llvm.org/D97340">https://reviews.llvm.org/D97340</a>). [Spack is a package manager for supercomputers](<a href="https://spack.io/">https://spack.io/</a>), used in the HPC community.<br>*  Clang options [`-munsafe-fp-atomics`](<a href="https://reviews.llvm.org/D97967">https://reviews.llvm.org/D97967</a>) and [`-mconstructor-aliases`](<a href="https://reviews.llvm.org/D97959">https://reviews.llvm.org/D97959</a>) will be off by default on HIP. They do not work with AMDGPU.<br><br><br>## MLIR<br><br>### Discussions<br><br>### Commits<br><br>*  A few patches landed into the SPIR-V dialect to improve op naming consistency.<br><br><br>## OpenMP (Target Offloading)<br><br>### Discussions<br> <br>*  We are working towards the optimization of "globalized" locals in OpenMP target regions ([D97680](<a href="https://reviews.llvm.org/D97680)">https://reviews.llvm.org/D97680)</a>), this is supposed to get us `-fopenmp-cuda-mode` performance while preserving OpenMP semantics.<br><br>### Commits<br><br>*  The OpenMP subproject is now [clang-formatted](<a href="https://reviews.llvm.org/D97088">https://reviews.llvm.org/D97088</a>).<br>*  Various bugs have been fixed, including but not limited to: <br>   *  [PR49334](<a href="https://llvm.org/PR49334">https://llvm.org/PR49334</a>): [fix](<a href="https://reviews.llvm.org/D97329">https://reviews.llvm.org/D97329</a>),<br>   *  [PR49250](<a href="https://llvm.org/PR49250">https://llvm.org/PR49250</a>): [fix](<a href="https://reviews.llvm.org/D97012">https://reviews.llvm.org/D97012</a>).<br><br><br>## External Compilers<br><br>### LLPC<br><br>### Mesa<br><br>*  lavapipe, a CPU Vulkan implementation, can now [run the `vkcube` sample Vulkan application on Windows](<a href="https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7208#note_808941">https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7208#note_808941</a>).<br><br>### SYCL<br><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div>Jakub Kuderski</div></div></div>