Added logic to add cuda compute cap. 10.0 when toolchain is 12.9.1 or greater#82
Added logic to add cuda compute cap. 10.0 when toolchain is 12.9.1 or greater#82
Conversation
2023/cc_hooks.py
Outdated
|
|
||
| ccc = build_option('cuda_compute_capabilities') | ||
| # For CUDA and CUDAcore, 12.9 or higher, add cuda compute 10.0 | ||
| if (ec['toolchain'].get('name', '').startswith('CUDA') and ec['toolchain'].get('version', '').startswith(('12.9', '13.'))) or \ |
There was a problem hiding this comment.
faudrait pas aussi inclure les toolchains cuda+mpi ?
There was a problem hiding this comment.
Ils sont automatiquement inclus, puisqu'ils ont une dépendence sur cuda, non ?
Pour la forme, je peux les ajouters explicitement
There was a problem hiding this comment.
ben, dans ma tête en tout cas, ec['toolchain'].get('name', '') ne débute pas avec CUDAsi la toolchain est gompic ou gcccuda
There was a problem hiding this comment.
CUDA ou CUDAcore fera alors partie des builddeps je crois, donc la 2e condition sera vraie.
Je vais le vérifier.
ie
elif ec['toolchain']['name'] == 'gcccorecuda':
builddeps.append(('CUDAcore', '%(cudaver)s'))
|
Tested |
|
à la place d'y aller avec les versions de cuda et de toolchain, on ne pourrait pas faire un appel à |
There was a problem hiding this comment.
Pull request overview
Adds hook logic in the 2023 EasyBuild configuration to automatically extend --cuda-compute-capabilities with compute capability 10.0 when building with CUDA toolchains/dependencies matching CUDA 12.9.x / 13.x.
Changes:
- Import
update_build_optionfromeasybuild.tools.config. - In
parse_hook, detect CUDA 12.9/13 toolchains or CUDA builddeps and append10.0tocuda_compute_capabilities. - Attempt to remove
10.0fromcuda_compute_capabilitieswhen the current easyconfig is not using CUDA 12.9/13.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2023/cc_hooks.py
Outdated
| if (ec['toolchain'].get('name', '').startswith('CUDA') and ec['toolchain'].get('version', '').startswith(('12.9', '13.'))) or \ | ||
| any(dep[0].startswith('CUDA') and dep[1].startswith(('12.9', '13.')) for dep in builddeps): |
There was a problem hiding this comment.
builddeps is sometimes populated in this hook with a literal placeholder version '%(cudaver)s' (see the builddeps.append(('CUDAcore', '%(cudaver)s')) branches above). In those cases, dep[1].startswith(('12.9', '13.')) will never match, so the 10.0 capability won’t be added even when the underlying CUDA version is 12.9.1+. Consider resolving the template value for cudaver (or inspecting the selected CUDA/CUDAcore module version from the toolchain) before making this decision.
| if (ec['toolchain'].get('name', '').startswith('CUDA') and ec['toolchain'].get('version', '').startswith(('12.9', '13.'))) or \ | |
| any(dep[0].startswith('CUDA') and dep[1].startswith(('12.9', '13.')) for dep in builddeps): | |
| cudaver_resolved = ec.get('cudaver') or EASYCONFIG_CONSTANTS.get('cudaver') | |
| cuda_tc_name = ec['toolchain'].get('name', '') | |
| cuda_tc_ver = ec['toolchain'].get('version', '') | |
| if cuda_tc_ver == '%(cudaver)s' and cudaver_resolved: | |
| cuda_tc_ver = str(cudaver_resolved) | |
| def _cuda_dep_is_129_or_newer(dep): | |
| name, ver = dep | |
| if ver == '%(cudaver)s' and cudaver_resolved: | |
| ver = str(cudaver_resolved) | |
| return name.startswith('CUDA') and ver.startswith(('12.9', '13.')) | |
| if (cuda_tc_name.startswith('CUDA') and cuda_tc_ver.startswith(('12.9', '13.'))) or \ | |
| any(_cuda_dep_is_129_or_newer(dep) for dep in (builddeps or [])): |
ça impliquerais de charger le module à ce moment dans le hook, je ne sais pas si c'est possible à cette étape |
|
For 13.2 we'll have to remove cc 7.0 as well. |
We should remove it in general, here: |
|
xref: #86 |
When cuda 12.9.1 is used, add cuda compute capabiliy 10.0 to
--cuda-compute-capabilitiesbuild option.