From b22866f335c092245f2f9bd0b6ee5d1d9f38837b Mon Sep 17 00:00:00 2001 From: Sofie Martins Date: Mon, 26 May 2025 11:46:11 +0200 Subject: [PATCH 1/2] Ensured compilation for sufficiently new architectures in build system --- Make/NinjaBuild.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Make/NinjaBuild.pl b/Make/NinjaBuild.pl index 39755dee3..79c7ee003 100755 --- a/Make/NinjaBuild.pl +++ b/Make/NinjaBuild.pl @@ -366,6 +366,11 @@ sub read_conf { # set linker unshift @{$options{'LINK'}}, "$nvcc --forward-unknown-to-host-compiler -ccbin"; + + my @arch = grep(/-arch/,@{$options{'GPUFLAGS'}}); # Check if architecture is specified by user + if (!@arch) { + push(@{$options{'GPUFLAGS'}},"-arch=all"); # If not specified by user compile fat binary + } } else { push(@{$options{'GPUFLAGS'}},"-xhip -fgpu-rdc"); push(@{$options{'LDFLAGS'}},"-lstdc++ --hip-link"); @@ -374,6 +379,8 @@ sub read_conf { push(@{$options{'MACRO'}},"__HIP_PLATFORM_HCC__"); } push(@{$options{'GPUFLAGS'}},"-std=c++17"); + + } # add standard definitions to MACRO From 547b47e70a520a793d8406524a77c3cb6caa3bc6 Mon Sep 17 00:00:00 2001 From: Sofie Martins Date: Mon, 26 May 2025 12:03:07 +0200 Subject: [PATCH 2/2] Removed unnecessary newlines --- Make/NinjaBuild.pl | 2 -- 1 file changed, 2 deletions(-) diff --git a/Make/NinjaBuild.pl b/Make/NinjaBuild.pl index 79c7ee003..ca9deda9f 100755 --- a/Make/NinjaBuild.pl +++ b/Make/NinjaBuild.pl @@ -379,8 +379,6 @@ sub read_conf { push(@{$options{'MACRO'}},"__HIP_PLATFORM_HCC__"); } push(@{$options{'GPUFLAGS'}},"-std=c++17"); - - } # add standard definitions to MACRO