-
Notifications
You must be signed in to change notification settings - Fork 305
implement CUDA support in the ELPA EasyBlock & fix CPP configure issue on newer ELPA versions #2898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
smoors
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
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