easybuild-easyblocks icon indicating copy to clipboard operation
easybuild-easyblocks copied to clipboard

Additional options required for Clang and GPU offloading

Open ocaisa opened this issue 5 years ago • 2 comments
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 ?

ocaisa avatar Mar 13 '20 08:03 ocaisa

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.

damianam avatar Mar 13 '20 09:03 damianam

Is this still relevant after the recent updates to the Clang easyblock (see #2229 + follow-up PRs)?

boegel avatar Nov 19 '21 22:11 boegel