easybuild-easyblocks
easybuild-easyblocks copied to clipboard
Additional options required for Clang and GPU offloading
trafficstars
I just noticied that the JSC easyconfigs set a number of additional options for Clang 9.0.0:
configopts = '-DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_37'
configopts += ' -DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES=35,37'
configopts += ' -DCLANG_DEFAULT_STD_CXX=cxx14'
stage3_configopts = '-DLIBOMPTARGET_NVPTX_ENABLE_BCLIB=1'
stage3_configopts += ' -DLIBOMPTARGET_NVPTX_CUDA_COMPILER=%(builddir)s/llvm.obj.2/bin/clang'
stage3_configopts += ' -DLIBOMPTARGET_NVPTX_BC_LINKER=%(builddir)s/llvm.obj.2//bin/llvm-link'
The OMP related stuff in stage 3 looks like it may have some importance, any more info @damianam ?
That's to enable OpenMP offloading to GPUs. Without it clang will be compiled, but when using OpenMP offload it won't really work. bc files will be missing and therefore clang won't be able to generate code for GPUs. I did that long time ago, I don't remember all the details, but that's the general idea.
Is this still relevant after the recent updates to the Clang easyblock (see #2229 + follow-up PRs)?