From 32e1925bd4fe209e06e145dfa127e1b2030d0911 Mon Sep 17 00:00:00 2001 From: dpalermo Date: Wed, 15 Jul 2026 14:41:26 -0500 Subject: [PATCH 1/3] [srock] SROCK_THEROCK_BRANCH change default to main (#2342) --- srock-bin/srock_common_vars | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/srock-bin/srock_common_vars b/srock-bin/srock_common_vars index c5b97072f..b17f4048b 100644 --- a/srock-bin/srock_common_vars +++ b/srock-bin/srock_common_vars @@ -84,7 +84,8 @@ SROCK_MAJOR_VERSION=${SROCK_VERSION%.*} # Set SROCK_COMPILER_BRANCH to develop to get a native TheRock build SROCK_COMPILER_BRANCH=${SROCK_COMPILER_BRANCH:-amd-staging} -SROCK_THEROCK_BRANCH=${SROCK_THEROCK_BRANCH:-compiler/amd-staging} +#SROCK_THEROCK_BRANCH=${SROCK_THEROCK_BRANCH:-compiler/amd-staging} +SROCK_THEROCK_BRANCH=${SROCK_THEROCK_BRANCH:-main} SROCK_CONFIG=${SROCK_CONFIG:-minimal} # Set default value for ROCm install directory SROCK_INSTALL_DIR. From 54059c2c5e0c440865ebfdc2bf75d27935f60cc7 Mon Sep 17 00:00:00 2001 From: dpalermo Date: Wed, 15 Jul 2026 14:42:59 -0500 Subject: [PATCH 2/3] [srock] Update _TheRock_00_compiler-srock.patch (#2341) --- .../patches/amd-staging/_TheRock_00_compiler-srock.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srock-bin/patches/amd-staging/_TheRock_00_compiler-srock.patch b/srock-bin/patches/amd-staging/_TheRock_00_compiler-srock.patch index d2c849e15..c19c95e65 100644 --- a/srock-bin/patches/amd-staging/_TheRock_00_compiler-srock.patch +++ b/srock-bin/patches/amd-staging/_TheRock_00_compiler-srock.patch @@ -1,10 +1,10 @@ diff --git a/compiler/CMakeLists.txt b/compiler/CMakeLists.txt -index bf625919..cdc6c493 100644 +index 7279cdbb3..103eb2332 100644 --- a/compiler/CMakeLists.txt +++ b/compiler/CMakeLists.txt -@@ -13,6 +13,10 @@ if(THEROCK_ENABLE_COMPILER) - if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - list(APPEND _extra_llvm_cmake_args "-DLLVM_ENABLE_PEDANTIC=OFF") +@@ -22,6 +22,10 @@ if(THEROCK_ENABLE_COMPILER) + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + list(APPEND _extra_llvm_cmake_args "-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON") endif() + if (DEFINED ENV{SROCK_VERSION_MOD}) + list(APPEND _extra_llvm_cmake_args "-DLLVM_VERSION_SUFFIX=_SROCK") From c034e2f699519e6a6269b3078e930de8cc81810b Mon Sep 17 00:00:00 2001 From: Dominik Adamski Date: Thu, 16 Jul 2026 21:59:23 +0200 Subject: [PATCH 3/3] [smoke-fort-dev] Add test which checks Flang-RT runtime (#2344) Test checks Flang-RT for the GPU code and it uses explicit mapping for the target region. --- .../device_intrinsics_map/Makefile | 18 +++++++ .../device_intrinsics_map.f90 | 48 +++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 test/smoke-fort-dev/device_intrinsics_map/Makefile create mode 100644 test/smoke-fort-dev/device_intrinsics_map/device_intrinsics_map.f90 diff --git a/test/smoke-fort-dev/device_intrinsics_map/Makefile b/test/smoke-fort-dev/device_intrinsics_map/Makefile new file mode 100644 index 000000000..baf06b793 --- /dev/null +++ b/test/smoke-fort-dev/device_intrinsics_map/Makefile @@ -0,0 +1,18 @@ +#NOOPT = 1 +#NOOMP = 1 +#OMP_FLAGS = -fopenmp +include ../../Makefile.defs + +TESTNAME = device_intrinsics_map +TESTSRC_MAIN = device_intrinsics_map.f90 +TESTSRC_AUX = +TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX) + +FLANG ?= flang +OMP_BIN = $(AOMP)/bin/$(FLANG) +CC = $(OMP_BIN) $(VERBOSE) +CFLAGS = $(FLANG_GPU_LINK_FLAGS) +#-ccc-print-phases +#"-\#\#\#" + +include ../Makefile.rules diff --git a/test/smoke-fort-dev/device_intrinsics_map/device_intrinsics_map.f90 b/test/smoke-fort-dev/device_intrinsics_map/device_intrinsics_map.f90 new file mode 100644 index 000000000..61c494744 --- /dev/null +++ b/test/smoke-fort-dev/device_intrinsics_map/device_intrinsics_map.f90 @@ -0,0 +1,48 @@ +! +!Copyright © Advanced Micro Devices, Inc., or its affiliates. +! +!SPDX-License-Identifier: MIT +! +module mod + implicit none +contains + subroutine assgn(a, ma, mi, ms) + implicit none + real, dimension(:), allocatable :: a + real :: ma, mi, ms + !$omp target map(tofrom: a,ma,mi,ms) + ma = maxval(a) + mi = minval(a) + ms = sum(a) + !$omp end target + end subroutine assgn +end module mod + +program device_intrinsics + use mod + implicit none + + integer, parameter :: n = 1024 + integer :: i + real, dimension(:), allocatable :: a + real, dimension(:), allocatable :: b + real :: ma, mi, ms + + allocate(a(n)) + allocate(b(n)) + + a = [( real(i),i=1,n )] + b = [( real(i),i=1,n )] + + !$omp target enter data map(to:a) map(alloc:ma,mi,ms) + call assgn(a, ma, mi, ms) + !$omp target exit data map(delete:a) map(from:ma,mi,ms) + + if (mi /= minval(b) .or. ma /= maxval(b) .or. ms /= sum(b)) then + print '(a)', 'ERROR' + stop 1 + end if + print '(a)', 'SUCCESS' + + deallocate(a) +end program device_intrinsics