Skip to content

Build CUDA-Samples-12.1 for supported combinations of CPU and CUDA compute capability 70 #1083

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ easyconfigs:
accept-eula-for: CUDA
# see https://github.com/easybuilders/easybuild-easyblocks/pull/3516
include-easyblocks-from-commit: 3469151ce7e4f85415c877dee555aeea7691c757
# - CUDA-Samples-12.1-GCC-12.3.0-CUDA-12.1.1.eb
- CUDA-Samples-12.1-GCC-12.3.0-CUDA-12.1.1.eb
- UCX-CUDA-1.14.1-GCCcore-12.3.0-CUDA-12.1.1.eb
- UCC-CUDA-1.2.0-GCCcore-12.3.0-CUDA-12.1.1.eb
- OSU-Micro-Benchmarks-7.2-gompi-2023a-CUDA-12.1.1.eb
Expand Down
20 changes: 20 additions & 0 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,25 @@ def pre_configure_hook_BLIS_a64fx(self, *args, **kwargs):
raise EasyBuildError("BLIS-specific hook triggered for non-BLIS easyconfig?!")


def pre_configure_hook_CUDA_Samples_test_remove(self, *args, **kwargs):
"""skip immaTensorCoreGemm in CUDA-Samples for compute capability 7.0."""
if self.name == 'CUDA-Samples' and self.version in ['12.1']:
# Get compute capability from build option
cuda_caps = build_option('cuda_compute_capabilities')
# Check if compute capability 7.0 is in the list
if cuda_caps and '7.0' in cuda_caps:
print_msg("Applying hook for CUDA-Samples %s with compute capability 7.0", self.version)
# local_filters is set by the easyblock, remove path to the Makefile instead
makefile_path = os.path.join(self.start_dir, 'Samples/3_CUDA_Features/immaTensorCoreGemm/Makefile')
if os.path.exists(makefile_path):
remove_file(makefile_path)
print_msg("Removed Makefile at %s to skip immaTensorCoreGemm build", makefile_path)
else:
print_msg("Makefile not found at %s", makefile_path)
else:
raise EasyBuildError("CUDA-Samples-specific hook triggered for non-CUDA-Samples easyconfig?!")


def pre_configure_hook_score_p(self, *args, **kwargs):
"""
Pre-configure hook for Score-p
Expand Down Expand Up @@ -1192,6 +1211,7 @@ def post_module_hook(self, *args, **kwargs):

PRE_CONFIGURE_HOOKS = {
'BLIS': pre_configure_hook_BLIS_a64fx,
'CUDA-Samples': pre_configure_hook_CUDA_Samples_test_remove,
'GObject-Introspection': pre_configure_hook_gobject_introspection,
'Extrae': pre_configure_hook_extrae,
'GROMACS': pre_configure_hook_gromacs,
Expand Down