From abccb2609ce6e541843fb76ff93cb2854f00d5b2 Mon Sep 17 00:00:00 2001 From: Jeroen Mostert Date: Sun, 4 Aug 2024 15:04:13 +0000 Subject: [PATCH] Void Linux support (formalizes #117) - Add the necessary dependencies - Include necessary patches for systems where /bin/sh is not bash (including but not limited to Void Linux) - Fix an incompatibility in hipBLASLt between Clang 17 and GCC 13 - Take latest version of ucc (latest release is compatible with ROCm 6.x) - Remove building the "native" architecture from ucc -- this doesn't work in headless setups. The default list should be complete. Signed-off-by: Jeroen Mostert --- binfo/core/015_02_ucc_openmpi.binfo | 4 +- .../020_01_amd_fftw_single_precision.binfo | 4 + .../020_02_amd_fftw_double_precision.binfo | 4 + ...20_03_amd_fftw_long_double_precision.binfo | 4 + .../core/020_04_amd_fftw_quad_precision.binfo | 4 + install_deps.sh | 11 ++- ...fix-parameter-type-for-openmpi-5.0.1.patch | 7 +- ...ge-here-string-bashism-to-POSIX-echo.patch | 44 ++++++++++ .../0001-tensilelite-llvm-path-changes.patch | 6 +- ...dd-more-gpus-for-default-target-list.patch | 6 +- ...-Tensilelite-fix-fallback-arch-build.patch | 6 +- ...gfx1035-1036-and-1103-to-supported-i.patch | 8 +- .../0005-fallback-support-debug-patch.patch | 6 +- ...and-BLIS-library-search-improvements.patch | 6 +- ...ro-and-arch-linux-msgpack-search-fix.patch | 6 +- .../hipBLASLt/0008-Set-standard-to-C-17.patch | 44 ++++++++++ .../0001-disable-prrte-docs-generation.patch | 6 +- ...event_strings.py-thats-missing-tar.g.patch | 6 +- .../0003-Use-POSIX-compatible-redirect.patch | 40 +++++++++ .../0001-offload-arch-gpu-list-update.patch | 6 +- ...2-Replace-bashisms-with-POSIX-syntax.patch | 83 +++++++++++++++++++ ...iling-test-for-MAD-that-breaks-build.patch | 28 +++++++ 22 files changed, 300 insertions(+), 39 deletions(-) create mode 100644 patches/rocm-6.1.2/amd-fftw/0002-Change-here-string-bashism-to-POSIX-echo.patch create mode 100644 patches/rocm-6.1.2/hipBLASLt/0008-Set-standard-to-C-17.patch create mode 100644 patches/rocm-6.1.2/openmpi/0003-Use-POSIX-compatible-redirect.patch create mode 100644 patches/rocm-6.1.2/ucc/0002-Replace-bashisms-with-POSIX-syntax.patch create mode 100644 patches/rocm-6.1.2/ucx/0001-Fix-failing-test-for-MAD-that-breaks-build.patch diff --git a/binfo/core/015_02_ucc_openmpi.binfo b/binfo/core/015_02_ucc_openmpi.binfo index 1fb1ef0b..81538d48 100755 --- a/binfo/core/015_02_ucc_openmpi.binfo +++ b/binfo/core/015_02_ucc_openmpi.binfo @@ -4,12 +4,12 @@ BINFO_APP_SRC_TOPDIR_BASENAME=${BINFO_APP_NAME} BINFO_APP_SRC_DIR="${SDK_SRC_ROOT_DIR}/${BINFO_APP_SRC_TOPDIR_BASENAME}" BINFO_APP_UPSTREAM_REPO_URL=https://github.com/openucx/ucc.git # v.1.2.0 does not work with rocm 6.0, use snapshot from unreleased v1.3.x branch -BINFO_APP_UPSTREAM_REPO_VERSION_TAG=985947a521d7c00e6866f032b4db4c18e5bf9e6a +#BINFO_APP_UPSTREAM_REPO_VERSION_TAG=985947a521d7c00e6866f032b4db4c18e5bf9e6a BINFO_APP_CONFIG_CMD_ARRAY=( "cd ${BINFO_APP_SRC_DIR}" "export HIPCC=${SDK_C_COMPILER_HIPCC}" "./autogen.sh" "cd ${BINFO_APP_BUILD_DIR}" - "${BINFO_APP_SRC_DIR}/configure --prefix=${INSTALL_DIR_PREFIX_SDK_ROOT} --libdir=${INSTALL_DIR_PREFIX_SDK_ROOT}/lib64 --with-ucx=${INSTALL_DIR_PREFIX_SDK_ROOT} --with-rocm=${INSTALL_DIR_PREFIX_SDK_ROOT} --with-rocm-arch=all" + "${BINFO_APP_SRC_DIR}/configure --prefix=${INSTALL_DIR_PREFIX_SDK_ROOT} --libdir=${INSTALL_DIR_PREFIX_SDK_ROOT}/lib64 --with-ucx=${INSTALL_DIR_PREFIX_SDK_ROOT} --with-rocm=${INSTALL_DIR_PREFIX_SDK_ROOT} --with-rocm-arch=all-arch-no-native" ) diff --git a/binfo/core/020_01_amd_fftw_single_precision.binfo b/binfo/core/020_01_amd_fftw_single_precision.binfo index 49e17699..b35633d4 100755 --- a/binfo/core/020_01_amd_fftw_single_precision.binfo +++ b/binfo/core/020_01_amd_fftw_single_precision.binfo @@ -5,6 +5,10 @@ BINFO_APP_SRC_DIR="${SDK_SRC_ROOT_DIR}/${BINFO_APP_SRC_TOPDIR_BASENAME}" BINFO_APP_UPSTREAM_REPO_URL=https://github.com/amd/amd-fftw.git BINFO_APP_UPSTREAM_REPO_VERSION_TAG=4.2 +BINFO_APP_PRE_CONFIG_CMD_ARRAY=( + "autoreconf ${BINFO_APP_SRC_DIR}" +) + BINFO_APP_CONFIG_CMD_ARRAY=( "cd ${BINFO_APP_BUILD_DIR}" "export CFLAGS=\"${CFLAGS} -O3\"" diff --git a/binfo/core/020_02_amd_fftw_double_precision.binfo b/binfo/core/020_02_amd_fftw_double_precision.binfo index f5d73c5b..e05c9f64 100755 --- a/binfo/core/020_02_amd_fftw_double_precision.binfo +++ b/binfo/core/020_02_amd_fftw_double_precision.binfo @@ -5,6 +5,10 @@ BINFO_APP_SRC_DIR="${SDK_SRC_ROOT_DIR}/${BINFO_APP_SRC_TOPDIR_BASENAME}" BINFO_APP_UPSTREAM_REPO_URL=https://github.com/amd/amd-fftw.git BINFO_APP_UPSTREAM_REPO_VERSION_TAG=4.2 +BINFO_APP_PRE_CONFIG_CMD_ARRAY=( + "autoreconf ${BINFO_APP_SRC_DIR}" +) + BINFO_APP_CONFIG_CMD_ARRAY=( "cd ${BINFO_APP_BUILD_DIR}" "export CFLAGS=\"${CFLAGS} -O3\"" diff --git a/binfo/core/020_03_amd_fftw_long_double_precision.binfo b/binfo/core/020_03_amd_fftw_long_double_precision.binfo index be63a439..eac95ccf 100755 --- a/binfo/core/020_03_amd_fftw_long_double_precision.binfo +++ b/binfo/core/020_03_amd_fftw_long_double_precision.binfo @@ -5,6 +5,10 @@ BINFO_APP_SRC_DIR="${SDK_SRC_ROOT_DIR}/${BINFO_APP_SRC_TOPDIR_BASENAME}" BINFO_APP_UPSTREAM_REPO_URL=https://github.com/amd/amd-fftw.git BINFO_APP_UPSTREAM_REPO_VERSION_TAG=4.2 +BINFO_APP_PRE_CONFIG_CMD_ARRAY=( + "autoreconf ${BINFO_APP_SRC_DIR}" +) + BINFO_APP_CONFIG_CMD_ARRAY=( "cd ${BINFO_APP_BUILD_DIR}" "export CFLAGS=\"${CFLAGS} -O3\"" diff --git a/binfo/core/020_04_amd_fftw_quad_precision.binfo b/binfo/core/020_04_amd_fftw_quad_precision.binfo index 2e2f12e9..c933c87f 100755 --- a/binfo/core/020_04_amd_fftw_quad_precision.binfo +++ b/binfo/core/020_04_amd_fftw_quad_precision.binfo @@ -5,6 +5,10 @@ BINFO_APP_SRC_DIR="${SDK_SRC_ROOT_DIR}/${BINFO_APP_SRC_TOPDIR_BASENAME}" BINFO_APP_UPSTREAM_REPO_URL=https://github.com/amd/amd-fftw.git BINFO_APP_UPSTREAM_REPO_VERSION_TAG=4.2 +BINFO_APP_PRE_CONFIG_CMD_ARRAY=( + "autoreconf ${BINFO_APP_SRC_DIR}" +) + BINFO_APP_CONFIG_CMD_ARRAY=( "cd ${BINFO_APP_BUILD_DIR}" "export CFLAGS=\"${CFLAGS} -O3\"" diff --git a/install_deps.sh b/install_deps.sh index c2796ca7..c327c142 100755 --- a/install_deps.sh +++ b/install_deps.sh @@ -8,13 +8,13 @@ func_is_supported_distro() fi case "${ID}" in - mageia|fedora|ubuntu|linuxmint|arch|manjaro) + mageia|fedora|ubuntu|linuxmint|arch|manjaro|void) echo "Supported Linux distribution detected: ${ID}" true ;; *) echo "Unsupported Linux distribution detected: ${ID} $VERSION_ID" - printf "This script is currently supported on Mageia, Fedora, Ubuntu, Linux Mint, Arch and Manjaro\n" + printf "This script is currently supported on Mageia, Fedora, Ubuntu, Linux Mint, Arch, Manjaro and Void\n" exit 2 ;; esac @@ -62,9 +62,14 @@ func_install_packages() sudo pacman -S --needed gcc-libs make pkgconf numactl cmake doxygen libelf perl-rename perl-uri perl-file-basedir perl-file-copy-recursive perl-file-listing wget gcc gcc-fortran gcc-libs fakeroot openmp pciutils libdrm vim glew autoconf automake libtool bzip2 xz icu perl libmpack python-pip openssl python-pyopenssl libffi nlohmann-json texinfo extra-cmake-modules sqlite git git-lfs valgrind flex byacc gettext ninja texlive-basic ocl-icd protobuf pybind11 libaio gmp mpfr libpng libjpeg-turbo python-cppheaderparser msgpack-c msgpack-cxx sox ncurses expat babeltrace systemd git-lfs install ;; + void) + sudo xbps-install -S git-lfs base-devel gcc-fortran cmake doxygen babeltrace-devel bzip2-devel elfutils-devel expat-devel ffmpeg ffmpeg-devel gdb gdbm-devel gmp-devel icu icu-devel json-c++ lcov libaio-devel libdrm-devel libffi-devel libglvnd-devel libgomp-devel libjpeg-turbo-devel liblzma liblzma-devel libnuma-devel libpng-devel libuuid-devel mpfr-devel msgpack-cxx ncurses-devel ninja openssl-devel protobuf protobuf-devel python3-pip python3-pybind11 readline readline-devel sox sqlite sqlite-devel xxd zlib-devel + python3 -m pip install --break-syste-packages CppHeaderParser + git-lfs install + ;; *) echo "Unsupported Linux distribution detected: ${ID} $VERSION_ID" - echo "This script is currently supported on Mageia, Fedora, Ubuntu, Linux Mint, Arch and Manjaro" + echo "This script is currently supported on Mageia, Fedora, Ubuntu, Linux Mint, Arch, Manjaro and Void" exit 2 ;; esac diff --git a/patches/rocm-6.1.2/amd-fftw/0001-fix-parameter-type-for-openmpi-5.0.1.patch b/patches/rocm-6.1.2/amd-fftw/0001-fix-parameter-type-for-openmpi-5.0.1.patch index c286462e..0571e1a6 100644 --- a/patches/rocm-6.1.2/amd-fftw/0001-fix-parameter-type-for-openmpi-5.0.1.patch +++ b/patches/rocm-6.1.2/amd-fftw/0001-fix-parameter-type-for-openmpi-5.0.1.patch @@ -1,10 +1,11 @@ -From 7d168fcd8b3d015fb9d06876e2d43e8cc38f8efe Mon Sep 17 00:00:00 2001 +From 7ecfa0d7b81db3a3fee571f1791c41977c8ee27c Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Wed, 29 May 2024 15:16:57 -0700 -Subject: [PATCH] fix parameter type for openmpi 5.0.1 +Subject: [PATCH 1/2] fix parameter type for openmpi 5.0.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit + rocm_sdk_builder_611 detected on fedora 40/gcc build that at least OpenMPI 5.0.1 request that last @@ -67,5 +68,5 @@ index 41b588c7..298ab644 100644 #ifdef AMD_MPI_TRANSPOSE_LOGS printf("TRANSPOSE-PAIRWISE: n_pes[%d], my_pe[%d], first_pe[%d]\n", n_pes, my_pe, pe); -- -2.45.1 +2.46.0 diff --git a/patches/rocm-6.1.2/amd-fftw/0002-Change-here-string-bashism-to-POSIX-echo.patch b/patches/rocm-6.1.2/amd-fftw/0002-Change-here-string-bashism-to-POSIX-echo.patch new file mode 100644 index 00000000..51155d41 --- /dev/null +++ b/patches/rocm-6.1.2/amd-fftw/0002-Change-here-string-bashism-to-POSIX-echo.patch @@ -0,0 +1,44 @@ +From bbd4a16e3e4d69f8f67ce1deca0dbcc4f163ae43 Mon Sep 17 00:00:00 2001 +From: Jeroen Mostert +Date: Sun, 4 Aug 2024 14:39:52 +0000 +Subject: [PATCH 2/2] Change here-string bashism to POSIX echo + +Fixes builds on systems where /bin/sh is not bash + +Signed-off-by: Jeroen Mostert +--- + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 24aaf4fc..af2390ac 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -653,7 +653,7 @@ if test "$have_amd_opt" = yes && test "${enable_debug+set}" != "set" && test "$I + AC_DEFINE(AMD_DYNAMIC_DISPATCHER,1,[Define to enable AMD dynamic dispatcher feature that would build a single portable optimized library which can execute on different x86 CPU architectures.]) + + SUBSTRGCC='gcc' +- if grep -q "$SUBSTRGCC" <<<"$CC"; then ++ if echo "$CC" | grep -q "$SUBSTRGCC"; then + CFLAGS="$CFLAGS -mno-avx256-split-unaligned-store -mno-avx256-split-unaligned-load -mno-prefer-avx128" + else + AC_MSG_CHECKING([whether we are using clang 14 or later]) +@@ -683,13 +683,13 @@ if test "$have_amd_opt" = yes && test "${enable_debug+set}" != "set" && test "$I + fi + SUBSTRCLANG='clang' + SUBSTRGCC='gcc' +- if grep -q "$SUBSTRCLANG" <<<"$CC"; then ++ if echo "$CC" | grep -q "$SUBSTRCLANG"; then + if [[ -z "${AMD_ARCH}" ]]; then + CFLAGS="$CFLAGS -mavx2 -mfma" + else + CFLAGS="$CFLAGS -march=$AMD_ARCH -mavx2 -mfma" + fi +- elif grep -q "$SUBSTRGCC" <<<"$CC"; then ++ elif echo "$CC" | grep -q "$SUBSTRGCC"; then + GCCVERSION=$(expr `gcc -dumpversion | cut -f1 -d.`) + case "$AMDZENFAMILY" in + "23") +-- +2.46.0 + diff --git a/patches/rocm-6.1.2/hipBLASLt/0001-tensilelite-llvm-path-changes.patch b/patches/rocm-6.1.2/hipBLASLt/0001-tensilelite-llvm-path-changes.patch index 390453ea..2d2e55ef 100644 --- a/patches/rocm-6.1.2/hipBLASLt/0001-tensilelite-llvm-path-changes.patch +++ b/patches/rocm-6.1.2/hipBLASLt/0001-tensilelite-llvm-path-changes.patch @@ -1,7 +1,7 @@ -From e5daa8fa4cf061e18c4b6bfb27c318f0d79bf594 Mon Sep 17 00:00:00 2001 +From 9d38e990b83222db8db05430e321486c62d65706 Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Fri, 3 May 2024 13:16:31 -0700 -Subject: [PATCH 1/7] tensilelite llvm path changes +Subject: [PATCH 1/8] tensilelite llvm path changes Signed-off-by: Mika Laitio --- @@ -49,5 +49,5 @@ index 230c4469..81a1a015 100644 . ${venv}/bin/activate -- -2.45.2 +2.46.0 diff --git a/patches/rocm-6.1.2/hipBLASLt/0002-add-more-gpus-for-default-target-list.patch b/patches/rocm-6.1.2/hipBLASLt/0002-add-more-gpus-for-default-target-list.patch index 400c041e..7986971e 100644 --- a/patches/rocm-6.1.2/hipBLASLt/0002-add-more-gpus-for-default-target-list.patch +++ b/patches/rocm-6.1.2/hipBLASLt/0002-add-more-gpus-for-default-target-list.patch @@ -1,7 +1,7 @@ -From 490d18000263e3e4849ed78ab4ac7975529a86a7 Mon Sep 17 00:00:00 2001 +From 6d58158733869a2cff8cf685325492c61d468db0 Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Wed, 15 May 2024 19:20:44 -0700 -Subject: [PATCH 2/7] add more gpus for default target list +Subject: [PATCH 2/8] add more gpus for default target list Signed-off-by: Mika Laitio --- @@ -26,5 +26,5 @@ index fec03c1b..c6a16e01 100644 if (AMDGPU_TARGETS) -- -2.45.2 +2.46.0 diff --git a/patches/rocm-6.1.2/hipBLASLt/0003-Tensilelite-fix-fallback-arch-build.patch b/patches/rocm-6.1.2/hipBLASLt/0003-Tensilelite-fix-fallback-arch-build.patch index 40f942ca..2c98148b 100644 --- a/patches/rocm-6.1.2/hipBLASLt/0003-Tensilelite-fix-fallback-arch-build.patch +++ b/patches/rocm-6.1.2/hipBLASLt/0003-Tensilelite-fix-fallback-arch-build.patch @@ -1,7 +1,7 @@ -From 61b76b1bbdaeac7f08ef13200ffcd4b3fce8f5a6 Mon Sep 17 00:00:00 2001 +From ad469395b8c4423a153dd10d3ff283f7612f8f12 Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Wed, 15 May 2024 19:30:31 -0700 -Subject: [PATCH 3/7] Tensilelite fix fallback arch build +Subject: [PATCH 3/8] Tensilelite fix fallback arch build fixes build error which happens for example if the only gpu selected is gfx1010 / AMD RX 5700 XT. @@ -62,5 +62,5 @@ index 8a37403d..d2ac2166 100644 for arch in archs: if arch in architectureMap: -- -2.45.2 +2.46.0 diff --git a/patches/rocm-6.1.2/hipBLASLt/0004-Tensilelite-add-gfx1035-1036-and-1103-to-supported-i.patch b/patches/rocm-6.1.2/hipBLASLt/0004-Tensilelite-add-gfx1035-1036-and-1103-to-supported-i.patch index 3b5af249..24146b48 100644 --- a/patches/rocm-6.1.2/hipBLASLt/0004-Tensilelite-add-gfx1035-1036-and-1103-to-supported-i.patch +++ b/patches/rocm-6.1.2/hipBLASLt/0004-Tensilelite-add-gfx1035-1036-and-1103-to-supported-i.patch @@ -1,7 +1,7 @@ -From a687a8343961e0a3c732101b44e0071150f38d51 Mon Sep 17 00:00:00 2001 +From 2ede1afa4de3e563f921e808e6e13084df376716 Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Wed, 15 May 2024 20:56:51 -0700 -Subject: [PATCH 4/7] Tensilelite add gfx1035, 1036 and 1103 to supported isa +Subject: [PATCH 4/8] Tensilelite add gfx1035, 1036 and 1103 to supported isa list Signed-off-by: Mika Laitio @@ -10,7 +10,7 @@ Signed-off-by: Mika Laitio 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tensilelite/Tensile/Common.py b/tensilelite/Tensile/Common.py -index c47a8752..3630ee41 100644 +index c47a8752..860a16c4 100644 --- a/tensilelite/Tensile/Common.py +++ b/tensilelite/Tensile/Common.py @@ -209,7 +209,7 @@ globalParameters["MergeFiles"] = True # F=store every solution and k @@ -34,5 +34,5 @@ index c47a8752..3630ee41 100644 def getArchitectureName(gfxName): -- -2.45.2 +2.46.0 diff --git a/patches/rocm-6.1.2/hipBLASLt/0005-fallback-support-debug-patch.patch b/patches/rocm-6.1.2/hipBLASLt/0005-fallback-support-debug-patch.patch index 2d004c7b..4b860813 100644 --- a/patches/rocm-6.1.2/hipBLASLt/0005-fallback-support-debug-patch.patch +++ b/patches/rocm-6.1.2/hipBLASLt/0005-fallback-support-debug-patch.patch @@ -1,7 +1,7 @@ -From 6b32bb226ef045db90c86f955fb3836d3f01ca98 Mon Sep 17 00:00:00 2001 +From ff692eca2e973a0bf6c7e0b88ad3ff2913a98127 Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Sat, 18 May 2024 18:39:43 -0700 -Subject: [PATCH 5/7] fallback support debug patch +Subject: [PATCH 5/8] fallback support debug patch Signed-off-by: Mika Laitio --- @@ -23,5 +23,5 @@ index d2ac2166..ce6c0d5f 100644 if globalParameters["LazyLibraryLoading"] and not (globalParameters["MergeFiles"] and globalParameters["SeparateArchitectures"]): printExit("--lazy-library-loading requires --merge-files and --separate-architectures enabled") -- -2.45.2 +2.46.0 diff --git a/patches/rocm-6.1.2/hipBLASLt/0006-OpenBLAS-and-BLIS-library-search-improvements.patch b/patches/rocm-6.1.2/hipBLASLt/0006-OpenBLAS-and-BLIS-library-search-improvements.patch index 2437e751..e338ed2c 100644 --- a/patches/rocm-6.1.2/hipBLASLt/0006-OpenBLAS-and-BLIS-library-search-improvements.patch +++ b/patches/rocm-6.1.2/hipBLASLt/0006-OpenBLAS-and-BLIS-library-search-improvements.patch @@ -1,7 +1,7 @@ -From 992e946dddb9e1714da704bd1277b291496f5f69 Mon Sep 17 00:00:00 2001 +From dc79cfb78dde7f846fd078cf01bfc5c077fab359 Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Sat, 18 May 2024 18:40:43 -0700 -Subject: [PATCH 6/7] OpenBLAS and BLIS library search improvements +Subject: [PATCH 6/8] OpenBLAS and BLIS library search improvements - works now with the rocm_sdks build by rocm sdk builder @@ -156,5 +156,5 @@ index bc9109d0..53b854e6 100644 message("BLIS lib found: ${BLIS_LIB}") -- -2.45.2 +2.46.0 diff --git a/patches/rocm-6.1.2/hipBLASLt/0007-manjaro-and-arch-linux-msgpack-search-fix.patch b/patches/rocm-6.1.2/hipBLASLt/0007-manjaro-and-arch-linux-msgpack-search-fix.patch index 3a9f2107..cdba8132 100644 --- a/patches/rocm-6.1.2/hipBLASLt/0007-manjaro-and-arch-linux-msgpack-search-fix.patch +++ b/patches/rocm-6.1.2/hipBLASLt/0007-manjaro-and-arch-linux-msgpack-search-fix.patch @@ -1,7 +1,7 @@ -From f320e89bad147c2b9e6cb6fd00261d5bfd0526be Mon Sep 17 00:00:00 2001 +From e8866ad0e8a3000ceebb382aa427f704e2a8b89d Mon Sep 17 00:00:00 2001 From: Daniele <57776841+daniandtheweb@users.noreply.github.com> Date: Tue, 18 Jun 2024 21:46:30 -0700 -Subject: [PATCH 7/7] manjaro and arch linux msgpack search fix +Subject: [PATCH 7/8] manjaro and arch linux msgpack search fix Fix provided by @daniandtheweb and @jeroen-mostert @@ -28,5 +28,5 @@ index 43206527..e9476b3d 100644 if(TARGET msgpackc-cxx) -- -2.45.2 +2.46.0 diff --git a/patches/rocm-6.1.2/hipBLASLt/0008-Set-standard-to-C-17.patch b/patches/rocm-6.1.2/hipBLASLt/0008-Set-standard-to-C-17.patch new file mode 100644 index 00000000..1d5a87f7 --- /dev/null +++ b/patches/rocm-6.1.2/hipBLASLt/0008-Set-standard-to-C-17.patch @@ -0,0 +1,44 @@ +From 76361246f1330cc1fb1b7fd0af4e3834d7563618 Mon Sep 17 00:00:00 2001 +From: Jeroen Mostert +Date: Sun, 4 Aug 2024 17:07:19 +0000 +Subject: [PATCH 8/8] Set standard to C++17 + +The combination of Clang 17 with the STL of GCC 13 doesn't work with +-std=c++20 (at the very least not on Void Linux). Nothing actually +uses C++20 features, so use the same flags as main Tensile. + +Signed-off-by: Jeroen Mostert +--- + CMakeLists.txt | 2 +- + tensilelite/Tensile/Source/lib/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c6a16e01..31547bf7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,7 +25,7 @@ + cmake_minimum_required(VERSION 3.5 FATAL_ERROR) + + # This will add compile option: -std=c++17 +-set(CMAKE_CXX_STANDARD 20 ) ++set(CMAKE_CXX_STANDARD 17 ) + # Without this line, it will add -std=gnu++17 instead, which may have issues. + set(CMAKE_CXX_EXTENSIONS OFF ) + set(CMAKE_CXX_STANDARD_REQUIRED ON) +diff --git a/tensilelite/Tensile/Source/lib/CMakeLists.txt b/tensilelite/Tensile/Source/lib/CMakeLists.txt +index e9476b3d..72425d07 100644 +--- a/tensilelite/Tensile/Source/lib/CMakeLists.txt ++++ b/tensilelite/Tensile/Source/lib/CMakeLists.txt +@@ -91,7 +91,7 @@ add_library (TensileHost STATIC ${tensile_sources}) + + set_target_properties(TensileHost + PROPERTIES +- CXX_STANDARD 20 ++ CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF) + +-- +2.46.0 + diff --git a/patches/rocm-6.1.2/openmpi/0001-disable-prrte-docs-generation.patch b/patches/rocm-6.1.2/openmpi/0001-disable-prrte-docs-generation.patch index ba39f420..3b479bd3 100644 --- a/patches/rocm-6.1.2/openmpi/0001-disable-prrte-docs-generation.patch +++ b/patches/rocm-6.1.2/openmpi/0001-disable-prrte-docs-generation.patch @@ -1,7 +1,7 @@ -From c527de182821bb98f0dec3c983217a10b634aeac Mon Sep 17 00:00:00 2001 +From cea15e4988d70d2e9b973951031f2fab9ef3145b Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Wed, 24 Jan 2024 14:53:02 -0800 -Subject: [PATCH 1/2] disable prrte docs generation +Subject: [PATCH 1/3] disable prrte docs generation Disable prrte doc building to avoid follwing error if python sphinx is not installed available: @@ -51,5 +51,5 @@ index a623100..f98c89e 100644 util \ $(MCA_prte_FRAMEWORKS_SUBDIRS) \ -- -2.41.1 +2.46.0 diff --git a/patches/rocm-6.1.2/openmpi/0002-added-construct_event_strings.py-thats-missing-tar.g.patch b/patches/rocm-6.1.2/openmpi/0002-added-construct_event_strings.py-thats-missing-tar.g.patch index 273179ac..bb72060e 100644 --- a/patches/rocm-6.1.2/openmpi/0002-added-construct_event_strings.py-thats-missing-tar.g.patch +++ b/patches/rocm-6.1.2/openmpi/0002-added-construct_event_strings.py-thats-missing-tar.g.patch @@ -1,7 +1,7 @@ -From f20a12071640dae9bf7b301167ffc9112bd83667 Mon Sep 17 00:00:00 2001 +From ffd5927a6b57c5910b00b6c532cad131ffe3c291 Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Wed, 29 May 2024 14:15:28 -0700 -Subject: [PATCH 2/2] added construct_event_strings.py thats missing tar.gz +Subject: [PATCH 2/3] added construct_event_strings.py thats missing tar.gz patching of git submodules does not work well yet with the rcom sdk builder, therefore openmpi @@ -269,5 +269,5 @@ index 0000000..52f242f +if __name__ == '__main__': + exit(main()) -- -2.41.1 +2.46.0 diff --git a/patches/rocm-6.1.2/openmpi/0003-Use-POSIX-compatible-redirect.patch b/patches/rocm-6.1.2/openmpi/0003-Use-POSIX-compatible-redirect.patch new file mode 100644 index 00000000..db48ecdf --- /dev/null +++ b/patches/rocm-6.1.2/openmpi/0003-Use-POSIX-compatible-redirect.patch @@ -0,0 +1,40 @@ +From 65c8e2978024fee5c5d24c9575111abd0a391775 Mon Sep 17 00:00:00 2001 +From: Jeroen Mostert +Date: Sun, 4 Aug 2024 14:47:58 +0000 +Subject: [PATCH 3/3] Use POSIX compatible redirect + +Fixes build on systems where /bin/sh is not bash + +Signed-off-by: Jeroen Mostert +--- + config/oac/oac_check_package.m4 | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/config/oac/oac_check_package.m4 b/config/oac/oac_check_package.m4 +index 6ab607b..4c50bad 100644 +--- a/config/oac/oac_check_package.m4 ++++ b/config/oac/oac_check_package.m4 +@@ -595,7 +595,7 @@ AC_DEFUN([_OAC_CHECK_PACKAGE_GENERIC_PREFIX], [ + [check_package_generic_prefix_happy=0 + AS_IF([test -n "${check_package_libdir}"], + [AC_MSG_CHECKING([for $1 library (${check_package_generic_search_lib}) in ${check_package_libdir}]) +- ls ${check_package_libdir}/lib${check_package_generic_search_lib}.* 1>&/dev/null 2>&1 ++ ls ${check_package_libdir}/lib${check_package_generic_search_lib}.* >/dev/null 2>&1 + AS_IF([test $? -eq 0], + [check_package_generic_prefix_happy=1 + $2_LDFLAGS="-L${check_package_libdir}" +@@ -604,9 +604,9 @@ AC_DEFUN([_OAC_CHECK_PACKAGE_GENERIC_PREFIX], [ + [check_package_generic_prefix_lib=0 + check_package_generic_prefix_lib64=0 + +- ls ${check_package_prefix}/lib/lib${check_package_generic_search_lib}.* 1>&/dev/null 2>&1 ++ ls ${check_package_prefix}/lib/lib${check_package_generic_search_lib}.* >/dev/null 2>&1 + AS_IF([test $? -eq 0], [check_package_generic_prefix_lib=1]) +- ls ${check_package_prefix}/lib64/lib${check_package_generic_search_lib}.* 1>&/dev/null 2>&1 ++ ls ${check_package_prefix}/lib64/lib${check_package_generic_search_lib}.* >/dev/null 2>&1 + AS_IF([test $? -eq 0], [check_package_generic_prefix_lib64=1]) + + AC_MSG_CHECKING([for $1 library (${check_package_generic_search_lib}) in ${check_package_prefix}]) +-- +2.46.0 + diff --git a/patches/rocm-6.1.2/ucc/0001-offload-arch-gpu-list-update.patch b/patches/rocm-6.1.2/ucc/0001-offload-arch-gpu-list-update.patch index 564636b6..9bf24ea7 100644 --- a/patches/rocm-6.1.2/ucc/0001-offload-arch-gpu-list-update.patch +++ b/patches/rocm-6.1.2/ucc/0001-offload-arch-gpu-list-update.patch @@ -1,7 +1,7 @@ -From 860fc5b258b6948a70d695d90c422ea8621f25d3 Mon Sep 17 00:00:00 2001 +From 20dc1d46b4b7d7b3d5b9681f0d6edac361746df2 Mon Sep 17 00:00:00 2001 From: Mika Laitio Date: Sat, 27 Jul 2024 01:08:15 -0700 -Subject: [PATCH] offload arch gpu list update +Subject: [PATCH 1/2] offload arch gpu list update Signed-off-by: Mika Laitio --- @@ -32,5 +32,5 @@ index 8a2bdc2..2b2a077 100644 # ROCM_PARSE_FLAGS(ARG, VAR_LIBS, VAR_LDFLAGS, VAR_CPPFLAGS) # ---------------------------------------------------------- -- -2.45.2 +2.46.0 diff --git a/patches/rocm-6.1.2/ucc/0002-Replace-bashisms-with-POSIX-syntax.patch b/patches/rocm-6.1.2/ucc/0002-Replace-bashisms-with-POSIX-syntax.patch new file mode 100644 index 00000000..f03181db --- /dev/null +++ b/patches/rocm-6.1.2/ucc/0002-Replace-bashisms-with-POSIX-syntax.patch @@ -0,0 +1,83 @@ +From 189cf30d1337b213d6bf32302e6816aebcea5f20 Mon Sep 17 00:00:00 2001 +From: Jeroen Mostert +Date: Sun, 4 Aug 2024 14:58:56 +0000 +Subject: [PATCH 2/2] Replace bashisms with POSIX syntax + +Fixes the build on systems where /bin/sh is not bash + +Signed-off-by: Jeroen Mostert +--- + config/m4/check_tls.m4 | 2 +- + config/m4/configure.m4 | 2 +- + config/m4/gtest.m4 | 2 +- + config/m4/tl_coll_plugins.m4 | 2 +- + configure.ac | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/config/m4/check_tls.m4 b/config/m4/check_tls.m4 +index c063a57..08c848b 100644 +--- a/config/m4/check_tls.m4 ++++ b/config/m4/check_tls.m4 +@@ -18,7 +18,7 @@ AC_DEFUN([CHECK_TLS_REQUIRED], [ + CHECKED_TL_REQUIRED=n + required="y" + tls_str=${TLS_REQUIRED} +- AS_IF([ test "${TLS_REQUIRED:0:1}" == "^" ], [ ++ AS_IF([ expr "x${TLS_REQUIRED} : 'x\^'" -eq 2 ], [ + CHECKED_TL_REQUIRED=y + required="n" + tls_str=${TLS_REQUIRED:1}]) +diff --git a/config/m4/configure.m4 b/config/m4/configure.m4 +index 3c04314..9bf7036 100644 +--- a/config/m4/configure.m4 ++++ b/config/m4/configure.m4 +@@ -40,7 +40,7 @@ AC_DEFUN([CHECK_NEED_TL_PROFILING], [ + AS_IF([ test x"$with_profiling" = "xall" ], [TL_PROFILING_REQUIRED=y], + [ + for t in $(echo ${with_profiling} | tr ":" " "); do +- AS_IF([ test "$t" == "$tl_name" ], [TL_PROFILING_REQUIRED=y], []) ++ AS_IF([ test "$t" = "$tl_name" ], [TL_PROFILING_REQUIRED=y], []) + done + ]) + ]) +diff --git a/config/m4/gtest.m4 b/config/m4/gtest.m4 +index 7575106..34d7017 100644 +--- a/config/m4/gtest.m4 ++++ b/config/m4/gtest.m4 +@@ -12,6 +12,6 @@ dnl Provide a flag to enable or disable Google Test usage. + [enable_gtest=no]) + + AM_CONDITIONAL([HAVE_GTEST],[test "x$enable_gtest" = "xyes"]) +- AS_IF([test "x$enable_gtest" == "xyes"], ++ AS_IF([test "x$enable_gtest" = "xyes"], + [gtest_enable=enabled], [gtest_enable=disabled]) + ]) +diff --git a/config/m4/tl_coll_plugins.m4 b/config/m4/tl_coll_plugins.m4 +index 1e681f4..7abf0ee 100644 +--- a/config/m4/tl_coll_plugins.m4 ++++ b/config/m4/tl_coll_plugins.m4 +@@ -26,7 +26,7 @@ AC_DEFUN([CHECK_TLCP_REQUIRED], [ + [CHECKED_TLCP_REQUIRED=y], + [ + for t in $(echo ${TLCP_REQUIRED} | tr "," " "); do +- AS_IF([ test "$t" == "$tlcp_name" ], [CHECKED_TLCP_REQUIRED=y], []) ++ AS_IF([ test "$t" = "$tlcp_name" ], [CHECKED_TLCP_REQUIRED=y], []) + done + ]) + ]) +diff --git a/configure.ac b/configure.ac +index bd8c27a..961bb1e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -119,7 +119,7 @@ AC_ARG_WITH([docs_only], + AC_DEFUN([UCC_DX_ENABLE_CHECK], + [AS_IF([DX_TEST_FEATURE($1)], + [], +- [AS_IF([test "x$enable_doxygen_$1" == xyes], ++ [AS_IF([test "x$enable_doxygen_$1" = xyes], + [AC_MSG_ERROR([--enable-doxygen-$1 was specified, but $1 + doxygen was not found])], + [])])]) +-- +2.46.0 + diff --git a/patches/rocm-6.1.2/ucx/0001-Fix-failing-test-for-MAD-that-breaks-build.patch b/patches/rocm-6.1.2/ucx/0001-Fix-failing-test-for-MAD-that-breaks-build.patch new file mode 100644 index 00000000..9a0dcdb9 --- /dev/null +++ b/patches/rocm-6.1.2/ucx/0001-Fix-failing-test-for-MAD-that-breaks-build.patch @@ -0,0 +1,28 @@ +From 6aae31161ec87bed0200545e86b1fc91a23101e0 Mon Sep 17 00:00:00 2001 +From: Jeroen Mostert +Date: Sun, 4 Aug 2024 15:00:38 +0000 +Subject: [PATCH] Fix failing test for MAD that breaks build + +Fixes the build for systems where /bin/sh is not bash + +Signed-off-by: Jeroen Mostert +--- + config/m4/mad.m4 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/m4/mad.m4 b/config/m4/mad.m4 +index c8e6dd69a..805b9684f 100644 +--- a/config/m4/mad.m4 ++++ b/config/m4/mad.m4 +@@ -14,7 +14,7 @@ AC_ARG_WITH([mad], + [with_mad=no]) + + mad_happy=no +-AS_IF([test "x$with_mad" == "xno"], ++AS_IF([test "x$with_mad" = "xno"], + [AC_MSG_WARN([Infiniband MAD support explicitly disabled])], + + [AS_CASE(["x$with_mad"], +-- +2.46.0 +