From ce7b52d212e27bc6c480cc3a854e754f00373dd7 Mon Sep 17 00:00:00 2001 From: Nilesh M Negi Date: Mon, 5 Feb 2024 09:02:41 -0600 Subject: [PATCH] BUILD: fix GPU arch flags in amdclang build (#914) Signed-off-by: nileshnegi (cherry picked from commit c1734db1b2bc9ffeba5d17b3e81e1a9425dee100) --- cuda_lt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cuda_lt.sh b/cuda_lt.sh index e014f3ce82..6601e3edcb 100755 --- a/cuda_lt.sh +++ b/cuda_lt.sh @@ -28,7 +28,7 @@ mkdir -p $pic_dir tmpcmd="${@:3}" if [[ "$tmpcmd" == *"amdclang"* ]]; then - cmd="${@:3:2} -x hip -target x86_64-unknown-linux-gnu --offload-arch=gfx908:xnack- --offload-arch=gfx90a:xnack- --offload-arch=gfx90a:xnack+ --offload-arch=gfx940 --offload-arch=gfx941 --offload-arch=gfx942 --offload-arch=gfx1030 --offload-arch=gfx1100 --offload-arch=gfx1101 --offload-arch=gfx1102 --offload-arch=native ${@:5} -fPIC -o ${pic_filepath}" + cmd="${@:3:2} -x hip -target x86_64-unknown-linux-gnu --offload-arch=gfx908 --offload-arch=gfx90a --offload-arch=gfx940 --offload-arch=gfx941 --offload-arch=gfx942 --offload-arch=gfx1030 --offload-arch=gfx1100 --offload-arch=gfx1101 --offload-arch=gfx1102 --offload-arch=native ${@:5} -fPIC -O3 -o ${pic_filepath}" elif [[ "$tmpcmd" == *"hipcc"* ]]; then cmd="${@:3} -fPIC -o ${pic_filepath}" else @@ -38,7 +38,7 @@ echo $cmd $cmd if [[ "$tmpcmd" == *"amdclang"* ]]; then - cmd="${@:3:2} -x hip -target x86_64-unknown-linux-gnu --offload-arch=gfx908:xnack- --offload-arch=gfx90a:xnack- --offload-arch=gfx90a:xnack+ --offload-arch=gfx940 --offload-arch=gfx941 --offload-arch=gfx942 --offload-arch=gfx1030 --offload-arch=gfx1100 --offload-arch=gfx1101 --offload-arch=gfx1102 --offload-arch=native ${@:5} -o ${npic_filepath}" + cmd="${@:3:2} -x hip -target x86_64-unknown-linux-gnu --offload-arch=gfx908 --offload-arch=gfx90a --offload-arch=gfx940 --offload-arch=gfx941 --offload-arch=gfx942 --offload-arch=gfx1030 --offload-arch=gfx1100 --offload-arch=gfx1101 --offload-arch=gfx1102 --offload-arch=native ${@:5} -O3 -o ${npic_filepath}" else cmd="${@:3} -o ${npic_filepath}" fi