implement CUDA support in the ELPA EasyBlock & fix CPP configure issue on newer ELPA versions#2898
Conversation
…Config, automatically enable nvidia GPU support
…IA-GPU-compute-capability=VALUE
…ake this neater and read it from the compiler definition from easybuild-framework. Still discussing that on EB slack
…preprocessor environment variable) in a way that can easily be extended or modified per toolchain family
…compute capability has been specified. Also, now check if the cuda_cc is larger or equal to 8.0, since you probably also want to build the 8.0 optimized kernel if you have 8.5 capability in your system
…ssage that is raised
|
Test report by @casparvl Overview of tested easyconfigs (in order)
Build succeeded for 1 out of 1 (1 easyconfigs in total) |
|
Test report by @casparvl Overview of tested easyconfigs (in order)
Build succeeded for 1 out of 1 (1 easyconfigs in total) |
|
Test report by @casparvl Overview of tested easyconfigs (in order)
Build succeeded for 1 out of 1 (1 easyconfigs in total) |
| # ELPA's --with-NVIDIA-GPU-compute-capability only accepts a single architecture | ||
| if len(cuda_cc) != 1: | ||
| raise EasyBuildError('ELPA currently only supports specifying one CUDA architecture when ' | ||
| 'building. You specified cuda-compute-capabilities: %s', cuda_cc) |
There was a problem hiding this comment.
should this be a hard error, or should we pick one (e.g. lowest) and throw a warning? I think that's how this is handled in a few other easyblocks
There was a problem hiding this comment.
I don't think we should assume we know what is best for the user here, so I'd personally prefer an error. That allows the user to pick by simply passing a single compute capability on the command line. If I know that only a single one is supported, I could decide to pick the highest and only run on nodes that support that architecture.
There was a problem hiding this comment.
(or, obviously, I could decide to pick the lowest and be able to run on any GPU node in that system. Just meant to say that both are valid choices :))
There was a problem hiding this comment.
there's something to say about both approaches,
but imho that discussion should not block this PR.
|
Test report by @casparvl Overview of tested easyconfigs (in order)
Build succeeded for 1 out of 1 (1 easyconfigs in total) |
|
Going in, thanks @casparvl! |
This PR does two things:
cppfor GCC and intel based toolchains. For other toolchains, it will raise an error and ask the user to expand the functionality of the EasyBlock, to point to the correct C preprocessor.--enable-nvidia-gpu,--with-cuda-path,--with-cuda-sdk-path,--with-NVIDIA-GPU-compute-capabilityand--enable-nvidia-sm80-gpu.Some comments regarding the last flag: newer versions of ELPA have a dedicated kernel implemented for
sm80. It's a bit strange that--with-NVIDIA-GPU-compute-capability='sm_80'does not seem to properly enable those, but they don't. The config just prints an info-message saying:My understanding is it will build the default kernel with the correct optimization (i.e. using
-arch sm_80), but not use the dedicated code for thesm_80kernel. It will only do the latter if we add--enable-nvidia-sm80-gpu.An EasyConfig using the new cuda support can be found in