Talk:Building LLVM/Clang with OpenMP Offloading to NVIDIA GPUs

From HPC Wiki
Revision as of 10:45, 5 May 2020 by Jonas-hahnfeld-98c9@rwth-aachen.de (talk | contribs) (Created page with "@User:Xin-wu-0e5c@uni-paderborn.de Your changes end of March basically rewrote all of this article. This was a bit hard to detect because you commented out the old text, n...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

@User:Xin-wu-0e5c@uni-paderborn.de Your changes end of March basically rewrote all of this article. This was a bit hard to detect because you commented out the old text, not removed it (we now clarified this in How-to-Contribute).

Regarding the content I think the new article leaves out a few important points (why did you rewrite it completely?):

  1. My section "Determine GPU Architectures" was meant to find out which architectures to build for. The new article just builds all architectures (see LIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES) which is overkill and unlikely to provide a benefit for HPC systems. In my experience clusters contain at most two GPU architectures. Furthermore there's no discussion about the effect of CLANG_OPENMP_NVPTX_DEFAULT_ARCH.
  2. You removed the section about Prerequisites. This might be a good idea with respect to the compiler and CMake (which changed since 7.0), but we should actually discuss libelf and CUDA. These are not mentioned in the general CMake guide because they are dependencies of the OpenMP runtime. If not present, building will continue without error but the resulting installation will not be able to offload to GPUs.
  3. The rest of the guide downloads an archive of the complete LLVM repo and uses the "new" monorepo layout for building. This probably works, but I think the official tarballs from https://releases.llvm.org/download.html#10.0.0 (even though they link to GitHub) should be used instead. Furthermore there's very little reasoning about the bootstrapping process and no explanation that the second command should use the Clang compiler built previously. If just pasting the command (which also misses CMAKE_INSTALL_PREFIX), cmake will not find "clang" and "clang++" unless you add them to $PATH.