Skip to content
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

add a CUDA device code sanity check #4692

Draft
wants to merge 1 commit into
base: 5.0.x
Choose a base branch
from

Conversation

jfgrimm
Copy link
Member

@jfgrimm jfgrimm commented Oct 24, 2024

At the moment, we do no checking that the cuda compute capabilities that EasyBuild is configured to use, are actually used in the resultant binaries/libraries

WIP PR to introduce an extra sanity check when CUDA is present to check for mismatches between cuda_compute_capabilities and what cuobjdump reports

@jfgrimm jfgrimm added this to the 5.0 milestone Oct 24, 2024
from easybuild.tools.systemtools import get_shared_lib_ext, pick_system_specific_value, use_group
from easybuild.tools.systemtools import check_linked_shared_libs, det_parallelism, get_cuda_device_code_architectures
from easybuild.tools.systemtools import get_linked_libs_raw, get_shared_lib_ext, pick_system_specific_value, use_group
from easybuild.tools.toolchain.toolchain import TOOLCHAIN_CAPABILITY_CUDA
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'easybuild.tools.toolchain.toolchain.TOOLCHAIN_CAPABILITY_CUDA' imported but unused

@ocaisa
Copy link
Member

ocaisa commented Oct 24, 2024

It's great that you looked into this, we've also been discussing it in EESSI: https://gitlab.com/eessi/support/-/issues/92

@jfgrimm
Copy link
Member Author

jfgrimm commented Oct 24, 2024

@ocaisa thanks for the link, I'll take a look

Currently, main things I still plan to add to this pr:

  • An EB option to toggle whether this is a warning or error (akin to rpath sanity check strictness)
  • whitelisting (e.g. for bundled precompiled stuff)
  • handling software that only allows targeting a single CCC

@ocaisa
Copy link
Member

ocaisa commented Oct 24, 2024

I think it's a good idea to check for device code and ptx (with lack of ptx for the highest compute capability being a warning). The availability of ptx will allow you to run the application on future arch's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants