From 5e721497bd11ff7e498680440f8edb72193eee20 Mon Sep 17 00:00:00 2001 From: Ethan Stewart Date: Thu, 25 Jun 2026 17:48:31 -0500 Subject: [PATCH 1/3] [build] - Update manifest and clone_aomp.sh to support 7.13 sources A tag needs to be used for ROCgdb, rocm-systems and rocm-cmake. A small adjustment to clone_aomp.sh was needed so 'git pull' does not error out. --- bin/clone_aomp.sh | 15 +++++++++++---- manifests/aompi_23.0.xml | 21 ++++++--------------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/bin/clone_aomp.sh b/bin/clone_aomp.sh index 0df4f42470..fefddbbef9 100755 --- a/bin/clone_aomp.sh +++ b/bin/clone_aomp.sh @@ -54,10 +54,12 @@ if [ -d "$repodirname" ] ; then if [ "$STASH_BEFORE_PULL" == "YES" ] ; then git stash -u fi - echo "git pull " - if ! git pull && [ "$IGNORE_GIT_ERROR" != 1 ] ; then - echo "git pull failed for: $repodirname" - exit 1 + if [ "$sha_key_used" -eq 0 ] && [ "$tag_used" -eq 0 ]; then + echo "git pull " + if ! git pull && [ "$IGNORE_GIT_ERROR" != 1 ] ; then + echo "git pull failed for: $repodirname" + exit 1 + fi fi echo "cd $repodirname ; git checkout $COBRANCH" if ! git checkout "$COBRANCH" && [ "$IGNORE_GIT_ERROR" != 1 ] ; then @@ -256,6 +258,7 @@ if [[ "$AOMP_VERSION" == "13.1" ]] || [[ $AOMP_MAJOR_VERSION -gt 13 ]] ; then line_is_good=1 remote=$(echo "$line" | grep remote | cut -d"=" -f2) sha_key_used=0 + tag_used=0 COSHAKEY="" for field in $line; do if [[ "$field" =~ remote=\"([^\"]*)\" ]]; then @@ -276,6 +279,10 @@ if [[ "$AOMP_VERSION" == "13.1" ]] || [[ $AOMP_MAJOR_VERSION -gt 13 ]] ; then elif [[ "$field" =~ revision=\"([^\"]*)\" ]]; then COBRANCH=${BASH_REMATCH[1]} fi + if [[ "$field" =~ tag=\"true\" ]]; then + tag_used=1 + sha_key_used=0 + fi done reponame=$path repogitname=$name diff --git a/manifests/aompi_23.0.xml b/manifests/aompi_23.0.xml index 14b23d0363..656ab15466 100644 --- a/manifests/aompi_23.0.xml +++ b/manifests/aompi_23.0.xml @@ -1,12 +1,11 @@ - + - - + @@ -14,16 +13,8 @@ - - - - - - - - - - - - + + + + From fbd34148f8f6ca634160c29da8b38aa75dd24730 Mon Sep 17 00:00:00 2001 From: Ethan Stewart Date: Thu, 25 Jun 2026 23:38:21 -0500 Subject: [PATCH 2/3] [build] - Update patch control file for move to rocm-systems monorepo --- bin/aomp_common_vars | 11 ++++++----- bin/patches/patch-control-file_23.0.txt | 8 ++++---- bin/patches/rocr-runtime-numa.patch | 10 +++++----- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/bin/aomp_common_vars b/bin/aomp_common_vars index 9ae09efd26..e52daa4470 100644 --- a/bin/aomp_common_vars +++ b/bin/aomp_common_vars @@ -436,9 +436,10 @@ fi AOMP_REPO_NAME=${AOMP_REPO_NAME:-aomp} # These extra repositories are needed but we cannot update them +AOMP_ROCM_SYSTEMS_NAME=${AOMP_ROCM_SYSTEMS:-rocm-systems/projects} AOMP_ROCT_REPO_NAME=${AOMP_ROCT_REPO_NAME:-roct-thunk-interface} AOMP_ROCT_COMPONENT_NAME=${AOMP_ROCT_COMPONENT_NAME:-roct} -AOMP_ROCR_REPO_NAME=${AOMP_ROCR_REPO_NAME:-rocr-runtime} +AOMP_ROCR_REPO_NAME=${AOMP_ROCR_REPO_NAME:-${AOMP_ROCM_SYSTEMS}/rocr-runtime} AOMP_ROCR_COMPONENT_NAME=${AOMP_ROCR_COMPONENT_NAME:-rocr} AOMP_LIBDEVICE_REPO_NAME=${AOMP_LIBDEVICE_REPO_NAME:-device-libs} AOMP_LIBDEVICE_COMPONENT_NAME=${AOMP_LIBDEVICE_COMPONENT_NAME:-rocdl} @@ -450,10 +451,10 @@ AOMP_ROCMCMAKE_REPO_NAME=${AOMP_ROCMCMAKE_REPO_NAME:-rocm-cmake} # These are needed when AOMP_BUILD_DEBUG=1 AOMP_GDB_REPO_NAME=${AOMP_GDB_REPO_NAME:-ROCgdb} -AOMP_DBGAPI_REPO_NAME=${AOMP_DBGAPI_REPO_NAME:-ROCdbgapi} -AOMP_PROF_REPO_NAME=${AOMP_PROF_REPO_NAME:-rocprofiler} -AOMP_PROF_SDK_REPO_NAME=${AOMP_PROF_SDK_REPO_NAME:-rocprofiler-sdk} -AOMP_PROF_REGISTER_REPO_NAME=${AOMP_PROF_REGISTER_REPO_NAME:-rocprofiler-register} +AOMP_DBGAPI_REPO_NAME=${AOMP_DBGAPI_REPO_NAME:-${AOMP_ROCM_SYSTEMS}/ROCdbgapi} +AOMP_PROF_REPO_NAME=${AOMP_PROF_REPO_NAME:-${AOMP_ROCM_SYSTEMS}/rocprofiler} +AOMP_PROF_SDK_REPO_NAME=${AOMP_PROF_SDK_REPO_NAME:-${AOMP_ROCM_SYSTEMS}/rocprofiler-sdk} +AOMP_PROF_REGISTER_REPO_NAME=${AOMP_PROF_REGISTER_REPO_NAME:-${AOMP_ROCM_SYSTEMS}/rocprofiler-register} AOMP_TRACE_REPO_NAME=${AOMP_TRACE_REPO_NAME:-roctracer} # These are test repositories diff --git a/bin/patches/patch-control-file_23.0.txt b/bin/patches/patch-control-file_23.0.txt index 9bb9edd384..af86aeb4f0 100644 --- a/bin/patches/patch-control-file_23.0.txt +++ b/bin/patches/patch-control-file_23.0.txt @@ -3,12 +3,12 @@ RAJA: raja.patch RAJAPerf: rajaperf.patch GenASis: genasis.patch GenASiS_Basics: genasis_basics.patch -hipamd: hipamd-rpath.patch +hipamd: bolt: bolt.patch rocr-runtime: rocr-runtime-numa.patch -clr: clr-findamd-icd.patch clr-amd-comgr-find-package.patch -rocprofiler: rocprofiler-combined-no-aql-ok-fix-cov6.patch -rocprofiler-sdk: rocprofiler-sdk-otf2-url-fix.patch +clr: +rocprofiler: +rocprofiler-sdk: babelstream: babelstream-usm.patch llvm-project: ATD_ASO_full.patch UMT: umt.patch diff --git a/bin/patches/rocr-runtime-numa.patch b/bin/patches/rocr-runtime-numa.patch index cef5703248..d85c81e1ba 100644 --- a/bin/patches/rocr-runtime-numa.patch +++ b/bin/patches/rocr-runtime-numa.patch @@ -1,8 +1,8 @@ -diff --git a/runtime/hsa-runtime/CMakeLists.txt b/runtime/hsa-runtime/CMakeLists.txt -index cfcd3fba..cdc500bb 100644 ---- a/runtime/hsa-runtime/CMakeLists.txt -+++ b/runtime/hsa-runtime/CMakeLists.txt -@@ -335,7 +335,7 @@ if(${IMAGE_SUPPORT}) +diff --git a/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt b/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt +index bae0f4b3f1..4e370ec67e 100644 +--- a/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt ++++ b/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt +@@ -374,7 +374,7 @@ if(${IMAGE_SUPPORT}) endif() if (UNIX) From c86015d2b9edfd25bdbff2fc7b8bf5188ea77f09 Mon Sep 17 00:00:00 2001 From: Ethan Stewart Date: Fri, 26 Jun 2026 00:54:05 -0500 Subject: [PATCH 3/3] [build] - Update build scripts/aomp_common_vars for 7.13 sources --- bin/aomp_common_vars | 14 +++++++------- bin/build_amdsmi.sh | 2 +- bin/build_hipamd.sh | 8 ++++---- bin/build_project.sh | 8 -------- bin/build_rocm_smi_lib.sh | 2 +- bin/patches/rocr-runtime-numa.patch | 10 +++++----- 6 files changed, 18 insertions(+), 26 deletions(-) diff --git a/bin/aomp_common_vars b/bin/aomp_common_vars index e52daa4470..38ecabe4d4 100644 --- a/bin/aomp_common_vars +++ b/bin/aomp_common_vars @@ -436,25 +436,25 @@ fi AOMP_REPO_NAME=${AOMP_REPO_NAME:-aomp} # These extra repositories are needed but we cannot update them -AOMP_ROCM_SYSTEMS_NAME=${AOMP_ROCM_SYSTEMS:-rocm-systems/projects} +AOMP_ROCM_SYSTEMS_NAME=${AOMP_ROCM_SYSTEMS_NAME:-rocm-systems/projects} AOMP_ROCT_REPO_NAME=${AOMP_ROCT_REPO_NAME:-roct-thunk-interface} AOMP_ROCT_COMPONENT_NAME=${AOMP_ROCT_COMPONENT_NAME:-roct} -AOMP_ROCR_REPO_NAME=${AOMP_ROCR_REPO_NAME:-${AOMP_ROCM_SYSTEMS}/rocr-runtime} +AOMP_ROCR_REPO_NAME=${AOMP_ROCR_REPO_NAME:-${AOMP_ROCM_SYSTEMS_NAME}/rocr-runtime} AOMP_ROCR_COMPONENT_NAME=${AOMP_ROCR_COMPONENT_NAME:-rocr} AOMP_LIBDEVICE_REPO_NAME=${AOMP_LIBDEVICE_REPO_NAME:-device-libs} AOMP_LIBDEVICE_COMPONENT_NAME=${AOMP_LIBDEVICE_COMPONENT_NAME:-rocdl} DEVICELIBS_ROOT=${DEVICELIBS_ROOT:-$AOMP_REPOS/$AOMP_LIBDEVICE_REPO_NAME} AOMP_COMGR_REPO_NAME=${AOMP_COMGR_REPO_NAME:-comgr} -AOMP_RINFO_REPO_NAME=${AOMP_RINFO_REPO_NAME:-rocminfo} +AOMP_RINFO_REPO_NAME=${AOMP_RINFO_REPO_NAME:-${AOMP_ROCM_SYSTEMS_NAME}/rocminfo} AOMP_ROCMCMAKE_REPO_NAME=${AOMP_ROCMCMAKE_REPO_NAME:-rocm-cmake} # These are needed when AOMP_BUILD_DEBUG=1 AOMP_GDB_REPO_NAME=${AOMP_GDB_REPO_NAME:-ROCgdb} -AOMP_DBGAPI_REPO_NAME=${AOMP_DBGAPI_REPO_NAME:-${AOMP_ROCM_SYSTEMS}/ROCdbgapi} -AOMP_PROF_REPO_NAME=${AOMP_PROF_REPO_NAME:-${AOMP_ROCM_SYSTEMS}/rocprofiler} -AOMP_PROF_SDK_REPO_NAME=${AOMP_PROF_SDK_REPO_NAME:-${AOMP_ROCM_SYSTEMS}/rocprofiler-sdk} -AOMP_PROF_REGISTER_REPO_NAME=${AOMP_PROF_REGISTER_REPO_NAME:-${AOMP_ROCM_SYSTEMS}/rocprofiler-register} +AOMP_DBGAPI_REPO_NAME=${AOMP_DBGAPI_REPO_NAME:-${AOMP_ROCM_SYSTEMS_NAME}/rocdbgapi} +AOMP_PROF_REPO_NAME=${AOMP_PROF_REPO_NAME:-${AOMP_ROCM_SYSTEMS_NAME}/rocprofiler} +AOMP_PROF_SDK_REPO_NAME=${AOMP_PROF_SDK_REPO_NAME:-${AOMP_ROCM_SYSTEMS_NAME}/rocprofiler-sdk} +AOMP_PROF_REGISTER_REPO_NAME=${AOMP_PROF_REGISTER_REPO_NAME:-${AOMP_ROCM_SYSTEMS_NAME}/rocprofiler-register} AOMP_TRACE_REPO_NAME=${AOMP_TRACE_REPO_NAME:-roctracer} # These are test repositories diff --git a/bin/build_amdsmi.sh b/bin/build_amdsmi.sh index ffa078e5e3..9429c0d230 100755 --- a/bin/build_amdsmi.sh +++ b/bin/build_amdsmi.sh @@ -34,7 +34,7 @@ thisdir=$(dirname "$realpath") . "$thisdir/aomp_common_vars" # --- end standard header ---- -RSMILIB_REPO_DIR=$AOMP_REPOS/amdsmi +RSMILIB_REPO_DIR=$AOMP_REPOS/${AOMP_ROCM_SYSTEMS_NAME}/amdsmi BUILD_DIR=${BUILD_AOMP} diff --git a/bin/build_hipamd.sh b/bin/build_hipamd.sh index 0a0ae14d13..c0d4ec2ee9 100755 --- a/bin/build_hipamd.sh +++ b/bin/build_hipamd.sh @@ -33,10 +33,10 @@ thisdir=$(dirname "$realpath") . "$thisdir/aomp_common_vars" # --- end standard header ---- -export HIPAMD_DIR=$AOMP_REPOS/clr -export HIP_DIR=$AOMP_REPOS/hip -export ROCclr_DIR=$AOMP_REPOS/clr/rocclr -export OPENCL_DIR=$AOMP_REPOS/clr/opencl +export HIPAMD_DIR=$AOMP_REPOS/${AOMP_ROCM_SYSTEMS_NAME}/clr +export HIP_DIR=$AOMP_REPOS/${AOMP_ROCM_SYSTEMS_NAME}/hip +export ROCclr_DIR=$AOMP_REPOS/${AOMP_ROCM_SYSTEMS_NAME}/clr/rocclr +export OPENCL_DIR=$AOMP_REPOS/${AOMP_ROCM_SYSTEMS_NAME}/clr/opencl [[ ! -d $HIPAMD_DIR ]] && echo "ERROR: Missing $HIPAMD_DIR" && exit 1 [[ ! -d $HIP_DIR ]] && echo "ERROR: Missing $HIP_DIR" && exit 1 [[ ! -d $ROCclr_DIR ]] && echo "ERROR: Missing $ROCclr_DIR" && exit 1 diff --git a/bin/build_project.sh b/bin/build_project.sh index 2a1d086968..68252d2da3 100755 --- a/bin/build_project.sh +++ b/bin/build_project.sh @@ -21,11 +21,6 @@ INSTALL_PROJECT=${INSTALL_PROJECT:-$LLVM_INSTALL_LOC} WEBSITE="http\:\/\/github.com\/ROCm\/aomp" -# Check-openmp prep -# Patch rocr -ROCR_REPO_DIR=$AOMP_REPOS/$AOMP_ROCR_REPO_NAME -patchrepo "$ROCR_REPO_DIR" - # Patch llvm-project with ATD patch customized for amd-staging. # WARNING: This patch (ATD_ASO_full.patch) rarely applies cleanly # because of its size and constant trunk merges to amd-staging. @@ -129,8 +124,6 @@ MYCMAKEOPTS=(-DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DCLANG_LINK_CLANG_DYLIB=ON - -DLIBOMPTARGET_EXTERNAL_PROJECT_HSA_PATH="$AOMP_REPOS/$AOMP_ROCR_REPO_NAME" - -DOFFLOAD_EXTERNAL_PROJECT_UNIFIED_ROCR=On -DLIBOMPTARGET_EXTERNAL_PROJECT_ROCM_DEVICE_LIBS_PATH="$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/amd/device-libs" -DLLVM_EXTERNAL_PROJECTS=SPIRV_TRANSLATOR -DLLVM_EXTERNAL_SPIRV_TRANSLATOR_SOURCE_DIR="$AOMP_REPOS/SPIRV-LLVM-Translator" @@ -323,7 +316,6 @@ if [ "$1" == "install" ] ; then if [ "$AOMP_APPLY_ATD_AMD_STAGING_PATCH" == 1 ] ; then removepatch "$REPO_DIR" fi - removepatch "$ROCR_REPO_DIR" amd_compiler_symlinks=("amdclang" "amdclang++" "amdclang-cl" "amdclang-cpp" "amdflang" "amdlld") amd_compiler_cfg=("clang" "clang++" "clang-cpp" "clang-${AOMP_MAJOR_VERSION}" "clang-cl" "flang") diff --git a/bin/build_rocm_smi_lib.sh b/bin/build_rocm_smi_lib.sh index b074713b76..38b552a97b 100755 --- a/bin/build_rocm_smi_lib.sh +++ b/bin/build_rocm_smi_lib.sh @@ -34,7 +34,7 @@ thisdir=$(dirname "$realpath") . "$thisdir/aomp_common_vars" # --- end standard header ---- -RSMILIB_REPO_DIR=$AOMP_REPOS/rocm_smi_lib +RSMILIB_REPO_DIR=$AOMP_REPOS/${AOMP_ROCM_SYSTEMS_NAME}/rocm-smi-lib BUILD_DIR=${BUILD_AOMP} diff --git a/bin/patches/rocr-runtime-numa.patch b/bin/patches/rocr-runtime-numa.patch index d85c81e1ba..cef5703248 100644 --- a/bin/patches/rocr-runtime-numa.patch +++ b/bin/patches/rocr-runtime-numa.patch @@ -1,8 +1,8 @@ -diff --git a/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt b/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt -index bae0f4b3f1..4e370ec67e 100644 ---- a/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt -+++ b/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt -@@ -374,7 +374,7 @@ if(${IMAGE_SUPPORT}) +diff --git a/runtime/hsa-runtime/CMakeLists.txt b/runtime/hsa-runtime/CMakeLists.txt +index cfcd3fba..cdc500bb 100644 +--- a/runtime/hsa-runtime/CMakeLists.txt ++++ b/runtime/hsa-runtime/CMakeLists.txt +@@ -335,7 +335,7 @@ if(${IMAGE_SUPPORT}) endif() if (UNIX)