Skip to content

Add required option to EasyConfig.get_cuda_cc_template_value method #4913

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

Merged

Conversation

Flamefire
Copy link
Contributor

In many places it isn't an error to have no CUDA compute capabilities. Having a parameter to handle this case allows to avoid having to check the EC parameter and the build option in every case causing potential inconsistencies.

With this we can do replacements like:

-        # list of CUDA compute capabilities to use can be specifed in two ways (where (2) overrules (1)):
-        # (1) in the easyconfig file, via the custom cuda_compute_capabilities;
-        # (2) in the EasyBuild configuration, via --cuda-compute-capabilities configuration option;
-        cuda_cc_list = build_option('cuda_compute_capabilities') or self.cfg['cuda_compute_capabilities'] or []
+        cuda_cc_list = self.cfg.get_cuda_cc_template_value("cuda_cc_space_sep", required=False).split()

In many places it isn't an error to have no CUDA compute capabilities.
Having a parameter to handle this case allows to avoid having to check
the EC parameter and the build option in every case causing potential inconsistencies.
@Flamefire Flamefire changed the title Add required argument to get_cuda_cc_template_value Add required argument to get_cuda_cc_template_value Jun 4, 2025
@jfgrimm jfgrimm added this to the next release (5.1.1?) milestone Jun 5, 2025
Copy link
Member

@jfgrimm jfgrimm left a comment

Choose a reason for hiding this comment

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

lgtm

@jfgrimm jfgrimm merged commit 87b3d9d into easybuilders:develop Jun 5, 2025
37 checks passed
@Flamefire Flamefire deleted the get_cuda_cc_template_value-default branch June 5, 2025 12:36
@boegel boegel changed the title Add required argument to get_cuda_cc_template_value Add required argument to EasyConfig.get_cuda_cc_template_value method Jul 4, 2025
@boegel boegel changed the title Add required argument to EasyConfig.get_cuda_cc_template_value method Add required option to EasyConfig.get_cuda_cc_template_value method Jul 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants