Skip to content

Commit

Permalink
Shorten local variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
Caspar van Leeuwen committed Jul 22, 2024
1 parent 13eb8b6 commit 49455ae
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions easybuild/framework/easyconfig/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@
('sysroot', "Location root directory of system, prefix for standard paths like /usr/lib and /usr/include"
"as specify by the --sysroot configuration option"),
('mpi_cmd_prefix', "Prefix command for running MPI programs (with default number of ranks)"),
('cuda_compute_capabilities', "Comma-separated list of CUDA compute capabilities, as specified via "
"--cuda-compute-capabilities configuration option or via cuda_compute_capabilities easyconfig parameter"),
('cuda_cc', "Comma-separated list of CUDA compute capabilities, as specified via "
"--cuda-compute-capabilities configuration option or via cuda_cc easyconfig parameter"),
('cuda_cc_cmake', "List of CUDA compute capabilities suitable for use with $CUDAARCHS in CMake 3.18+"),
('cuda_cc_space_sep', "Space-separated list of CUDA compute capabilities"),
('cuda_cc_space_sep_no_period',
Expand Down Expand Up @@ -365,14 +365,14 @@ def template_constant_dict(config, ignore=None, skip_lower=None, toolchain=None)

# step 6. CUDA compute capabilities
# Use the commandline / easybuild config option if given, else use the value from the EC (as a default)
cuda_compute_capabilities = build_option('cuda_compute_capabilities') or config.get('cuda_compute_capabilities')
if cuda_compute_capabilities:
template_values['cuda_compute_capabilities'] = ','.join(cuda_compute_capabilities)
template_values['cuda_cc_space_sep'] = ' '.join(cuda_compute_capabilities)
template_values['cuda_cc_space_sep_no_period'] = ' '.join(cc.replace('.', '') for cc in cuda_compute_capabilities)
template_values['cuda_cc_semicolon_sep'] = ';'.join(cuda_compute_capabilities)
template_values['cuda_cc_cmake'] = ';'.join(cc.replace('.', '') for cc in cuda_compute_capabilities)
sm_values = ['sm_' + cc.replace('.', '') for cc in cuda_compute_capabilities]
cuda_cc = build_option('cuda_cc') or config.get('cuda_cc')
if cuda_cc:
template_values['cuda_compute_capabilities'] = ','.join(cuda_cc)
template_values['cuda_cc_space_sep'] = ' '.join(cuda_cc)
template_values['cuda_cc_space_sep_no_period'] = ' '.join(cc.replace('.', '') for cc in cuda_cc)
template_values['cuda_cc_semicolon_sep'] = ';'.join(cuda_cc)
template_values['cuda_cc_cmake'] = ';'.join(cc.replace('.', '') for cc in cuda_cc)
sm_values = ['sm_' + cc.replace('.', '') for cc in cuda_cc]
template_values['cuda_sm_comma_sep'] = ','.join(sm_values)
template_values['cuda_sm_space_sep'] = ' '.join(sm_values)

Expand Down

0 comments on commit 49455ae

Please sign in to comment.