diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 2cbffc123e..5e6c6e7ac6 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,3 +1,3 @@
-* @estewart08 @gregrodgers @ronlieb
+* @estewart08 @gregrodgers @ronlieb @zGoldthorpe @carlobertolli
/bin/rocmlibs/ @saiislam
diff --git a/.github/workflows/aomp-shell.yml b/.github/workflows/aomp-shell.yml
new file mode 100644
index 0000000000..f989b39404
--- /dev/null
+++ b/.github/workflows/aomp-shell.yml
@@ -0,0 +1,16 @@
+name: AOMP Lint
+
+on:
+ push:
+ pull_request:
+
+jobs:
+ aomp-lint:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+
+ - name: Run shellcheck
+ run: |
+ find . -name "*.sh" -exec shellcheck -S info {} +
diff --git a/.shellcheckrc b/.shellcheckrc
new file mode 100644
index 0000000000..ec6f4bb8bb
--- /dev/null
+++ b/.shellcheckrc
@@ -0,0 +1 @@
+disable=SC2016,SC2002,SC2004
diff --git a/Makefile b/Makefile
index 5783e6600a..dec3ac541e 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,6 @@ AOMP ?= $(HOME)/rocm/aomp
AOMP_REPOS = $(shell pwd)
all:
AOMP=$(AOMP) AOMP_REPOS=$(AOMP_REPOS) AOMP_APPLY_ROCM_PATCHES=0 TARBALL_INSTALL=1 $(AOMP_REPOS)/aomp/bin/build_prereq.sh
- AOMP=$(AOMP) AOMP_REPOS=$(AOMP_REPOS) AOMP_APPLY_ROCM_PATCHES=0 TARBALL_INSTALL=1 DISABLE_LLVM_TESTS=1 $(AOMP_REPOS)/aomp/bin/build_aomp.sh
+ AOMP=$(AOMP) AOMP_REPOS=$(AOMP_REPOS) AOMP_APPLY_ROCM_PATCHES=0 TARBALL_INSTALL=1 DISABLE_LLVM_TESTS=1 LIBC_INCLUDE_BENCHMARKS=0 $(AOMP_REPOS)/aomp/bin/build_aomp.sh
install:
@echo "Installation complete to $(AOMP)"
diff --git a/README.md b/README.md
index 64eabf8645..505ff916d0 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-AOMP - V 22.0-1
+AOMP - V 23.0-0
==============
This is README.md for https://github.com/ROCm/aomp.
@@ -8,8 +8,8 @@ This is the base repository for AOMP. Use this github repository for
documentation, and
[examples](https://github.com/ROCm/aomp/tree/master/examples).
-The last [release is AOMP 22.0-1](https://github.com/ROCm/aomp/releases).
-Currently AOMP 22.0-2 is under development.
+The last [release is AOMP 23.0-0](https://github.com/ROCm/aomp/releases).
+Currently AOMP 23.0-1 is under development.
Attention Users! Please use this repository for [issues](https://github.com/ROCm/aomp/issues).
Do not put issues in any of the source code repositories.
diff --git a/bin/README.md b/bin/README.md
index 893c409be4..2b5e3b3009 100644
--- a/bin/README.md
+++ b/bin/README.md
@@ -13,7 +13,7 @@ The AOMP compiler supports OpenMP, clang-hip, clang-cuda, device OpenCL, and the
The clone_aomp.sh script clones the necessary github repositories and the correct
-branches into subdirectories of $HOME/git/aomp22.0 (or $AOMP_REPOS if AOMP_REPOS is set).
+branches into subdirectories of $HOME/git/aomp23.0 (or $AOMP_REPOS if AOMP_REPOS is set).
The repositories and components needed by AOMP are shown in the following table.
The first column is the AOMP component name. The build_aomp.sh script invokes
each component build script with the name build_\.sh .
@@ -21,25 +21,25 @@ each component build script with the name build_\.sh .
| COMPONENT | DEV BRANCH | DEFAULT DIRECTORY LOCATION | REPOSITORY LINKS
| --------- | ---------- | -------------------------- | ----------------
-| (aomp) | aomp-dev | $HOME/git/aomp22.0/aomp | [aomp](https://github.com/ROCm/aomp) This repo!
-| project | amd-staging | $HOME/git/aomp22.0/llvm-project | [llvm-project](https://github.com/ROCm/llvm-project)
-| SPIRV-LLVM-Translator | amd-staging | $HOME/git/aomp22.0/SPIRV-LLVM-Translator | [SPIRV-LLVM-Translator](https://github.com/ROCm/SPIRV-LLVM-Translator)
-| hipify |amd-staging| $HOME/git/aomp22.0/hipify | [hipify](https://github.com/ROCm/hipify)
-| rocprofiler-register | Latest ROCm | $HOME/git/aomp22.0/rocprofiler-register | [rocprofiler-register](https://github.com/ROCm/rocprofiler-register)
-| openmp | amd-staging | $HOME/git/aomp22.0/llvm-project/openmp | [llvm-project/openmp](https://github.com/ROCm/llvm-project)
+| (aomp) | aomp-dev | $HOME/git/aomp23.0/aomp | [aomp](https://github.com/ROCm/aomp) This repo!
+| project | amd-staging | $HOME/git/aomp23.0/llvm-project | [llvm-project](https://github.com/ROCm/llvm-project)
+| SPIRV-LLVM-Translator | amd-staging | $HOME/git/aomp23.0/SPIRV-LLVM-Translator | [SPIRV-LLVM-Translator](https://github.com/ROCm/SPIRV-LLVM-Translator)
+| hipify |amd-staging| $HOME/git/aomp23.0/hipify | [hipify](https://github.com/ROCm/hipify)
+| rocprofiler-register | Latest ROCm | $HOME/git/aomp23.0/rocprofiler-register | [rocprofiler-register](https://github.com/ROCm/rocprofiler-register)
+| openmp | amd-staging | $HOME/git/aomp23.0/llvm-project/openmp | [llvm-project/openmp](https://github.com/ROCm/llvm-project)
|| | |
-| rocr |Latest ROCm| $HOME/git/aomp22.0/rocr-runtime | [rocr-runtime](https://github.com/ROCm/rocr-runtime)
-| hip |Latest ROCm| $HOME/git/aomp22.0/hip | [hipamd](https://github.com/ROCm/hip)
-| |Latest ROCm| $HOME/git/aomp22.0/hipcc | [hip](https://github.com/ROCm/hipcc)
-| |Latest ROCm| $HOME/git/aomp22.0/clr | [ROCclr](https://github.com/ROCm/clr)
-| |Latest ROCm| $HOME/git/aomp22.0/ROCm-OpenCL-Runtime | [ocl](https://github.com/ROCm/ROCm-OpenCL-Runtime)
-| comgr |Latest ROCm| $HOME/git/aomp22.0/rocm-compilersupport| [comgr](https://github.com/ROCm/rocm-compilersupport)
-| rocminfo |Latest ROCm| $HOME/git/aomp22.0/rocminfo | [rocminfo](https://github.com/ROCm/rocminfo)
-| rocdbgapi |Latest ROCm| $HOME/git/aomp22.0/ROCdbgapi | [rocdbgapi](https://github.com/ROCm/ROCdbgapi)
-| rocgdb |Latest ROCm| $HOME/git/aomp22.0/ROCgdb | [rocgdb](https://github.com/ROCm/ROCgdb)
-| roctracer |Latest ROCm| $HOME/git/aomp22.0/roctracer | [roctracer](https://github.com/ROCm/roctracer)
-| rocprofiler |Latest ROCm| $HOME/git/aomp22.0/rocprofiler | [rocprofiler](https://github.com/ROCm/rocprofiler)
-| rocprofiler-sdk |Latest ROCm| $HOME/git/aomp22.0/rocprofiler-sdk | [rocprofiler-sdk](https://github.com/ROCm/rocprofiler-sdk)
+| rocr |Latest ROCm| $HOME/git/aomp23.0/rocr-runtime | [rocr-runtime](https://github.com/ROCm/rocr-runtime)
+| hip |Latest ROCm| $HOME/git/aomp23.0/hip | [hipamd](https://github.com/ROCm/hip)
+| |Latest ROCm| $HOME/git/aomp23.0/hipcc | [hip](https://github.com/ROCm/hipcc)
+| |Latest ROCm| $HOME/git/aomp23.0/clr | [ROCclr](https://github.com/ROCm/clr)
+| |Latest ROCm| $HOME/git/aomp23.0/ROCm-OpenCL-Runtime | [ocl](https://github.com/ROCm/ROCm-OpenCL-Runtime)
+| comgr |Latest ROCm| $HOME/git/aomp23.0/rocm-compilersupport| [comgr](https://github.com/ROCm/rocm-compilersupport)
+| rocminfo |Latest ROCm| $HOME/git/aomp23.0/rocminfo | [rocminfo](https://github.com/ROCm/rocminfo)
+| rocdbgapi |Latest ROCm| $HOME/git/aomp23.0/ROCdbgapi | [rocdbgapi](https://github.com/ROCm/ROCdbgapi)
+| rocgdb |Latest ROCm| $HOME/git/aomp23.0/ROCgdb | [rocgdb](https://github.com/ROCm/ROCgdb)
+| roctracer |Latest ROCm| $HOME/git/aomp23.0/roctracer | [roctracer](https://github.com/ROCm/roctracer)
+| rocprofiler |Latest ROCm| $HOME/git/aomp23.0/rocprofiler | [rocprofiler](https://github.com/ROCm/rocprofiler)
+| rocprofiler-sdk |Latest ROCm| $HOME/git/aomp23.0/rocprofiler-sdk | [rocprofiler-sdk](https://github.com/ROCm/rocprofiler-sdk)
Notice that some components are built with different parts of the same repository.
@@ -67,10 +67,10 @@ These are some important environment variables and their default values.
| ENV VARIABLE | DEFAULT VALUE | DESCRIPTION
| ------------ | ------------- | -----------
| AOMP | $HOME/rocm/aomp | Directory symbolic link to where AOMP is installed and tested
-| AOMP_REPOS | $HOME/git/aomp22.0 | The base directory for all AOMP build repositories
+| AOMP_REPOS | $HOME/git/aomp23.0 | The base directory for all AOMP build repositories
| AOMP_STANDALONE_BUILD | 1 | Build all components, do NOT use installed ROCm
-| AOMP_VERSION | 22.0 | Clang version.
-| AOMP_VERSION_MOD | 2 | This implies the next release will be AOMP_22.0-2.
+| AOMP_VERSION | 23.0 | Clang version.
+| AOMP_VERSION_MOD | 1 | This implies the next release will be AOMP_23.0-1.
| AOMP_VERSION_STRING | $AOMP_VERSION-$AOMP_VERSION_MOD |
| AOMP_USE_NINJA | 0 | Use ninja instead of make to build certain components
| GFXLIST | gfx700 gfx701 gfx801 gfx803 | List of AMDGPU gpus to build for
@@ -88,7 +88,7 @@ Here is a sample of commands you might want to put into your .bashrc or .bash_pr
```
AOMP=/work/$USER/rocm/aomp
-AOMP_REPOS=/work/$USER/git/aomp22.0
+AOMP_REPOS=/work/$USER/git/aomp23.0
NVPTXGPUS=30,35,70
GFXLIST="gfx803 gfx906"
AOMP_USE_NINJA=1
@@ -115,15 +115,15 @@ For testing purposes, you will often change the value of AOMP when not testing y
AOMP build. For example, to test the latest packaged aomp release, set AOMP=/usr/lib/aomp.
To test against the ROCM installed compiler, set AOMP=/opt/rocm/lib/llvm. To test one of your
previous AOMP source builds, set AOMP to an older physical installation directory, such as
-AOMP=$HOME/rocm/aomp_22.0-1. BE CAREFUL! If you set AOMP for testing purposes,
+AOMP=$HOME/rocm/aomp_23.0-0. BE CAREFUL! If you set AOMP for testing purposes,
remember to set it back before rebuilding aomp from source.
## Quick Start to AOMP Development
To build and clone all components using the latest development sources, first clone aomp repo and checkout the aomp-dev branch as follows:
```
- mkdir $HOME/git/aomp22.0
- cd git/aomp22.0
+ mkdir $HOME/git/aomp23.0
+ cd git/aomp23.0
git clone https://github.com/ROCm/aomp.git aomp
cd aomp
git checkout aomp-dev
@@ -138,7 +138,7 @@ WARNING: The script clone_aomp.sh does not pull updates for this aomp repository
So please run "git pull" frequently to stay current with the aomp development team.
```
-cd $HOME/git/aomp22.0/aomp
+cd $HOME/git/aomp23.0/aomp
git pull
cd bin
./clone_aomp.sh
@@ -182,7 +182,7 @@ The only ROCm common component required by AOMP is the kernel kfd.
## Individual Component Builds
-This bin directory ($HOME/git/aomp22.0/aomp/bin) contains many component scripts to build and install AOMP from source. Here are some of the scripts contained in this direcotry
+This bin directory ($HOME/git/aomp23.0/aomp/bin) contains many component scripts to build and install AOMP from source. Here are some of the scripts contained in this direcotry
```
clone_aomp.sh - A script to make sure the necessary repos are up to date.
See list source repositories above.
@@ -209,7 +209,7 @@ create_release_tarball.sh - This builds an important release artifact
containing all sources.
```
To build aomp, run the master build script build_aomp.sh, or run the individual scripts in the order shown below.
-The build scripts with no arguments will build the component in the build directory $HOME/git/aomp22.0/build/\
+The build scripts with no arguments will build the component in the build directory $HOME/git/aomp23.0/build/\
(or $AOMP_REPOS/build/\ if AOMP_REPOS is set).
The component build scripts take a single positional argument with the value "install" or "nocmake".
The master build script build_aomp.sh will call the component build scripts in the following order and stop if
@@ -262,24 +262,24 @@ WARNING: When the build scripts are run with NO arguments (that is, you do not s
## The AOMP Install Location
The build scripts will build from the source directories identified by the environment variable AOMP_REPOS.
-The AOMP_REPOS default value is currently $HOME/git/aomp22.0.
+The AOMP_REPOS default value is currently $HOME/git/aomp23.0.
The out-of-source build directory for each component is $AOMP_REPOS/build/\.
The install location is defined by the $AOMP environment variable. The value of AOMP MUST be reserved as a symbolic link.
That is, the physical installation will be in directory name formed by concatonating the version string to the value of $AOMP.
The "build_project.sh install" script will make a symbolic link from the physical directory to the symbolic directory $AOMP.
The default value for AOMP is $HOME/rocm/aomp.
-For example, when building AOMP version 22.0-2 the install scripts will put all files and directories
-in $HOME/rocm/aomp_22.0-2 and create a symbolic link as follows:
+For example, when building AOMP version 23.0-0 the install scripts will put all files and directories
+in $HOME/rocm/aomp_23.0-0 and create a symbolic link as follows:
```
-ln -sf ${AOMP}_22.0-2 ${AOMP}
+ln -sf ${AOMP}_23.0-0 ${AOMP}
```
All testing for AOMP uses the environment variable AOMP to locate the installation. This makes it easy to switch between versions of AOMP for testing by simply changing the environment variable AOMP. You do NOT need to change the symbolic link.
-For example, if the aomp symbolic link currently points to aomp_22.0-2 and you want to test aomp_22.0-1, do this:
+For example, if the aomp symbolic link currently points to aomp_23.0-1 and you want to test aomp_22.0-2, do this:
```
-export AOMP=$HOME/rocm/aomp_22.0-1
+export AOMP=$HOME/rocm/aomp_23.0-0
```
The aomp package installs in /usr/lib/aomp_\ and symlinks /usr/lib/aomp to the versioned directory. To test the installed package, set AOMP to /usr/lib/aomp or /usr/lib/aomp_\.
diff --git a/bin/aomp-shellcheck b/bin/aomp-shellcheck
new file mode 100755
index 0000000000..d96582d49b
--- /dev/null
+++ b/bin/aomp-shellcheck
@@ -0,0 +1,146 @@
+#!/bin/bash
+#
+# aomp-shell-format: Run shellcheck and shfmt to cleanup aomp shell script.
+#
+# Process:
+# 1. RUn shellcheck --include $_fixByHand, fail if any found
+# 2. Run shellcheck --include $_patchable to generate patch
+# 3 Apply patch
+# 4. Run shellcheck --exclude $_alwaysExclude
+# if any fails then
+# return 1
+# proceed to update this aomp-shell-format utility by adding
+# falled codes to either _fixByHand, _patchable, or _alwaysExclude
+# else
+# return 0
+#
+
+# Join list of arguments using separator passed as first argument.
+# join ',' a b c
+# -> a,b,c
+join() {
+ local IFS=$1
+ shift
+ printf "%s" "$*"
+}
+
+_fixByHand=(SC2050 # Forgotten $ on variable
+ SC2046 # Quote to prevent word splitting
+ SC2291 # Quote repeated spaces
+ SC2181 # Check exit code directly not with $?
+ SC2236 # Use -n instead of ! -z
+ SC2086 # Double quote to prevent globbing and word splitting
+ SC2034 # Ignore unused vars
+ SC1083 # Accidentally literal braces
+ SC2076 # Regex syntax check
+ SC2038 # find -print0
+ SC2068) # Avoid re-splitting array expansion
+_fixByHandOpts=(--shell=bash --include="$(join ',' "${_fixByHand[@]}")")
+
+_patchable=(SC2164 # Use cd ... || exit
+ SC2006) # Use $(...) instead of legacy backticks
+_patchableOpts=(--shell=bash --include="$(join ',' "${_patchable[@]}")")
+
+_alwaysExclude=(SC2016 # Use double quote instead of single
+ SC2002 # Useless cat
+ SC2004) # '$' on arithmetic vars
+_alwaysExcludeOpts=(--shell=bash --exclude="$(join ',' "${_alwaysExclude[@]}")")
+
+_check_only=false
+
+if [ $1 == "--check-only" ]; then
+ _check_only=true
+ shift
+fi
+
+declare -a _shellfiles=( "$@" )
+_missing=0
+for _shellfile in "${_shellfiles[@]}"; do
+ if [ ! -f "$_shellfile" ]; then
+ (( _missing++ ))
+ fi
+done
+unset _shellfile
+
+if [ "${#_shellfiles[@]}" -eq 0 ] || [ "$_missing" -gt 0 ] ; then
+ echo "ERROR: please specify an existing input file as 1st argument"
+ exit 1
+fi
+
+_shellcheck_bin=$(which shellcheck)
+if [ "$_shellcheck_bin" == "" ] ; then
+ echo "ERROR: please install shellcheck"
+ exit 1
+fi
+
+echo
+echo "---- STEP 1 ---- Check for fixByHand fails -----"
+echo "$_shellcheck_bin -x ${_fixByHandOpts[*]} ${_shellfiles[*]}"
+
+$_shellcheck_bin -x "${_fixByHandOpts[@]}" "${_shellfiles[@]}"
+_rc=$?
+if [[ $_rc != 0 ]]; then
+ echo
+ echo "ERROR: shellcheck found errors that must be fixed by hand. rc=$_rc"
+ exit 1
+fi
+
+if $_check_only; then
+ echo
+ echo "---- STEP 2 ---- Check patchable fails -----"
+ echo "$_shellcheck_bin -x ${_patchableOpts[@]} ${_shellfiles[@]}"
+ $_shellcheck_bin -x "${_patchableOpts[@]}" "${_shellfiles[@]}"
+
+ echo
+ echo "---- STEP 3 ---- (Skipping for --check-only)"
+else
+ echo
+ echo "---- STEP 2 ---- Check and repair patchable fails -----"
+
+ _patchfile=/tmp/patchfile$$
+
+ if ! touch "$_patchfile"; then
+ echo "ERROR: Could not create or update $_patchfile"
+ exit 1
+ fi
+
+ echo "$_shellcheck_bin -x ${_patchableOpts[*]} -f diff ${_shellfiles[*]} \>$_patchfile"
+ $_shellcheck_bin -x "${_patchableOpts[@]}" -f diff "${_shellfiles[@]}" >$_patchfile
+
+ if ! patch -p1 --dry-run <"$_patchfile"; then
+ echo "ERROR: Could not dryrun patch in $_patchfile to file ${_shellfiles[*]}"
+ exit 1
+ fi
+ echo
+ echo "---- STEP 3 ---- Applying patch $_patchfile to ${_shellfiles[*]}"
+ patch -p1 <"$_patchfile"
+ echo "rm $_patchfile"
+ rm "$_patchfile" # patch should work because of dryrun test above
+fi
+
+echo
+echo "---- STEP 4 ---- Test for codes not handled in $0"
+if $_check_only; then
+ # A non-check-only run would avoid triggering the patchable checks again
+ # in this invocation. Mask them out for a check-only run.
+ _excludeOpts=(--shell=bash --exclude="$(join ',' "${_alwaysExclude[@]}" "${_patchable[@]}")")
+ echo "$_shellcheck_bin -x ${_excludeOpts[*]} ${_shellfiles[*]}"
+ $_shellcheck_bin -x "${_excludeOpts[@]}" "${_shellfiles[@]}"
+ _rc=$?
+else
+ echo "$_shellcheck_bin -x ${_alwaysExcludeOpts[*]} ${_shellfiles[*]}"
+ $_shellcheck_bin -x "${_alwaysExcludeOpts[@]}" "${_shellfiles[@]}"
+ _rc=$?
+fi
+if [ $_rc != 0 ] ; then
+ echo
+ echo "ERROR: shellcheck found codes not yet handled, must fix $0"
+ exit $_rc
+fi
+echo
+if [ "${#_shellfiles[@]}" -eq 1 ]; then
+ echo "DONE: script ${_shellfiles[*]} is clean"
+else
+ echo "DONE: scripts $(join ',' ${_shellfiles[@]}) are clean"
+fi
+exit 0
diff --git a/bin/aomp_common_vars b/bin/aomp_common_vars
index d683c746b2..9ae09efd26 100644
--- a/bin/aomp_common_vars
+++ b/bin/aomp_common_vars
@@ -28,8 +28,8 @@ AOMP_COMPILER_NAME=${AOMP_COMPILER_NAME:-AOMP}
ROCM_VERSION=${ROCM_VERSION:-6.4.0}
# Set the AOMP VERSION STRING
-AOMP_VERSION=${AOMP_VERSION:-"22.0"}
-AOMP_VERSION_MOD=${AOMP_VERSION_MOD:-"2"}
+AOMP_VERSION=${AOMP_VERSION:-"23.0"}
+AOMP_VERSION_MOD=${AOMP_VERSION_MOD:-"1"}
AOMP_VERSION_STRING=${AOMP_VERSION_STRING:-"$AOMP_VERSION-$AOMP_VERSION_MOD"}
ROCM_EXPECTED_MODVERSION=${ROCM_EXPECTED_MODVERSION:-6.2.4}
export AOMP_VERSION_STRING AOMP_VERSION AOMP_VERSION_MOD ROCM_VERSION ROCM_EXPECTED_MODVERSION
@@ -40,13 +40,13 @@ AOMP=${AOMP:-$HOME/rocm/aomp}
AOMP_INSTALL_DIR=${AOMP}_${AOMP_VERSION_STRING}
GPURUN_BINDIR=${GPURUN_BINDIR:-$AOMP/bin}
-if [ ! -f "$GPURUN_BINDIR/gpurun" ] || [ ! -f "$GPURUN_BINDIR/rocminfo" ] ; then
+if [ ! -f "$GPURUN_BINDIR/gpurun" ] ; then
# When using trunk, try to find gpurun and rocminfo in ROCm
_SILENT=""
GPURUN_BINDIR=/opt/rocm/llvm/bin
- export ROCMINFO_BINARY=/opt/rocm/bin/rocminfo
-else
- export ROCMINFO_BINARY=$GPURUN_BINDIR/rocminfo
+fi
+if [ ! -f "$AOMP/bin/rocminfo" ] ; then
+ export ROCMINFO_BINARY=/opt/rocm/bin/rocminfo
fi
# For example, if AOMP_REPOS=$HOME/git/aomp11, then the primary aomp repo
diff --git a/bin/build_aomp.sh b/bin/build_aomp.sh
index 94660c9052..650fd0a32e 100755
--- a/bin/build_aomp.sh
+++ b/bin/build_aomp.sh
@@ -98,7 +98,7 @@ echo
components="$AOMP_COMPONENT_LIST"
if [ "$AOMP_STANDALONE_BUILD" == 1 ] ; then
- components="$components rocprofiler-register rocr openmp offload extras comgr rocminfo rocm_smi_lib amdsmi"
+ components="$components rocprofiler-register rocr llvm_runtimes_standalone offload extras comgr rocminfo rocm_smi_lib amdsmi"
_hostarch=$(uname -m)
# The rocclr architecture is very x86 centric so it will not build on ppc64. Without
# rocclr, we have no HIP or OpenCL for ppc64 :-( However, rocr works for ppc64 so AOMP works.
@@ -132,10 +132,7 @@ else
# libdevice, project, comgr, rocminfo, hipamd, rocdbgapi, rocgdb,
# roctracer, rocprofiler, rocm_smi_lib, and amdsmi should be found
# in ROCM in /opt/rocm. The ROCM build only needs these components:
- components="extras openmp"
- if [ -f "$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/offload/CMakeLists.txt" ]; then
- components="$components offload"
- fi
+ components="llvm_runtimes_standalone offload"
if [ "$AOMP_SKIP_FLANG" == 0 ] ; then
if [ "$SANITIZER" == 1 ] && [ -f "$AOMP/bin/flang-classic" ] ; then
components="$components pgmath flang flang_runtime"
diff --git a/bin/build_aomp_docker_release.sh b/bin/build_aomp_docker_release.sh
index 00d54f6261..75c8af12f7 100755
--- a/bin/build_aomp_docker_release.sh
+++ b/bin/build_aomp_docker_release.sh
@@ -10,8 +10,8 @@
set -e
set -x
-AOMP_VERSION_STRING=${AOMP_VERSION_STRING:-22.0-2}
-AOMP_VERSION=${AOMP_VERSION:-22.0}
+AOMP_VERSION_STRING=${AOMP_VERSION_STRING:-23.0-0}
+AOMP_VERSION=${AOMP_VERSION:-23.0}
#DOCKERX_HOST=${DOCKERX_HOST:-$HOME/dockerx}
DOCKERX_HOST=$HOME/dockerx
#DOCKERX=${DOCKERX:-/dockerx}
@@ -60,7 +60,8 @@ fi
pip_install="python3 -m pip install CppHeaderParser argparse wheel lit lxml barectf pandas"
pip_install_centos7="python3.8 -m pip install CppHeaderParser argparse wheel lit lxml barectf pandas"
-pip_install_sles15="python3.8 -m pip install CppHeaderParser argparse wheel lit lxml barectf pandas"
+pip_install_sles15="python3.10 -m pip install --ignore-installed --no-cache-dir barectf==3.1.2 PyYAML==5.3.1; python3.10 -m pip install CppHeaderParser argparse wheel lit lxml pandas"
+pip_install_rhel8="python3.10 -m pip install --ignore-installed --no-cache-dir barectf==3.1.2 PyYAML==5.3.1; python3.10 -m pip install CppHeaderParser argparse wheel lit lxml pandas"
# 22.04 workaround for cython/PyYAML bug.
pip_install_2204="python3 -m pip install --ignore-installed --no-cache-dir barectf==3.1.2 PyYAML==5.3.1; python3 -m pip install CppHeaderParser argparse wheel lit lxml pandas"
@@ -84,7 +85,7 @@ prereq_array["centos8"]="yum install -y dnf-plugins-core && yum config-manager -
prereq_array["centos9"]="yum install -y dnf-plugins-core gcc-c++ git cmake wget vim openssl-devel elfutils-libelf-devel pciutils-devel numactl-devel libffi-devel mesa-libGL-devel libtool texinfo bison flex ncurses-devel expat-devel xz-devel libbabeltrace-devel gmp-devel rpm-build rsync systemd-devel gtest-devel ccache mpfr-devel ocl-icd-devel sqlite-devel && $pip_install"
-prereq_array["rhel8"]="yum update -y && yum install -y dnf-plugins-core && yum install -y gcc-c++ git cmake wget vim openssl-devel elfutils-libelf-devel pciutils-devel numactl-devel libffi-devel mesa-libGL-devel libtool texinfo bison flex ncurses-devel expat-devel xz-devel libbabeltrace-devel gmp-devel rpm-build rsync systemd-devel gtest-devel elfutils-devel ccache python38 python38-devel mpfr-devel ocl-icd-devel libatomic libquadmath-devel msgpack-devel fmt-devel sqlite-devel && $pip_install"
+prereq_array["rhel8"]="yum update -y && yum install -y dnf-plugins-core && yum install -y gcc-c++ git cmake wget vim openssl-devel elfutils-libelf-devel pciutils-devel numactl-devel libffi-devel mesa-libGL-devel libtool texinfo bison flex ncurses-devel expat-devel xz-devel libbabeltrace-devel gmp-devel rpm-build rsync systemd-devel gtest-devel elfutils-devel ccache python38 python38-devel mpfr-devel ocl-icd-devel libatomic libquadmath-devel msgpack-devel fmt-devel sqlite-devel && $pip_install_rhel8"
prereq_array["rhel9"]="dnf -y update && dnf -y install dnf-plugins-core && dnf -y install gdb gcc-c++ git cmake wget vim openssl-devel elfutils-libelf-devel pciutils-devel numactl-devel libffi-devel mesa-libGL-devel libtool texinfo bison flex ncurses-devel expat-devel xz-devel libbabeltrace-devel gmp-devel rpm-build rsync systemd-devel gtest-devel elfutils-devel ccache python3-devel mpfr-devel ocl-icd-devel libatomic libquadmath-devel msgpack-devel fmt-devel sqlite-devel && $pip_install"
@@ -93,7 +94,7 @@ prereq_array["alma8"]="dnf -y update && dnf -y install gdb gcc-c++ git cmake wge
prereq_array["sles15"]="zypper install -y which cmake wget vim libopenssl-devel elfutils libelf-devel git pciutils-devel libffi-devel gcc gcc-c++ libnuma-devel openmpi4-devel Mesa-libGL-devel libquadmath0 libtool texinfo bison flex babeltrace-devel makeinfo libexpat-devel xz-devel gmp-devel rpm-build rsync libdrm-devel libX11-devel systemd-devel libdw-devel hwdata unzip ccache mpfr-devel ocl-icd-devel msgpack-devel fmt-devel gcc13-fortran ncurses-devel sqlite-devel gcc13-c++ gcc13 libstdc++6-devel-gcc13 libc++-devel"
# Some prep
-default_os="ubuntu2404 ubuntu2204 rhel8 rhel9 sles15"
+default_os="ubuntu2404 ubuntu2204 rhel8 rhel9 sles15 alma8"
OS=${OS:-$default_os}
export DOCKER_HOME=/home/release; export DOCKER_AOMP=/usr/lib/aomp; export DOCKER_AOMP_REPOS=/home/release/git/aomp$AOMP_VERSION
exports="export HOME=/home/release; export AOMP=/usr/lib/aomp; export AOMP_REPOS=/home/release/git/aomp$AOMP_VERSION; export AOMP_EXTERNAL_MANIFEST=1; export AOMP_JOB_THREADS=128; export AOMP_SKIP_FLANG_NEW=0"
@@ -105,9 +106,12 @@ function getcontainer(){
}
function setup(){
- if [ "$system" == "centos7" ] || [ "$system" == "sles15" ] || [ "$system" == "alma8" ]; then
+ if [ "$system" == "centos7" ] || [ "$system" == "sles15" ] || [ "$system" == "rhel8" ]; then
exports="$exports; export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH; PATH=/usr/local/bin:$PATH"
fi
+ if [ "$system" == "alma8" ]; then
+ exports="$exports; export LD_LIBRARY_PATH=/opt/Python-3.10.18/lib:/opt/rh/gcc-toolset-12/root/usr/lib64:/opt/rh/gcc-toolset-12/root/usr/lib:/opt/rh/gcc-toolset-14/root/usr/lib64:/opt/rh/gcc-toolset-14/root/usr/lib:/opt/rh/gcc-toolset-14/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-14/root/usr/lib/dyninst; export PATH=/opt/Python-3.10.18/bin:/opt/rh/gcc-toolset-12/root/usr/bin:/usr/share/Modules/bin:/opt/rh/gcc-toolset-14/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin; export LIBRARY_PATH=/opt/Python-3.10.18/lib"
+ fi
# Pull docker and start
docker pull "${url_array[$system]}"
@@ -115,9 +119,6 @@ function setup(){
getcontainer
docker exec -i "$docker_name" /bin/bash -c "mkdir -p /home/release/git/aomp$AOMP_VERSION"
- if [ "$system" == "alma8" ]; then
- docker exec -i "$docker_name" /bin/bash -c "mv /usr/local/bin/python3.11 /usr/local/bin/python3.11-save; mv /usr/local/bin/python3.12 /usr/local/bin/python3.12-save; rm -f /usr/bin/python3"
- fi
if [ "$system" == "centos7" ]; then
# Support for centos7 has reached EOL. Many of the repos no longer use the mirror list url and need switched to baseurl with vault url.
docker exec -i "$docker_name" /bin/bash -c "sed -i 's/mirrorlist=/#mirrorlist=/g' /etc/yum.repos.d/CentOS-*.repo; sed -i 's/#\s*baseurl=/baseurl=/g' /etc/yum.repos.d/CentOS-*.repo; sed -i 's/mirror\./vault\./g' /etc/yum.repos.d/CentOS-*.repo"
@@ -170,11 +171,13 @@ function setup(){
fi
if [ "$system" == "alma8" ]; then
exports="$exports; source /opt/rh/gcc-toolset-12/enable"
- docker exec -i "$docker_name" /bin/bash -c "$exports; cd /home/release; wget https://www.python.org/ftp/python/3.10.18/Python-3.10.18.tgz; tar xf Python-3.10.18.tgz; cd Python-3.10.18; ./configure --enable-optimizations --enable-shared; make altinstall; ln -s /usr/local/bin/python3.10 /usr/bin/python3; $pip_install_alma"
+ docker exec -i "$docker_name" /bin/bash -c "$exports; cd /home/release; wget https://www.python.org/ftp/python/3.10.18/Python-3.10.18.tgz; tar xf Python-3.10.18.tgz; cd Python-3.10.18; ./configure --enable-optimizations --enable-shared --prefix=/opt/Python-3.10.18; make altinstall; ln -s /opt/Python-3.10.18/bin/python3.10 /opt/Python-3.10.18/bin/python3; $pip_install_alma"
+ # Install libffi from source so that we can use libffi.a to help with portability.
+ docker exec -i "$docker_name" /bin/bash -c "$exports; cd /tmp && wget ftp://sourceware.org/pub/libffi/libffi-3.1.tar.gz && tar -xvf libffi-3.1.tar.gz && cd libffi-3.1 && CFLAGS="-fPIC" ./configure --prefix=/usr/local && make && make install && cd .. && rm -rf libffi-3.1 libffi-3.1.tar.gz"
fi
if [ "$system" == "sles15" ]; then
- docker exec -i "$docker_name" /bin/bash -c "$exports; cd /home/release; wget https://www.python.org/ftp/python/3.8.13/Python-3.8.13.tgz; tar xf Python-3.8.13.tgz; cd Python-3.8.13; ./configure --enable-optimizations --enable-shared; make altinstall; rm /usr/bin/python3; ln -s /usr/local/bin/python3.8 /usr/bin/python3; $pip_install_sles15"
+ docker exec -i "$docker_name" /bin/bash -c "$exports; cd /home/release; wget https://www.python.org/ftp/python/3.10.12/Python-3.10.12.tgz; tar xf Python-3.10.12.tgz; cd Python-3.10.12; ./configure --enable-optimizations --enable-shared; make altinstall; rm /usr/bin/python3; ln -s /usr/local/bin/python3.10 /usr/bin/python3; $pip_install_sles15"
docker exec -i "$docker_name" /bin/bash -c "update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 10"
docker exec -i "$docker_name" /bin/bash -c "update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 10"
docker exec -i "$docker_name" /bin/bash -c "update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 10"
@@ -182,6 +185,9 @@ function setup(){
docker exec -i "$docker_name" /bin/bash -c "update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 10"
docker exec -i "$docker_name" /bin/bash -c "update-alternatives --set c++ /usr/bin/g++"
fi
+ if [ "$system" == "rhel8" ]; then
+ docker exec -i "$docker_name" /bin/bash -c "$exports; cd /home/release; wget https://www.python.org/ftp/python/3.10.12/Python-3.10.12.tgz; tar xf Python-3.10.12.tgz; cd Python-3.10.12; ./configure --enable-optimizations --enable-shared; make altinstall; rm /usr/bin/python3; ln -s /usr/local/bin/python3.10 /usr/bin/python3; $pip_install_sles15"
+ fi
# Run build_prerequisites.sh to build cmake, hwloc, rocmsmi, etc
docker exec -i "$docker_name" /bin/bash -c "$exports; cd $DOCKER_AOMP_REPOS; git clone -b aomp-$AOMP_VERSION_STRING https://github.com/ROCm/aomp; cd aomp/bin; ./build_prereq.sh 2>&1 | tee $DOCKER_HOME/logs/$system-prereq.out"
@@ -197,6 +203,12 @@ function build(){
if [ "$system" == "ubuntu2404" ]; then
exports="$exports; PATH=/opt/venv/bin:$PATH; python3 -m venv /opt/venv"
fi
+ if [ "$system" == "centos7" ] || [ "$system" == "sles15" ]; then
+ exports="$exports; export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH; PATH=/usr/local/bin:$PATH"
+ fi
+ if [ "$system" == "alma8" ]; then
+ exports="$exports; source /opt/rh/gcc-toolset-12/enable; export LD_LIBRARY_PATH=/opt/Python-3.10.18/lib:/opt/rh/gcc-toolset-12/root/usr/lib64:/opt/rh/gcc-toolset-12/root/usr/lib:/opt/rh/gcc-toolset-14/root/usr/lib64:/opt/rh/gcc-toolset-14/root/usr/lib:/opt/rh/gcc-toolset-14/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-14/root/usr/lib/dyninst; export PATH=/opt/Python-3.10.18/bin:/opt/rh/gcc-toolset-12/root/usr/bin:/usr/share/Modules/bin:/opt/rh/gcc-toolset-14/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin; export LIBRARY_PATH=/opt/Python-3.10.18/lib"
+ fi
docker exec -i "$docker_name" /bin/bash -c "$exports; cd $DOCKER_AOMP_REPOS/aomp/bin; ./build_aomp.sh 2>&1 | tee $DOCKER_HOME/logs/$system-build.out"
docker exec -i "$docker_name" /bin/bash -c "$exports; cd $DOCKER_AOMP_REPOS/aomp/bin; AOMP=/usr/lib/aomp/llvm ./build_llvm-flang-rt-host-dev.sh 2>&1 | tee -a $DOCKER_HOME/logs/$system-build.out"
if [ "$AOMP_HIP_LIBRARIES" == "1" ]; then
@@ -226,14 +238,20 @@ function package(){
if [ "$system" == "centos7" ]; then
docker exec -i "$docker_name" /bin/bash -c "$exports; cd $DOCKER_AOMP_REPOS/aomp/bin; ./build_fixups.sh; DOCKER=1 ./build-rpm.sh aomp_CENTOS_7 2>&1 | tee $DOCKER_HOME/logs/$system-package.out"
else
- docker exec -i "$docker_name" /bin/bash -c "$exports; cd $DOCKER_AOMP_REPOS/aomp/bin; ./build_fixups.sh; DOCKER=1 ./build-rpm.sh 2>&1 | tee $DOCKER_HOME/logs/$system-package.out"
- # Copy to host
- docker cp "$container:/tmp/home/rpmbuild/RPMS/x86_64/." "$host_packages"
- # Build aomp-hip-libraries rpm
- if [ "$AOMP_HIP_LIBRARIES" == "1" ]; then
- docker exec -i "$docker_name" /bin/bash -c "$exports; cd $DOCKER_AOMP_REPOS/aomp/bin; ./build_fixups.sh; DOCKER=1 ./build-rpm.sh aomp-hip-libraries 2>&1 | tee $DOCKER_HOME/logs/$system-package-hip-libraries.out"
+ if [ "$OS" == "alma8" ]; then
+ docker exec -i "$docker_name" /bin/bash -c "$exports; cd $DOCKER_AOMP_REPOS/aomp/bin; ./build_fixups.sh; ./package_release_tarball.sh 2>&1 | tee $DOCKER_HOME/logs/$system-package.out"
+ # Copy to host
+ docker cp "$container:$DOCKER_AOMP_REPOS/../aomp-$AOMP_VERSION_STRING.tar.gz" "$host_packages"
+ else
+ docker exec -i "$docker_name" /bin/bash -c "$exports; cd $DOCKER_AOMP_REPOS/aomp/bin; ./build_fixups.sh; DOCKER=1 ./build-rpm.sh 2>&1 | tee $DOCKER_HOME/logs/$system-package.out"
# Copy to host
docker cp "$container:/tmp/home/rpmbuild/RPMS/x86_64/." "$host_packages"
+ # Build aomp-hip-libraries rpm
+ if [ "$AOMP_HIP_LIBRARIES" == "1" ]; then
+ docker exec -i "$docker_name" /bin/bash -c "$exports; cd $DOCKER_AOMP_REPOS/aomp/bin; ./build_fixups.sh; DOCKER=1 ./build-rpm.sh aomp-hip-libraries 2>&1 | tee $DOCKER_HOME/logs/$system-package-hip-libraries.out"
+ # Copy to host
+ docker cp "$container:/tmp/home/rpmbuild/RPMS/x86_64/." "$host_packages"
+ fi
fi
fi
fi
diff --git a/bin/build_llvm-flang-rt-host-dev.sh b/bin/build_llvm-flang-rt-host-dev.sh
index 6881de23cf..7889872cb2 100755
--- a/bin/build_llvm-flang-rt-host-dev.sh
+++ b/bin/build_llvm-flang-rt-host-dev.sh
@@ -1,10 +1,5 @@
#!/bin/bash
#
-#Copyright © Advanced Micro Devices, Inc., or its affiliates.
-#
-#SPDX-License-Identifier: MIT
-#
-#
# build_llvm-flang-rt-host-dev.sh
#
# Standalone script to build the flang runtime with host-device support
@@ -23,6 +18,10 @@ thisdir=$(dirname "$realpath")
. "$thisdir/aomp_common_vars"
# --- end standard header ----
+# for TheRock to override with amd-llvm
+export AOMP_NAME_LLVM_PROJECT=${AOMP_NAME_LLVM_PROJECT:-llvm-project}
+export BUILD_AOMP_SUBDIR=${BUILD_AOMP_SUBDIR:-build/llvm-project}
+
echo "-----------------------------------------------------------------------------"
echo "Building flang-runtime for device"
echo "AOMP = $AOMP"
@@ -56,7 +55,7 @@ if [ ! -x "$CMAKE_CXX_COMPILER" ]; then
exit 0
fi
-BUILD_DIR=$BUILD_AOMP/build/llvm-project
+BUILD_DIR=$BUILD_AOMP/$BUILD_AOMP_SUBDIR
BUILD_DIR_FRT=$BUILD_AOMP/build/flang-runtime/flang-rt/lib
OMPRUNTIME_DIR=$BUILD_DIR/runtimes/runtimes-bins/openmp/runtime/src
INSTALL_DIR=${INSTALL_DIR:-$AOMP}
@@ -108,7 +107,8 @@ ${AOMP_CMAKE} "${AOMP_SET_NINJA_GEN[@]}" $CM_BUILD_TYPE \
-DCMAKE_CXX_COMPILER="$CMAKE_CXX_COMPILER" \
-DFLANG_RT_DEVICE_ARCHITECTURES="$ARCH_LIST" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
- "$AOMP_REPOS/llvm-project/runtimes"
+ -DFLANG_RT_EMBED_GPU_LLVM_IR=OFF \
+ "$AOMP_REPOS/$AOMP_NAME_LLVM_PROJECT/runtimes"
$AOMP_NINJA_BIN --version
$AOMP_NINJA_BIN -j "$AOMP_JOB_THREADS" flang-rt
diff --git a/bin/build_llvm_runtimes_standalone.sh b/bin/build_llvm_runtimes_standalone.sh
new file mode 100755
index 0000000000..3346b57b24
--- /dev/null
+++ b/bin/build_llvm_runtimes_standalone.sh
@@ -0,0 +1,533 @@
+#!/bin/bash
+#
+# build_llvm_runtimes_standalone.sh: Script to build the AOMP runtime libraries and debug libraries.
+# This script will install in location defined by AOMP env variable
+#
+
+# --- Start standard header to set AOMP environment variables ----
+realpath=$(realpath "$0")
+thisdir=$(dirname "$realpath")
+. "$thisdir/aomp_common_vars"
+# --- end standard header ----
+
+if [ "$1" == "-h" ] || [ "$1" == "help" ] || [ "$1" == "-help" ] ; then
+ help_build_aomp
+fi
+
+REPO_DIR=$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME
+_ompd_src_dir="$LLVM_INSTALL_LOC/share/gdb/python/ompd/src"
+OPENMP_BUILD_DEVICERTL=${OPENMP_BUILD_DEVICERTL:-0}
+RUNTIMES_BUILD_DIR=${RUNTIMES_BUILD_DIR:-"llvm_runtimes_standalone"}
+
+if [ "$AOMP_BUILD_CUDA" == 1 ] ; then
+ CUDAH=$(find "$CUDAT" -type f,l -name "cuda.h" 2>/dev/null)
+ if [ "$CUDAH" == "" ] ; then
+ CUDAH=$(find "$CUDAINCLUDE" -type f,l -name "cuda.h" 2>/dev/null)
+ fi
+ if [ "$CUDAH" == "" ] ; then
+ echo
+ echo "ERROR: THE cuda.h FILE WAS NOT FOUND WITH ARCH $AOMP_PROC"
+ echo " A CUDA installation is necessary to build libomptarget deviceRTLs"
+ echo " Please install CUDA to build llvm_runtimes_standalone"
+ echo
+ exit 1
+ fi
+ # I don't see now nvcc is called, but this eliminates the deprecated warnings
+ export CUDAFE_FLAGS="-w"
+fi
+
+if [ ! -d "$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME" ] ; then
+ echo "ERROR: Missing repository $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME "
+ echo " Consider setting env variables AOMP_REPOS and/or AOMP_PROJECT_REPO_NAME "
+ exit 1
+fi
+
+check_writable_installdir "$1" "$LLVM_INSTALL_LOC"
+
+if [ "$AOMP_BUILD_CUDA" == 1 ] ; then
+ if [ -f "$CUDABIN/nvcc" ] ; then
+ CUDAVER=$("$CUDABIN"/nvcc --version | grep compilation | cut -d" " -f5 | cut -d"." -f1)
+ echo "CUDA VERSION IS $CUDAVER"
+ fi
+fi
+
+if [ "$AOMP_USE_NINJA" == 0 ] ; then
+ AOMP_SET_NINJA_GEN=()
+else
+ AOMP_SET_NINJA_GEN=(-G Ninja)
+fi
+
+export LLVM_DIR=$AOMP_INSTALL_DIR
+GFXSEMICOLONS=$(echo "$GFXLIST" | tr ' ' ';')
+ALTAOMP=${ALTAOMP:-$LLVM_INSTALL_LOC}
+
+LLVM_VERSION_MAJOR=$("${LLVM_INSTALL_LOC}"/bin/clang --version | grep -oP '(?<=clang version )[0-9]+')
+
+declare -a COMMON_CMAKE_OPTS
+
+COMMON_CMAKE_OPTS=("${AOMP_SET_NINJA_GEN[@]}" -DOPENMP_ENABLE_LIBOMPTARGET=1
+ -DCMAKE_INSTALL_PREFIX="$LLVM_INSTALL_LOC"
+ -DOPENMP_TEST_C_COMPILER="$LLVM_INSTALL_LOC/bin/clang"
+ -DOPENMP_TEST_CXX_COMPILER="$LLVM_INSTALL_LOC/bin/clang++"
+ -DCMAKE_C_COMPILER="$ALTAOMP/bin/clang"
+ -DCMAKE_CXX_COMPILER="$ALTAOMP/bin/clang++"
+ -DLIBOMPTARGET_AMDGCN_GFXLIST="$GFXSEMICOLONS"
+ -DLIBOMPTARGET_ENABLE_DEBUG=ON
+ -DDEVICELIBS_ROOT="$DEVICELIBS_ROOT"
+ -DLIBOMP_COPY_EXPORTS=OFF
+ -DLIBOMPTEST_INSTALL_COMPONENTS=ON
+ -DLLVM_DIR="$LLVM_DIR"
+ -DLIBOMPTEST_BUILD_STANDALONE=1 -DLIBOMPTARGET_BUILD_DEVICE_FORTRT=On)
+
+LLVM_RUNTIMES="openmp"
+if [ "$OPENMP_BUILD_DEVICERTL" -eq 1 ]; then
+ if [ -f "$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/openmp/device/CMakeLists.txt" ]; then
+ LLVM_RUNTIMES=openmp
+ COMMON_CMAKE_OPTS=("${COMMON_CMAKE_OPTS[@]}"
+ -DLLVM_DEFAULT_TARGET_TRIPLE=amdgcn-amd-amdhsa
+ -DLLVM_ENABLE_RUNTIMES="$LLVM_RUNTIMES")
+ fi
+fi
+
+COMMON_CMAKE_OPTS=("${COMMON_CMAKE_OPTS[@]}"
+ -DLLVM_BINARY_DIR="$LLVM_INSTALL_LOC"
+ -DLLVM_ENABLE_RUNTIMES="$LLVM_RUNTIMES"
+ -DCLANG_VERSION_MAJOR="$LLVM_VERSION_MAJOR")
+
+if [ "$AOMP_STANDALONE_BUILD" == 0 ]; then
+ # For static package builds, set BUILD_SHARED_LIBS to OFF
+ if [ "$STATIC_PKG_DEPS" == "ON" ]; then
+ COMMON_CMAKE_OPTS=("${COMMON_CMAKE_OPTS[@]}" -DBUILD_SHARED_LIBS=OFF)
+ fi
+
+ COMMON_CMAKE_OPTS=("${COMMON_CMAKE_OPTS[@]}"
+ -DLLVM_MAIN_INCLUDE_DIR="$LLVM_PROJECT_ROOT/llvm/include"
+ -DLIBOMPTARGET_LLVM_INCLUDE_DIRS="$LLVM_PROJECT_ROOT/llvm/include"
+ -DROCM_DIR="$ROCM_DIR"
+ -DAOMP_STANDALONE_BUILD="$AOMP_STANDALONE_BUILD"
+ -DCMAKE_MODULE_PATH="$LLVM_PROJECT_ROOT/llvm/cmake/modules")
+else
+ COMMON_CMAKE_OPTS=("${COMMON_CMAKE_OPTS[@]}"
+ -DLLVM_MAIN_INCLUDE_DIR="$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/llvm/include"
+ -DLIBOMPTARGET_LLVM_INCLUDE_DIRS="$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/llvm/include"
+ -DCMAKE_MODULE_PATH="$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/llvm/cmake/modules"
+ -DLLVM_INSTALL_PREFIX="$LLVM_INSTALL_LOC")
+fi
+
+if [ "$AOMP_BUILD_CUDA" == 1 ] ; then
+ COMMON_CMAKE_OPTS=("${COMMON_CMAKE_OPTS[@]}"
+ -DLIBOMPTARGET_NVPTX_ENABLE_BCLIB=ON
+ -DLIBOMPTARGET_NVPTX_CUDA_COMPILER="$AOMP/bin/clang++"
+ -DLIBOMPTARGET_NVPTX_BC_LINKER="$AOMP/bin/llvm-link"
+ -DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES="$NVPTXGPUS")
+else
+# Need to force CUDA off this way in case cuda is installed in this system
+ COMMON_CMAKE_OPTS=("${COMMON_CMAKE_OPTS[@]}"
+ -DCUDA_TOOLKIT_ROOT_DIR=OFF)
+fi
+
+# This is how we tell the hsa plugin where to find hsa
+export HSA_RUNTIME_PATH=$ROCM_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.
+# This is why default is 0 (OFF).
+if [ "$AOMP_APPLY_ATD_AMD_STAGING_PATCH" == 1 ] ; then
+ patchrepo "$REPO_DIR"
+fi
+
+declare -a ASAN_CMAKE_OPTS
+
+if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
+ echo " "
+ echo "This is a FRESH START. ERASING any previous builds in $BUILD_DIR/llvm_runtimes_standalone."
+ echo "Use ""$0 nocmake"" or ""$0 install"" to avoid FRESH START."
+ echo "rm -rf $BUILD_DIR/build/$RUNTIMES_BUILD_DIR"
+ rm -rf "$BUILD_DIR/build/$RUNTIMES_BUILD_DIR"
+ declare -a MYCMAKEOPTS
+ if [ "$AOMP_STANDALONE_BUILD" == 1 ]; then
+ MYCMAKEOPTS=("${COMMON_CMAKE_OPTS[@]}"
+ -DCMAKE_PREFIX_PATH="$AOMP_INSTALL_DIR/lib/cmake;$AOMP_INSTALL_DIR/lib64/cmake"
+ -DCMAKE_BUILD_TYPE=Release "${AOMP_ORIGIN_RPATH[@]}")
+ else
+ MYCMAKEOPTS=("${COMMON_CMAKE_OPTS[@]}"
+ -DCMAKE_PREFIX_PATH="$INSTALL_PREFIX/lib/cmake"
+ -DCMAKE_BUILD_TYPE=Release "${OPENMP_EXTRAS_ORIGIN_RPATH[@]}")
+
+ # XXX: Crude way to detect if we should enable building the mod files with flang.
+ # Is it preferrable to set it from the outside or based on branch name, some other in-tree file?
+ AOMP_BUILD_MODFILES_WITH_FLANG_NEW=0
+ if [ -e "${LLVM_INSTALL_LOC}/bin/flang" ]; then
+ AOMP_BUILD_MODFILES_WITH_FLANG_NEW=1
+ fi
+
+ if [ "$AOMP_BUILD_MODFILES_WITH_FLANG_NEW" == 1 ]; then
+ echo "Building .mod files via: $LLVM_INSTALL_LOC/bin/flang"
+ echo "Installing .mod files to: $LLVM_INSTALL_LOC/include/flang/"
+ MYCMAKEOPTS=("${MYCMAKEOPTS[@]}"
+ -DLIBOMP_FORTRAN_MODULES_COMPILER="$LLVM_INSTALL_LOC/bin/flang"
+ -DLIBOMP_MODULES_INSTALL_PATH="$LLVM_INSTALL_LOC/include/flang/")
+ fi
+ fi
+
+ if [ "$AOMP_BUILD_SANITIZER" == 1 ]; then
+ if [ "$AOMP_STANDALONE_BUILD" == 1 ]; then
+ ASAN_CMAKE_OPTS=("${COMMON_CMAKE_OPTS[@]}"
+ -DCMAKE_PREFIX_PATH="$AOMP_INSTALL_DIR/lib/asan/cmake;$AOMP_INSTALL_DIR/lib/cmake;$AOMP_INSTALL_DIR/lib64/cmake"
+ -DSANITIZER_AMDGPU=1 -DCMAKE_BUILD_TYPE=Release
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF
+ "${AOMP_ASAN_ORIGIN_RPATH[@]}")
+ else
+ ASAN_CMAKE_OPTS=("${COMMON_CMAKE_OPTS[@]}"
+ -DCMAKE_PREFIX_PATH="$ROCM_CMAKECONFIG_PATH;$INSTALL_PREFIX/lib/llvm/lib/asan"
+ -DSANITIZER_AMDGPU=1 -DCMAKE_BUILD_TYPE=Release
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF
+ "${OPENMP_EXTRAS_ORIGIN_RPATH[@]}")
+ fi
+ echo " -----Running llvm_runtimes_standalone cmake for asan ---- "
+ mkdir -p "$BUILD_DIR/build/$RUNTIMES_BUILD_DIR/asan"
+ cd "$BUILD_DIR/build/$RUNTIMES_BUILD_DIR/asan" || exit
+ echo "${AOMP_CMAKE}" "$(shquot "${ASAN_CMAKE_OPTS[@]}")" \
+ -DCMAKE_C_FLAGS="\"$(cmquot "${ASAN_FLAGS[@]}")\"" \
+ -DCMAKE_CXX_FLAGS="\"$(cmquot "${ASAN_FLAGS[@]}")\"" \
+ -DOFFLOAD_LIBDIR_SUFFIX="/asan" \
+ -DLLVM_LIBDIR_SUFFIX="/asan" \
+ "$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/runtimes"
+ if ! ${AOMP_CMAKE} "${ASAN_CMAKE_OPTS[@]}" \
+ -DCMAKE_C_FLAGS="$(cmquot "${ASAN_FLAGS[@]}")" \
+ -DCMAKE_CXX_FLAGS="$(cmquot "${ASAN_FLAGS[@]}")" \
+ -DOFFLOAD_LIBDIR_SUFFIX="/asan" \
+ -DLLVM_LIBDIR_SUFFIX="/asan" \
+ "$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/runtimes"; then
+ echo "ERROR llvm_runtimes_standalone cmake failed. Cmake flags"
+ echo " $(shquot "${ASAN_CMAKE_OPTS[@]}")"
+ exit 1
+ fi
+ fi
+
+ # Build a dedicatd "performance" version of libomptarget
+ if [ "$AOMP_BUILD_PERF" == "1" ]; then
+ echo "rm -rf $BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_perf"
+ rm -rf "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_perf"
+ MYCMAKEOPTS=("${COMMON_CMAKE_OPTS[@]}"
+ -DCMAKE_PREFIX_PATH="$AOMP_INSTALL_DIR/lib/cmake;$AOMP_INSTALL_DIR/lib64/cmake"
+ -DLIBOMPTARGET_ENABLE_DEBUG=OFF -DCMAKE_BUILD_TYPE=Release
+ -DLIBOMPTARGET_PERF=ON -DOFFLOAD_LIBDIR_SUFFIX=-perf
+ -DLLVM_LIBDIR_SUFFIX="-perf")
+ mkdir -p "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_perf"
+ cd "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_perf" || exit
+ echo " -----Running llvm_runtimes_standalone cmake for perf ---- "
+ echo "${AOMP_CMAKE}" "$(shquot "${MYCMAKEOPTS[@]}")" \
+ "$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/runtimes" \
+ "$(shquot "${AOMP_ORIGIN_RPATH[@]}")"
+
+ if ! ${AOMP_CMAKE} "${MYCMAKEOPTS[@]}" \
+ "$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/runtimes" \
+ "${AOMP_ORIGIN_RPATH[@]}"; then
+ echo "error llvm_runtimes_standalone cmake failed. cmake flags"
+ echo " $(shquot "${MYCMAKEOPTS[@]}")"
+ exit 1
+ fi
+ if [ "$AOMP_BUILD_SANITIZER" == 1 ]; then
+ ASAN_CMAKE_OPTS=("${COMMON_CMAKE_OPTS[@]}"
+ -DCMAKE_PREFIX_PATH="$AOMP_INSTALL_DIR/lib/asan/cmake;$AOMP_INSTALL_DIR/lib/cmake;$AOMP_INSTALL_DIR/lib64/cmake"
+ -DLIBOMPTARGET_ENABLE_DEBUG=OFF
+ -DCMAKE_BUILD_TYPE=Release
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF
+ -DLIBOMPTARGET_PERF=ON -DSANITIZER_AMDGPU=1
+ "${AOMP_ASAN_ORIGIN_RPATH[@]}")
+ echo " -----Running llvm_runtimes_standalone cmake for perf-asan ---- "
+ mkdir -p "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_perf/asan"
+ cd "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_perf/asan" || exit
+ echo "${AOMP_CMAKE}" "$(shquot "${ASAN_CMAKE_OPTS[@]}")" \
+ -DCMAKE_C_FLAGS="\"$(cmquot "${ASAN_FLAGS[@]}")\"" \
+ -DCMAKE_CXX_FLAGS="\"$(cmquot "${ASAN_FLAGS[@]}")\"" \
+ -DOFFLOAD_LIBDIR_SUFFIX="-perf/asan" \
+ -DLLVM_LIBDIR_SUFFIX="-perf/asan" \
+ "$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/runtimes"
+
+ if ! ${AOMP_CMAKE} "${ASAN_CMAKE_OPTS[@]}" \
+ -DCMAKE_C_FLAGS="$(cmquot "${ASAN_FLAGS[@]}")" \
+ -DCMAKE_CXX_FLAGS="$(cmquot "${ASAN_FLAGS[@]}")" \
+ -DOFFLOAD_LIBDIR_SUFFIX="-perf/asan" \
+ -DLLVM_LIBDIR_SUFFIX="-perf/asan" \
+ "$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/runtimes"; then
+ echo "error llvm_runtimes_standalone cmake failed. cmake flags"
+ echo " $(shquot "${ASAN_CMAKE_OPTS[@]}")"
+ exit 1
+ fi
+ fi
+ fi
+
+ if [ "$AOMP_BUILD_DEBUG" == "1" ] ; then
+ _prefix_map=(-fdebug-prefix-map="$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/offload=$_ompd_src_dir/offload")
+
+ declare -a DEBUGCMAKEOPTS
+
+ DEBUGCMAKEOPTS=(-DLIBOMPTARGET_NVPTX_DEBUG=ON
+ -DLLVM_ENABLE_ASSERTIONS=ON
+ -DCMAKE_BUILD_TYPE=Debug
+ -DROCM_DIR="$ROCM_DIR"
+ -DLIBOMP_ARCH=x86_64
+ -DLIBOMP_OMPT_SUPPORT=ON
+ -DLIBOMP_USE_DEBUGGER=ON
+ -DLIBOMP_CPPFLAGS='-O0'
+ -DLIBOMP_OMPD_SUPPORT=ON
+ -DLIBOMP_OMPT_DEBUG=ON)
+
+ # The 'pip install --system' command is not supported on non-debian systems. This will disable
+ # the system option if the debian_version file is not present.
+ if [ ! -f /etc/debian_version ]; then
+ echo "==> Non-Debian OS, disabling use of pip install --system"
+ DEBUGCMAKEOPTS=("${DEBUGCMAKEOPTS[@]}" -DDISABLE_SYSTEM_NON_DEBIAN=1)
+ fi
+
+ # Redhat 7.6 does not have python36-devel package, which is needed for ompd compilation.
+ # This is acquired through RH Software Collections.
+ if [ -f /opt/rh/rh-python36/enable ]; then
+ echo "==> Using python3.6 out of rh tools."
+ DEBUGCMAKEOPTS=("${DEBUGCMAKEOPTS[@]}"
+ -DPython3_ROOT_DIR=/opt/rh/rh-python36/root/bin
+ -DPYTHON_HEADERS=/opt/rh/rh-python36/root/usr/include/python3.6m)
+ fi
+
+ echo
+ if [ "$SANITIZER" != 1 ] ; then
+ echo "rm -rf $BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_debug"
+ rm -rf "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_debug"
+ echo " -----Running llvm_runtimes_standalone cmake for debug ---- "
+ mkdir -p "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_debug"
+ cd "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_debug" || exit
+ if [ "$AOMP_STANDALONE_BUILD" == 1 ]; then
+ PREFIX_PATH="-DCMAKE_PREFIX_PATH=$AOMP_INSTALL_DIR/lib/cmake;$AOMP_INSTALL_DIR/lib64/cmake"
+ MYCMAKEOPTS=("${COMMON_CMAKE_OPTS[@]}" "${DEBUGCMAKEOPTS[@]}"
+ "${AOMP_DEBUG_ORIGIN_RPATH[@]}")
+ else
+ PREFIX_PATH="-DCMAKE_PREFIX_PATH=$INSTALL_PREFIX/lib/cmake"
+ MYCMAKEOPTS=("${COMMON_CMAKE_OPTS[@]}" "${DEBUGCMAKEOPTS[@]}"
+ "${OPENMP_EXTRAS_ORIGIN_RPATH[@]}")
+ fi
+
+ if ! ${AOMP_CMAKE} "${MYCMAKEOPTS[@]}" "$PREFIX_PATH" \
+ -DCMAKE_C_FLAGS="$CFLAGS -g" \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS -g $(cmquot "${_prefix_map[@]}")" \
+ -DOFFLOAD_LIBDIR_SUFFIX="-debug" \
+ -DLLVM_LIBDIR_SUFFIX="-debug" \
+ "$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/runtimes"; then
+ echo "ERROR llvm_runtimes_standalone debug cmake failed. Cmake flags"
+ echo " $(shquot "${MYCMAKEOPTS[@]}")"
+ exit 1
+ fi
+ fi
+ if [ "$AOMP_BUILD_SANITIZER" == 1 ]; then
+ ASAN_CMAKE_OPTS=("${COMMON_CMAKE_OPTS[@]}" "${DEBUGCMAKEOPTS[@]}"
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF
+ -DSANITIZER_AMDGPU=1)
+ if [ "$AOMP_STANDALONE_BUILD" == 1 ]; then
+ ASAN_CMAKE_OPTS=("${ASAN_CMAKE_OPTS[@]}"
+ -DCMAKE_PREFIX_PATH="$AOMP_INSTALL_DIR/lib/asan/cmake;$AOMP_INSTALL_DIR/lib/cmake;$AOMP_INSTALL_DIR/lib64/cmake"
+ "${AOMP_ASAN_ORIGIN_RPATH[@]}")
+ else
+ ASAN_CMAKE_OPTS=("${ASAN_CMAKE_OPTS[@]}"
+ -DCMAKE_PREFIX_PATH="$ROCM_CMAKECONFIG_PATH;$INSTALL_PREFIX/lib/llvm/lib/asan"
+ "${OPENMP_EXTRAS_ORIGIN_RPATH[@]}")
+ fi
+ echo " -----Running llvm_runtimes_standalone cmake for debug-asan ---- "
+ mkdir -p "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_debug/asan"
+ cd "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_debug/asan" || exit
+ echo "${AOMP_CMAKE}" "${ASAN_CMAKE_OPTS[@]}" \
+ -DCMAKE_C_FLAGS="\"$(cmquot "${ASAN_FLAGS[@]}")\"" \
+ -DCMAKE_CXX_FLAGS="\"$(cmquot "${ASAN_FLAGS[@]}")\"" \
+ -DOFFLOAD_LIBDIR_SUFFIX="-debug/asan" \
+ -DLLVM_LIBDIR_SUFFIX="-debug/asan" \
+ "$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/runtimes"
+
+ if ! ${AOMP_CMAKE} "${ASAN_CMAKE_OPTS[@]}" \
+ -DCMAKE_C_FLAGS="$(cmquot "${ASAN_FLAGS[@]}")" \
+ -DCMAKE_CXX_FLAGS="$(cmquot "${ASAN_FLAGS[@]}")" \
+ -DOFFLOAD_LIBDIR_SUFFIX="-debug/asan" \
+ -DLLVM_LIBDIR_SUFFIX="-debug/asan" \
+ "$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/runtimes"; then
+ echo "ERROR llvm_runtimes_standalone debug cmake failed. Cmake flags"
+ echo " $(shquot "${ASAN_CMAKE_OPTS[@]}")"
+ exit 1
+ fi
+ fi
+ fi
+fi
+
+if [ "$1" = "cmake" ]; then
+ exit 0
+fi
+
+if [ "$1" != "install" ] ; then
+ if [ "$AOMP_BUILD_SANITIZER" == 1 ] ; then
+ cd "$BUILD_DIR/build/$RUNTIMES_BUILD_DIR/asan" || exit
+ echo " -----Running $AOMP_NINJA_BIN for $BUILD_DIR/build/$RUNTIMES_BUILD_DIR/asan ---- "
+
+ if ! $AOMP_NINJA_BIN -j "$AOMP_JOB_THREADS"; then
+ echo " "
+ echo "ERROR: $AOMP_NINJA_BIN -j $AOMP_JOB_THREADS FAILED"
+ echo "To restart:"
+ echo " cd $BUILD_DIR/build/$RUNTIMES_BUILD_DIR/asan"
+ echo " $AOMP_NINJA_BIN"
+ exit 1
+ fi
+ fi
+
+ if [ "$AOMP_BUILD_PERF" == "1" ] ; then
+ cd "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_perf" || exit
+ echo
+ echo
+ echo " -----Running $AOMP_NINJA_BIN for $BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_perf ---- "
+
+ if ! $AOMP_NINJA_BIN -j "$AOMP_JOB_THREADS"; then
+ echo "ERROR $AOMP_NINJA_BIN -j $AOMP_JOB_THREADS failed"
+ exit 1
+ fi
+ if [ "$AOMP_BUILD_SANITIZER" == 1 ] ; then
+ cd "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_perf/asan" || exit
+ echo
+ echo
+ echo " ----- Running $AOMP_NINJA_BIN for $BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_perf/asan ----- "
+
+ if ! $AOMP_NINJA_BIN -j "$AOMP_JOB_THREADS"; then
+ echo "ERROR $AOMP_NINJA_BIN -j $AOMP_JOB_THREADS failed"
+ exit 1
+ fi
+ fi
+ fi
+
+ if [ "$AOMP_BUILD_DEBUG" == "1" ] ; then
+ if [ "$SANITIZER" != 1 ] ; then
+ cd "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_debug" || exit
+ echo
+ echo
+ echo " -----Running $AOMP_NINJA_BIN for $BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_debug ---- "
+
+ if ! $AOMP_NINJA_BIN -j "$AOMP_JOB_THREADS"; then
+ echo "ERROR $AOMP_NINJA_BIN -j $AOMP_JOB_THREADS failed"
+ exit 1
+ fi
+ fi
+ if [ "$AOMP_BUILD_SANITIZER" == 1 ] ; then
+ cd "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_debug/asan" || exit
+ echo
+ echo
+ echo " -----Running $AOMP_NINJA_BIN for $BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_debug/asan ---- "
+
+ if ! $AOMP_NINJA_BIN -j "$AOMP_JOB_THREADS"; then
+ echo "ERROR $AOMP_NINJA_BIN -j $AOMP_JOB_THREADS failed"
+ exit 1
+ fi
+ fi
+ fi
+
+ echo
+ echo "Successful build of ./build_llvm_runtimes_standalone.sh . Please run:"
+ echo " ./build_llvm_runtimes_standalone.sh install "
+ echo
+fi
+
+# ----------- Install only if asked ----------------------------
+if [ "$1" == "install" ] ; then
+ if [ "$AOMP_BUILD_SANITIZER" == 1 ] ; then
+ cd "$BUILD_DIR/build/$RUNTIMES_BUILD_DIR/asan" || exit
+ echo
+ echo " -----Installing to $LLVM_INSTALL_LOC/lib/asan ----- "
+
+ if ! $SUDO "$AOMP_NINJA_BIN" -j "$AOMP_JOB_THREADS" install; then
+ echo "ERROR $AOMP_NINJA_BIN install failed "
+ exit 1
+ fi
+ fi
+
+ if [ "$AOMP_BUILD_PERF" == "1" ]; then
+ cd "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_perf" || exit
+ echo
+ echo " -----Installing to $LLVM_INSTALL_LOC/lib-perf ----- "
+
+ if ! $SUDO "$AOMP_NINJA_BIN" -j "$AOMP_JOB_THREADS" install; then
+ echo "ERROR $AOMP_NINJA_BIN install failed "
+ exit 1
+ fi
+
+ if [ "$AOMP_BUILD_SANITIZER" == 1 ] ; then
+ cd "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_perf/asan" || exit
+ echo
+ echo " ----- Installing to $LLVM_INSTALL_LOC/lib-perf/asan ----- "
+
+ if ! $SUDO "$AOMP_NINJA_BIN" -j "$AOMP_JOB_THREADS" install; then
+ echo "ERROR $AOMP_NINJA_BIN install failed "
+ exit 1
+ fi
+ fi
+ fi
+
+ if [ "$AOMP_BUILD_DEBUG" == "1" ] ; then
+ if [ "$SANITIZER" != 1 ] ; then
+ cd "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_debug" || exit
+ echo
+ echo " -----Installing to $LLVM_INSTALL_LOC/lib-debug ---- "
+
+ if ! $SUDO "$AOMP_NINJA_BIN" -j "$AOMP_JOB_THREADS" install; then
+ echo "ERROR $AOMP_NINJA_BIN install failed "
+ exit 1
+ fi
+ fi
+ if [ "$AOMP_BUILD_SANITIZER" == 1 ] ; then
+ cd "$BUILD_DIR/build/${RUNTIMES_BUILD_DIR}_debug/asan" || exit
+ echo " -----Installing to $LLVM_INSTALL_LOC/lib-debug/asan ---- "
+
+ if ! $SUDO "$AOMP_NINJA_BIN" -j "$AOMP_JOB_THREADS" install; then
+ echo "ERROR $AOMP_NINJA_BIN install failed "
+ exit 1
+ fi
+ fi
+
+ # Copy selected debugable runtime sources into the installation directory
+ # $_ompd_src_dir directory to satisfy the above CXXOPT -fdebug-prefix-map.
+ $SUDO mkdir -p "$_ompd_src_dir/offload"
+ $SUDO mkdir -p "$_ompd_src_dir/offload/plugins-nextgen"
+ if [ "$AOMP_STANDALONE_BUILD" == 1 ]; then
+ _from_dir_src="$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/offload/libomptarget"
+ _from_dir_plugins="$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/offload/plugins-nextgen"
+ else
+ _from_dir_src="$LLVM_PROJECT_ROOT/offload/libomptarget"
+ _from_dir_plugins="$LLVM_PROJECT_ROOT/offload/plugins-nextgen"
+ fi
+ echo cp -rp "$_from_dir_src" "$_ompd_src_dir/offload"
+ $SUDO cp -rp "$_from_dir_src" "$_ompd_src_dir/offload"
+ echo cp -rp "$_from_dir_plugins" "$_ompd_src_dir/offload"
+ $SUDO cp -rp "$_from_dir_plugins" "$_ompd_src_dir/offload"
+
+ # Copy selected debugable runtime sources into the installation $ompd_src_dir/src directory
+ # to satisfy the above -fdebug-prefix-map.
+ $SUDO mkdir -p "$_ompd_src_dir/openmp/runtime"
+ $SUDO mkdir -p "$_ompd_src_dir/openmp/libompd"
+ $SUDO mkdir -p "$_ompd_src_dir/openmp/device"
+ if [ "$AOMP_STANDALONE_BUILD" == 1 ]; then
+ $SUDO cp -rp "$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/openmp/runtime/src" "$_ompd_src_dir/openmp/runtime"
+ $SUDO cp -rp "$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/openmp/libompd/src" "$_ompd_src_dir/openmp/libompd"
+ $SUDO cp -rp "$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/openmp/device/src" "$_ompd_src_dir/openmp/device"
+ else
+ $SUDO cp -rp "$LLVM_PROJECT_ROOT/openmp/runtime/src" "$_ompd_src_dir/openmp/runtime"
+ $SUDO cp -rp "$LLVM_PROJECT_ROOT/openmp/libompd/src" "$_ompd_src_dir/openmp/libompd"
+ $SUDO cp -rp "$LLVM_PROJECT_ROOT/openmp/device/src" "$_ompd_src_dir/openmp/device"
+ fi
+ fi # end of AOMP_BUILD_DEBUG install block
+
+ if [ "$AOMP_APPLY_ATD_AMD_STAGING_PATCH" == 1 ] ; then
+ removepatch "$REPO_DIR"
+ fi
+
+fi # end of install block
+
+# We have to build the deviceRTL by itself as it requires a different target
+if [ "$1" != "install" ] && [ "$OPENMP_BUILD_DEVICERTL" == 0 ] ; then
+ RUNTIMES_BUILD_DIR="llvm_runtimes_standalone-devicertl" OPENMP_BUILD_DEVICERTL=1 $thisdir/build_llvm_runtimes_standalone.sh
+fi
+if [ "$1" == "install" ] && [ "$OPENMP_BUILD_DEVICERTL" == 0 ]; then
+ RUNTIMES_BUILD_DIR="llvm_runtimes_standalone-devicertl" OPENMP_BUILD_DEVICERTL=1 $thisdir/build_llvm_runtimes_standalone.sh install
+fi
diff --git a/bin/build_project.sh b/bin/build_project.sh
index d565731034..0b34d1178f 100755
--- a/bin/build_project.sh
+++ b/bin/build_project.sh
@@ -155,7 +155,7 @@ MYCMAKEOPTS=(-DCMAKE_BUILD_TYPE="$BUILD_TYPE"
if [ -f "$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/openmp/device/CMakeLists.txt" ]; then
MYCMAKEOPTS=("${MYCMAKEOPTS[@]}"
-DLLVM_RUNTIME_TARGETS='default;amdgcn-amd-amdhsa'
- -DRUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES='openmp'
+ -DRUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES='compiler-rt;libc;libcxx;libcxxabi;flang-rt;openmp'
-DRUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON)
fi
@@ -169,7 +169,12 @@ MYCMAKEOPTS=("${MYCMAKEOPTS[@]}"
-DCLANG_ENABLE_AMDCLANG=ON
-DLLVM_ENABLE_RUNTIMES="$LLVM_RUNTIMES"
-DLIBCXX_ENABLE_STATIC=ON
- -DLIBCXXABI_ENABLE_STATIC=ON)
+ -DLIBCXXABI_ENABLE_STATIC=ON
+ -DLLVM_RUNTIME_TARGETS="default;amdgcn-amd-amdhsa"
+ -DRUNTIMES_amdgcn-amd-amdhsa_FLANG_RT_LIBC_PROVIDER=llvm
+ -DRUNTIMES_amdgcn-amd-amdhsa_FLANG_RT_LIBCXX_PROVIDER=llvm
+ -DRUNTIMES_amdgcn-amd-amdhsa_CACHE_FILES="$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/libcxx/cmake/caches/AMDGPU.cmake"
+ )
# Enable Compiler-rt Sanitizer Build
if [ "$AOMP_BUILD_SANITIZER" == 1 ]; then
diff --git a/bin/build_rocprofiler-sdk.sh b/bin/build_rocprofiler-sdk.sh
index f93c4b9d45..f2e405a253 100755
--- a/bin/build_rocprofiler-sdk.sh
+++ b/bin/build_rocprofiler-sdk.sh
@@ -1,9 +1,5 @@
#!/bin/bash
#
-#Copyright © Advanced Micro Devices, Inc., or its affiliates.
-#
-#SPDX-License-Identifier: MIT
-#
# build_rocprofiler-sdk.sh: Script to build rocprofiler-sdk for AOMP standalone build
#
@@ -65,6 +61,15 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
cd "$BUILD_AOMP"/build/rocprofiler-sdk || exit
export PATH=$HOME/.local/bin:$INSTALL_ROCPROF_SDK/bin:$PATH
+ pythonbinary=$(which python3) || exit
+ pythonversion=$("$pythonbinary" --version) || exit
+ if [[ $pythonversion =~ ([Pp]ython)[[:space:]]*([0-9]+)\.([0-9]+) ]]; then
+ pythonversion="${BASH_REMATCH[2]}.${BASH_REMATCH[3]}"
+ else
+ echo "Error: cannot determine python version"
+ exit 1
+ fi
+
declare -a MYCMAKEOPTS
MYCMAKEOPTS=(-DCMAKE_PREFIX_PATH="$AOMP_INSTALL_DIR;$HOME/local/aqlprofile"
@@ -74,7 +79,9 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
-DBUILD_SHARED_LIBS=On
-DGPU_TARGETS="$GFXSEMICOLONS"
-DROCPROFILER_BUILD_SAMPLES=ON
- -DROCPROFILER_BUILD_TESTS=OFF)
+ -DROCPROFILER_BUILD_TESTS=OFF
+ -DPython3_EXECUTABLE=$(which python3)
+ -DROCPROFILER_PYTHON_VERSIONS="$pythonversion")
echo " -----Running rocprofiler-sdk cmake ---- "
echo "${AOMP_CMAKE}" "${MYCMAKEOPTS[@]}" "$AOMP_REPOS/$AOMP_PROF_SDK_REPO_NAME"
diff --git a/bin/build_supp.sh b/bin/build_supp.sh
index 4389106dea..da7714141e 100755
--- a/bin/build_supp.sh
+++ b/bin/build_supp.sh
@@ -195,7 +195,7 @@ function buildopenmpi(){
function buildninja(){
_cname="ninja"
- _version=1.11.1
+ _version=1.13.2
_installdir=$AOMP_SUPP_INSTALL/$_cname-$_version
_linkfrom=$AOMP_SUPP/$_cname
_builddir=$AOMP_SUPP_BUILD/$_cname
diff --git a/bin/calculate_divergence.sh b/bin/calculate_divergence.sh
new file mode 100755
index 0000000000..d1a3b5f6fe
--- /dev/null
+++ b/bin/calculate_divergence.sh
@@ -0,0 +1,496 @@
+#!/bin/bash
+
+################################################################################
+# Calculates and reports the divergence between LLVM upstream and ROCm's LLVM
+# fork by comparing git branches and generating diff statistics and patches.
+#
+# Environment Variables:
+# SKIP_FETCH - Skip git fetch operations (default: 0)
+# SILENT - Suppress informational messages (default: 0)
+# SETUP_ONLY - Only runs setup process, then exits (default: 0)
+# SKIP_SETUP - Skips directory & git setup steps (default: 0)
+# LLVM_REPO_DIR - Path to LLVM repository (default: ~/git/llvm-project.diff)
+# LLVM_PATH - Path to analyze (default: "" for entire repo)
+# COMPONENT - Index into list of paths (default: "" for entire repo)
+# LLVM_BRANCH - LLVM branch to compare (default: main)
+# ROCm_BRANCH - ROCm branch to compare (default: amd-staging)
+# RESULTS_DIR - Path to results dir (default: /results)
+# PER_FILE - Creates per-file diffs (default: 0)
+# FILE_GROUPS - Used for per-file diffs to group files together (default: 1)
+# NFC - Create patch for non-functional changes (default: 0)
+################################################################################
+
+timestamp="$(date +"%Y-%m-%d_%H-%M")"
+
+source_config="llvm"
+target_config="ROCm"
+remote_configs=("$source_config" "$target_config")
+
+# configs
+declare -A components=(
+ [clang]="clang"
+ [flang]="flang"
+ [offload]="offload"
+ [openmp]="openmp"
+ [driver]="clang/lib/Driver clang/include/clang/Driver clang/test/Driver"
+)
+
+declare -A directories=(
+ [llvm]=${LLVM_REPO_DIR:=${HOME}/git/llvm-project.diff}
+ [path]=${LLVM_PATH:=""}
+ [results]=${RESULTS_DIR:="$(pwd)/results"}
+)
+
+declare -A diff_args=(
+ [component]=${COMPONENT:=""}
+ [options]="stat patch"
+)
+
+declare -A llvm=(
+ [url]="https://github.com/llvm/llvm-project.git"
+ [remote]="llvm"
+ [branch]=${LLVM_BRANCH:=main}
+)
+
+declare -A ROCm=(
+ [url]="https://github.com/ROCm/llvm-project.git"
+ [remote]="ROCm"
+ [branch]=${ROCm_BRANCH:=amd-staging}
+)
+
+################################################################################
+# Outputs the script relevant environment variables and the values they are
+# set to after they were assigned their default values if not set.
+################################################################################
+print_environment() {
+ if [[ "$SILENT" -eq 1 ]]; then
+ return 0
+ fi
+
+ print_step "Processed environment"
+ local other_vars=("LLVM_REPO_DIR" "LLVM_PATH" "COMPONENT" "LLVM_BRANCH" "ROCm_BRANCH" "RESULTS_DIR")
+
+ for var_name in "${other_vars[@]}" "${default_false[@]}" "${default_true[@]}"; do
+ local -n var="$var_name"
+ print_info "$var_name=$var"
+ done
+}
+
+################################################################################
+# Normalizes a predefined list of boolean-like environment variables into a
+# consistent integer format (1 for true, 0 for false). It reads each variable
+# name from the `boolean_vars` array, interprets its value, and overwrites
+# the global variable with either a 1 or a 0.
+#
+# This function handles case-insensitive "true" values (e.g., true, 1, yes, y)
+# and "false" values (e.g., false, 0, no, n). If a variable is unset or has
+# an unrecognized value, it defaults to 0 (false).
+################################################################################
+process_environment() {
+ default_false=("SKIP_FETCH" "SILENT" "SETUP_ONLY" "SKIP_SETUP" "PER_FILE" "NFC")
+ default_true=("FILE_GROUPS")
+
+ for var_name in "${default_false[@]}" "${default_true[@]}"; do
+ local -n var="$var_name"
+ if printf '%s\n' "${default_true[@]}" | grep -qx "$var_name"; then
+ var=${var:-1}
+ else
+ var=${var:-0}
+ fi
+
+ case "${var,,}" in
+ true|1|yes|y)
+ var=1
+ ;;
+ false|0|no|n)
+ var=0
+ ;;
+ *)
+ var=-
+ ;;
+ esac
+ done
+}
+
+################################################################################
+# Utility functions for consistent, formatted console output throughout the
+# script execution. Provides two levels of messaging: step headers for major
+# operations and informational messages for detailed progress updates.
+################################################################################
+print_step() {
+ echo -e "$1..."
+}
+
+print_info() {
+ if [[ "$SILENT" -eq 1 ]]; then
+ return 0
+ fi
+
+ local is_first_line=1
+ local prefix=" * "
+
+ while IFS= read -r line; do
+ printf "%s%s\n" "$prefix" "$line"
+ # echo -e "${prefix}${line}"
+ if [[ "$is_first_line" -eq 1 ]]; then
+ prefix=" "
+ is_first_line=0
+ fi
+ done <<< "$1"
+}
+
+################################################################################
+# Sets up the LLVM repository directory. Checks if the directory exists and
+# is a valid git repository. If not, clones the LLVM repository from the
+# configured URL.
+################################################################################
+setup_directory() {
+ print_step "Setting up required directories"
+ local git_dir="${directories[llvm]}"
+ local parent_dir=$(dirname "$git_dir")
+
+ if [[ -d $git_dir ]] && git -C "$git_dir" rev-parse --is-inside-work-tree &>/dev/null ; then
+ print_info "found existing directory $git_dir"
+ return 0
+ fi
+
+ print_info "creating directory $git_dir"
+ mkdir -p $parent_dir
+ cd $parent_dir
+ git clone ${llvm[url]} "$(basename "$git_dir")"
+}
+
+################################################################################
+# Sets up git remotes for both LLVM and ROCm repositories. Checks if remotes
+# with the configured URLs already exist. If a remote exists with a different
+# name, updates the configuration to use the existing name. Otherwise, adds
+# the remote with the configured name.
+################################################################################
+setup_remotes() {
+ print_step "Setting up required remotes"
+
+ cd "${directories[llvm]}"
+
+ for name in "${remote_configs[@]}"; do
+ local -n config="$name"
+ local url="${config[url]}"
+ local remote="${config[remote]}"
+
+ match=$(git remote -v | grep -E "\s${url}\s" | awk '{print $1}' | head -n 1)
+
+ if [ -n "$match" ]; then
+ print_info "found remote $url ($match)"
+ config[remote]=$match
+ else
+ print_info "remote $url not found, adding as $remote"
+ git remote add $remote $url
+ fi
+ done
+}
+
+################################################################################
+# Enriches configuration arrays with formatted reference strings for different
+# use cases. Generates three formats for each config: 'ref' (remote/branch)
+# for git commands, 'file' (remote_branch) for safe filenames, and 'name'
+# (remote/branch) for display purposes.
+################################################################################
+update_configs() {
+ print_step "Updating configs"
+
+ local -A formats=(
+ [ref]="/"
+ [file]="_"
+ [name]="/"
+ )
+
+ for c in "${remote_configs[@]}"; do
+ local -n config="$c"
+ local remote="${config[remote]}"
+ local branch="${config[branch]}"
+
+ for key in "${!formats[@]}"; do
+ config[$key]="$remote${formats[$key]}$branch"
+ done
+ done
+}
+
+################################################################################
+# Validates and formats paths for use in a `git diff` command based on a
+# pre-defined component name or a list of explicit paths. It iterates through
+# the specified paths, verifies that each exists, and formats them
+# appropriately (e.g., adding a trailing slash for directories). The function
+# populates the `diff_args` associative array with a formatted `path` argument
+# string (e.g., `-- path1/ path2`) and a `file_suffix` for use in output
+# filenames. If no valid paths are found, it clears these arguments to ensure
+# the diff runs on the entire repository.
+################################################################################
+check_paths() {
+ local c="${diff_args[component]}"
+ local p="${directories[path]}"
+
+ if [[ -z "$c" && -z "$p" ]]; then
+ return 0
+ fi
+
+ print_step "Checking paths"
+
+ diff_args[file_suffix]=$(
+ if [[ ! -z "$c" ]]; then
+ echo "$c"
+ else
+ echo "${p%/}"
+ fi
+ )
+
+ for path in ${components[$c]} $p; do
+ local full_path="${directories[llvm]}/$path"
+ if [[ ! -e "$full_path" ]]; then
+ print_info "$path does not exist, skipping"
+ continue
+ fi
+ diff_args[path]+=$(
+ if [[ -d "$full_path" ]]; then
+ echo " ${path%/}/"
+ elif [[ -f "$full_path" ]]; then
+ echo " $path"
+ fi
+ )
+ done
+
+ if [[ -z "${diff_args[path]}" ]]; then
+ diff_args[file_suffix]=""
+ return 0
+ fi
+
+ diff_args[file_suffix]="--${diff_args[file_suffix]}"
+ diff_args[path]="-- ${diff_args[path]}"
+}
+
+################################################################################
+# Fetches the latest changes from configured git remotes for both LLVM and
+# ROCm repositories. Uses dry-run to check if updates are available before
+# fetching. Skips all fetch operations if SKIP_FETCH is set to "true".
+################################################################################
+update_sources() {
+ if [[ "$SKIP_FETCH" -eq 1 ]]; then
+ return 0
+ fi
+
+ print_step "Updating sources"
+
+ for config in "${remote_configs[@]}"; do
+ local -n c="$config"
+ local remote="${c[remote]}"
+ local branch="${c[branch]}"
+
+ fetch_output=$(git fetch --dry-run "$remote" "$branch" 2>&1)
+ if [ -z "$fetch_output" ] ; then
+ print_info "$remote/$branch already up to date"
+ else
+ git fetch $remote $branch
+ fi
+ done
+}
+
+diff_merge_base() {
+ git diff --src-prefix="$a_ref/" --dst-prefix="$b_ref/" --merge-base "$@" $a_ref $b_ref $path_arg
+}
+
+################################################################################
+# Takes the set of changed files and produces one or more Git patch files
+# per logical unit. When FILE_GROUPS is disabled emits on patch per file
+# otherwise groups files by their shared base name allowing for combined
+# patches for example header and related source files. Each patch is generated
+# via `git diff --merge-base` and written into a dedicated, timestamped
+# subdirectory under the main results folder, using a sanitized base name for
+# the filename.
+################################################################################
+create_file_patches() {
+ if [[ ${#changed_files[@]} -eq 0 ]]; then
+ return 0
+ fi
+
+ print_step "Generating file based git diff --$op"
+ local results_dir="${directories[results]}/$1"
+ mkdir -p $results_dir
+
+ local -A groups
+ for cf in "${changed_files[@]}"; do
+ if [[ "$FILE_GROUPS" -eq 0 ]]; then
+ path_arg="-- $cf"
+ diff_merge_base --$op > "$results_dir/${cf//[\/.]/_}.$op"
+ else
+ groups["$(basename "${cf%.*}")"]+=" $cf"
+ fi
+ done
+
+ if [[ "$FILE_GROUPS" -eq 0 ]]; then
+ return 0
+ fi
+
+ for key in "${!groups[@]}"; do
+ cf="${groups[$key]}"
+ IFS=' ' read -r -a grouped_files <<< "${groups[$key]}"
+ if [[ ${#grouped_files[@]} > 1 ]]; then
+ print_info "processing as one:${cf// /$'\n'}"
+ else
+ print_info "processing$cf"
+ fi
+ path_arg="--$cf"
+ diff_merge_base --$op > "$results_dir/${key//[\/.]/_}.$op"
+ done
+}
+
+################################################################################
+# Creates a patch file of changes that are considered "non-functional", which
+# include lines that only add or remove:
+# - whitespaces/newlines
+# - braces
+################################################################################
+calculate_nfc() {
+ print_info "calculating non functional changes"
+ local out="$1.nfc.patch"
+ local tmp full
+
+ tmp="$(mktemp /tmp/divergence_nfc.XXXXXX)" || return 1
+ full="$tmp.full"
+ grep_only="$tmp.grep"
+
+ # Grab a zero-context diff of all changes
+ diff_merge_base -U0 --no-color > "$full"
+
+ # Filter hunks: we include a hunk only if EVERY '+' or '–' line
+ # contains only whitespace and/or braces.
+ awk -v out="$grep_only" '
+ BEGIN {
+ printing = 0
+ header = ""
+ hunk = ""
+ }
+ # Collect the diff headers until the first hunk
+ /^diff --git/ { header = $0 "\n"; next }
+ /^index / { header = header $0 "\n"; next }
+ /^--- / { header = header $0 "\n"; next }
+ /^\+\+\+ / { header = header $0 "\n"; next }
+
+ # Beginning of a new hunk
+ /^@@/ {
+ # flush the prior hunk if it qualified
+ if (hunk && printing) {
+ print header hunk
+ }
+ # start a new hunk
+ printing = 1
+ hunk = $0 "\n"
+ next
+ }
+
+ # Collect lines within a hunk
+ /^[ +-]/ {
+ hunk = hunk $0 "\n"
+ # Check if this added/removed line is NON-functional:
+ # allowed forms are:
+ # +{ -{ +} -} + -
+ if ($0 ~ /^[+-][[:space:]]*[\{\}]?[[:space:]]*$/) {
+ # still ok
+ } else {
+ printing = 0
+ }
+ }
+
+ END {
+ if (hunk && printing) {
+ print header hunk
+ }
+ }
+ ' "$full" > "${directories[results]}/$out"
+
+ rm -f "$full" "$grep_only"
+}
+
+################################################################################
+# Determines the common ancestor (merge-base) of two Git references and
+# produces diff outputs between them. Based on configured options, it will
+# generate summary statistics and full diffs, saving each to timestamped
+# files in the results directory. Optionally limits analysis to specified
+# paths. When per-file patching is enabled, it splits the overall patch into
+# individual files.
+################################################################################
+calculate_differences() {
+ declare -g -n a="$source_config"
+ declare -g -n b="$target_config"
+ a_ref="${a[ref]}"
+ b_ref="${b[ref]}"
+ path_arg="${diff_args[path]}"
+
+ local merge_base=$(git merge-base $a_ref $b_ref)
+
+ local filename="${timestamp}_${a[file]}-${b[file]}${diff_args[file_suffix]}"
+ filename="${filename//\//_}"
+
+ print_step "Calculating difference"
+ print_info "based on: $(git show -s $merge_base)"
+ print_info "between: ${a[name]}
+ and: ${b[name]}"
+
+ if [[ ! -z "$path_arg" ]] ; then
+ local cleaned_path_arg="${path_arg#-- }"
+ print_info "only including files from:${cleaned_path_arg// /$'\n'}"
+ fi
+
+ print_info "$(diff_merge_base --shortstat)"
+ local per_file_ops=("patch")
+
+ git log --pretty=format:"%h %s%n%an <%ae> | %ad" --date=format:'%Y-%m-%d %H:%M:%S' --stat --no-merges $merge_base...$b_ref $path_arg > "${directories[results]}/$filename.commits"
+
+ if [[ "$NFC" -eq 1 ]]; then
+ calculate_nfc $filename
+ fi
+
+ IFS=' ' read -ra operations <<< "${diff_args[options]}"
+ for op in "${operations[@]}"; do
+ print_info "calculating git diff --$op"
+ diff_merge_base --$op > "${directories[results]}/$filename.$op"
+ if [[ "$PER_FILE" -eq 1 ]] && printf "%s\n" "${per_file_ops[@]}" | grep -qx "$op"; then
+ local path_arg_tmp=$path_arg
+ mapfile -t changed_files < <(diff_merge_base --name-only)
+ create_file_patches $filename
+ path_arg=$path_arg_tmp
+ fi
+ done
+}
+
+main() {
+ local working_dir=$(pwd)
+ local results_dir="${directories[results]}"
+ mkdir -p $results_dir
+
+ local log_file="${directories[results]}/${timestamp}_$(basename "${0%.*}").log"
+
+ exec > >(tee -a "$log_file") 2>&1
+
+ process_environment
+ print_environment
+
+ if [[ "$SKIP_SETUP" -eq 0 ]]; then
+ setup_directory
+ setup_remotes
+ fi
+
+ check_paths
+
+ if [[ "$SETUP_ONLY" -eq 1 ]]; then
+ return 0
+ fi
+
+ update_configs
+ update_sources
+
+ calculate_differences
+
+ print_step "Cleaning up"
+ print_info "output files written to: $results_dir"
+ cd $working_dir
+}
+
+main "$@"
diff --git a/bin/check_openmpvv.sh b/bin/check_openmpvv.sh
index ecef407c29..e28d1d1242 100755
--- a/bin/check_openmpvv.sh
+++ b/bin/check_openmpvv.sh
@@ -1,9 +1,5 @@
#!/bin/bash
#
-#Copyright © Advanced Micro Devices, Inc., or its affiliates.
-#
-#SPDX-License-Identifier: MIT
-#
# check_openmpvv.sh
# Assumes run_openmpvv.sh has been executed.
#
diff --git a/bin/clone_list_checkout b/bin/clone_list_checkout
index 4f8a32e4bb..1185cdcef3 100755
--- a/bin/clone_list_checkout
+++ b/bin/clone_list_checkout
@@ -1,9 +1,5 @@
#!/usr/bin/perl
#
-#Copyright © Advanced Micro Devices, Inc., or its affiliates.
-#
-#SPDX-License-Identifier: MIT
-#
# Convert 'clone_aomp.sh list' output into git checkout commands
#
# 1) Save the clone_aomp.sh list at some point
diff --git a/bin/create_release_tarball.sh b/bin/create_release_tarball.sh
index 11dce66e76..cb5b1dfd74 100755
--- a/bin/create_release_tarball.sh
+++ b/bin/create_release_tarball.sh
@@ -129,7 +129,7 @@ for repo_name in $REPO_NAMES ; do
done
# This file will be uploaded to the release directory
-tarball="$AOMP_REPOS/../aomp-${AOMP_VERSION_STRING}.tar.gz"
+tarball="$AOMP_REPOS/../aomp-${AOMP_VERSION_STRING}-source.tar.gz"
tmpdir=/tmp/create_tarball$$
majorver=${AOMP_VERSION}
tardir=$tmpdir/aomp$majorver
@@ -147,7 +147,7 @@ done
echo "ln -sf $AOMP_REPOS/$AOMP_REPO_NAME $AOMP_REPO_NAME"
ln -sf "$AOMP_REPOS/$AOMP_REPO_NAME" "$AOMP_REPO_NAME"
cd "$tmpdir" || exit
-cmd="tar --exclude-from $thisdir/create_release_tarball_excludes -h -czf $tarball aomp$majorver "
+cmd="tar --exclude-from $thisdir/create_release_tarball_excludes -h -czf $tarball aomp$majorver"
echo "----------------- START tar COMMAND -----------------"
echo "time $cmd"
time $cmd
diff --git a/bin/debian/changelog b/bin/debian/changelog
index 620773b5b7..ba93cb3d34 100644
--- a/bin/debian/changelog
+++ b/bin/debian/changelog
@@ -1119,5 +1119,64 @@ aomp (19.0-3) UNRELEASED; urgency=medium
* Replaced libomptarget.devicertl.a with target specific bitcode libraries.
*
* 22.0-1
+ *
+ * Switch to ROCm 7.0.1 sources
+ * Add BUILD_ICD to build_hipamd.sh to support OpenCL
+ * Use of aomp-shellcheck on build scripts
+ * Merge aomp-shell-format
+ * Rename aomp-shell-format to aomp-shellcheck
+ * Run aomp-shellcheck on aomp_common_vars and dependent build scripts
+ * Unit testing for shell scripts
+ * Change RCCL build from install.sh to traditional build
+ * Cleanup to remove AOMP_APPLY_ATD_AMD_STAGING_PATCH
+ * Deprecated rocprof and rocprofv2 in favor of rocprofv3 from rocprofiler-sdk
+ *
+ * flang updates:
+ *
+ * Support for complex math intrinsics in target offload regions
+ * Reduction support for do concurrent
+ * Mapping improvements
+ * Add canonical loop operations
+ * Allow cycle in target teams distribute [simd]
+ * Additional support for debug in target regions
+ * Improved alias analysis
+ * Support directive spellings introduced in OpenMP 6.0
+ * Added atomic controls options for OpenMP offload:
+ * -f[no-]atomic-remote-memory
+ * -f[no-]atomic-fine-grained-memory
+ * -f[no-]atomic-ignore-denormal-mode
+ * -f[no-]ignore-denormal-mode
+ * -m[no-]unsafe-fp-atomics (alias for -f[no-]ignore-denormal-mode)
+ * Added support for complex pow
+ * Add 6.1 as a valid OpenMP version
+ * Implement LOWER= argument for C_F_POINTER (Fortran 2023)
+ * Implement !$omp unroll using omp.unroll_heuristic
+ * For do concurrent enable delayed localization by default
+ * Fixed issue with named constants in SHARED and FIRSTPRIVATE clauses
+ * Don't privatize implicit symbols declare by nested BLOCKs
+ * Reassociate ATOMIC update expressions (currently integer type only)
+ * Parse OpenMP 6.0 map modifiers
+ * Add -fintrinsic-modules-path= alias
+ * Support -gsplit-dwarf
+ * Add support for -ffast-real-mod
+ * Implicitly map nested allocatable components in derived types
+ * do concurrent: support reduce on device
+ * do concurrent: support local on device
+ * Preserve to/from flags in mapper base entry for mappers
+ * Add new ConvertComplexPow pass for Flang
+ * Support -flto-partitions=N and -f[no]fat-lto-objects
+ * Support -gdwarf-N option
+ * Extend do concurrent mapping to device
+ * Enable tiling - supports tripcount not a multiple of tile size
+ * Fix mapping of character type with LEN > 1 specified
+ * Fix default firstprivatization miscategorization of mod file symbols
+ * Reassociate logical ATOMIC update expressions
+ * Reassociate floating-point ATOMIC update expressions (with -ffast-math)
+ * Add SPMD-No-Loop mode to OpenMP offload runtime requires setting both of the following flags:
+ * -fopenmp-assume-teams-oversubscription
+ * -fopenmp-assume-threads-oversubscription
+ * 22.0-2
+ *
+ * 22.0-3
-- Greg Rodgers Thu, 19 May 2022 23:34:44 -0500
diff --git a/bin/package.py b/bin/package.py
index fbb67ec87a..af3d22b68a 100644
--- a/bin/package.py
+++ b/bin/package.py
@@ -12,10 +12,10 @@ class Aomp(MakefilePackage):
""" llvm openmp compiler from AMD"""
homepage = "https://github.com/ROCm/aomp"
- url = "https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp-22.0-1.tar.gz"
+ url = "https://github.com/ROCm/aomp/releases/download/rel_22.0-2/aomp-22.0-2.tar.gz"
# Fixme: this will be adjusted when spack create is called. When copying over to your own package.py omit this line.
- version('22.0-1', sha256='7ea4e218b171585441278f3562d97779006b12bc3b5dc201901f2d757226da84')
+ version('22.0-2', sha256='7ea4e218b171585441278f3562d97779006b12bc3b5dc201901f2d757226da84')
family = 'compiler'
diff --git a/bin/package_release_tarball.sh b/bin/package_release_tarball.sh
new file mode 100755
index 0000000000..e2ac40e304
--- /dev/null
+++ b/bin/package_release_tarball.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+#
+# package_release_tarball.sh: Build the tarball for aomp release
+#
+# --- Start standard header to set AOMP environment variables ----
+realpath=$(realpath "$0")
+thisdir=$(dirname "$realpath")
+. "$thisdir/aomp_common_vars"
+# --- end standard header ----
+
+pkgname=aomp
+echo "Building $pkgname package"
+
+dirname="aomp_${AOMP_VERSION_STRING}"
+sourcedir="/usr/lib/$dirname"
+installdir="/usr/lib/$dirname"
+
+tmpdir="/tmp/build-tar"
+builddir="$tmpdir/$pkgname"
+froot="$builddir/$pkgname-$AOMP_VERSION"
+
+if [ -d "$builddir" ] ; then
+ echo
+ echo "--- CLEANUP LAST BUILD: rm -rf $builddir"
+ rm -rf "$builddir"
+fi
+
+mkdir -p "$froot$installdir"
+rsync -a "$sourcedir/" --exclude ".*" "$froot$installdir"
+
+cd "$froot$installdir/../" || exit
+tarball="$AOMP_REPOS/../aomp-${AOMP_VERSION_STRING}.tar.gz"
+tar -czf $tarball $dirname
diff --git a/bin/patches/UMT-5-9-0-amdflang-mods.patch b/bin/patches/UMT-5-9-0-amdflang-mods.patch
index fb47674a5f..ba9ee286f6 100644
--- a/bin/patches/UMT-5-9-0-amdflang-mods.patch
+++ b/bin/patches/UMT-5-9-0-amdflang-mods.patch
@@ -61,10 +61,10 @@ index b348b26..ff000f1 100644
endif()
diff --git a/src/cmake/GetGPUInfo.cmake b/src/cmake/GetGPUInfo.cmake
-index 2a337a9..fac34e0 100644
+index 2a337a9..b15ced1 100644
--- a/src/cmake/GetGPUInfo.cmake
+++ b/src/cmake/GetGPUInfo.cmake
-@@ -14,28 +14,40 @@ if (ENABLE_OPENMP_OFFLOAD)
+@@ -14,28 +14,52 @@ if (ENABLE_OPENMP_OFFLOAD)
message(STATUS "Checking for GPU...")
if (CMAKE_CUDA_ARCHITECTURES STREQUAL 70)
message(STATUS "-- Detected NVIDIA Volta, setting device num processors to 80")
@@ -77,6 +77,18 @@ index 2a337a9..fac34e0 100644
-
+ set(IS_AMDGPU FALSE)
+ add_compile_definitions(IS_AMDGPU=0)
++ set(OPENMP_UNIFIED_MEMORY FALSE)
++ elseif (CMAKE_HIP_ARCHITECTURES STREQUAL gfx1100)
++# AMD RX7900XT* - 96 CUs
++message(STATUS "-- Detected AMD RX7900XT*, setting device num processors to 96")
++ set(OMP_DEVICE_NUM_PROCESSORS 96)
++ add_compile_definitions(OMP_DEVICE_NUM_PROCESSORS=96)
++ set(GSET_MIN_SIZE 16)
++ set(MAX_NUM_SWEEP_HYPER_DOMAINS 1)
++ set(MAX_NUM_GTA_HYPER_DOMAINS 96)
++ set(OMP_DEVICE_TEAM_THREAD_LIMIT 512)
++ set(IS_AMDGPU TRUE)
++ add_compile_definitions(IS_AMDGPU=1)
+ set(OPENMP_UNIFIED_MEMORY FALSE)
elseif (CMAKE_HIP_ARCHITECTURES STREQUAL gfx90a)
# AMD MI250X - 110 CUs
@@ -86,8 +98,9 @@ index 2a337a9..fac34e0 100644
set(GSET_MIN_SIZE 16)
set(MAX_NUM_SWEEP_HYPER_DOMAINS 1)
set(MAX_NUM_GTA_HYPER_DOMAINS 110)
- set(OMP_DEVICE_TEAM_THREAD_LIMIT 1024)
+- set(OMP_DEVICE_TEAM_THREAD_LIMIT 1024)
-
++ set(OMP_DEVICE_TEAM_THREAD_LIMIT 512)
+ set(IS_AMDGPU TRUE)
+ add_compile_definitions(IS_AMDGPU=1)
+ set(OPENMP_UNIFIED_MEMORY TRUE)
@@ -101,14 +114,15 @@ index 2a337a9..fac34e0 100644
set(MAX_NUM_SWEEP_HYPER_DOMAINS 1)
+ set(MAX_NUM_HYPER_DOMAINS 40)
set(MAX_NUM_GTA_HYPER_DOMAINS 228)
+- set(OMP_DEVICE_TEAM_THREAD_LIMIT 1024)
+-
+ set(IS_AMDGPU TRUE)
+ add_compile_definitions(IS_AMDGPU=1)
- set(OMP_DEVICE_TEAM_THREAD_LIMIT 1024)
--
++ set(OMP_DEVICE_TEAM_THREAD_LIMIT 512)
else()
message(ERROR "-- Unrecogized or unset value for CUDA or HIP architecture.")
endif()
-@@ -43,11 +55,16 @@ if (ENABLE_OPENMP_OFFLOAD)
+@@ -43,11 +67,16 @@ if (ENABLE_OPENMP_OFFLOAD)
else()
message(STATUS "-- No GPU detected.")
# These are only used if running the GPU kernels on the CPU for testing purposes.
diff --git a/bin/patches/ninja-nprocs-v1.13.0.patch b/bin/patches/ninja-nprocs-v1.13.0.patch
new file mode 100644
index 0000000000..a0a32ac117
--- /dev/null
+++ b/bin/patches/ninja-nprocs-v1.13.0.patch
@@ -0,0 +1,72 @@
+diff --git a/src/ninja.cc b/src/ninja.cc
+index 85ae6eb..6e07fe9 100644
+--- a/src/ninja.cc
++++ b/src/ninja.cc
+@@ -252,15 +252,40 @@ void Usage(const BuildConfig& config) {
+
+ /// Choose a default value for the -j (parallelism) flag.
+ int GuessParallelism() {
+- switch (int processors = GetProcessorCount()) {
++ int nprocs = GetProcessorCount();
++ switch (nprocs) {
+ case 0:
+ case 1:
+- return 2;
+ case 2:
+- return 3;
++ nprocs++;
++ break;
+ default:
+- return processors + 2;
++ nprocs += 2;
++ break;
+ }
++
++ const char * nprocs_str = getenv("NINJA_NPROCS");
++ if (!nprocs_str) return nprocs;
++
++ char * end;
++ auto nprocs_env = strtol(nprocs_str, &end, 10);
++
++ if (*end != 0 || nprocs_env <= 0) return nprocs;
++
++ return int(nprocs_env);
++}
++
++/// Returns verbosity mode from the environment variable
++int HasVerbose() {
++ const char * verbose_str = getenv("NINJA_VERBOSE");
++ if (!verbose_str) return 0;
++
++ char * end;
++ auto verbose = strtol(verbose_str, &end, 10);
++
++ if (*end != 0 || verbose <= 0) return 0;
++
++ return verbose > 0;
+ }
+
+ /// Rebuild the build manifest, if necessary.
+@@ -1779,6 +1804,9 @@ int ReadFlags(int* argc, char*** argv,
+ *argv += optind;
+ *argc -= optind;
+
++ if (HasVerbose())
++ config->verbosity = BuildConfig::VERBOSE;
++
+ return -1;
+ }
+
+diff --git a/src/version.cc b/src/version.cc
+index 0ee3061..ae5701b 100644
+--- a/src/version.cc
++++ b/src/version.cc
+@@ -20,7 +20,7 @@
+
+ using namespace std;
+
+-const char* kNinjaVersion = "1.13.0";
++const char* kNinjaVersion = "1.13.0-mk";
+
+ void ParseVersion(const string& version, int* major, int* minor) {
+ size_t end = version.find('.');
diff --git a/bin/patches/ninja-nprocs-v1.13.1.patch b/bin/patches/ninja-nprocs-v1.13.1.patch
new file mode 100644
index 0000000000..129d1ede8a
--- /dev/null
+++ b/bin/patches/ninja-nprocs-v1.13.1.patch
@@ -0,0 +1,85 @@
+diff --git a/src/ninja.cc b/src/ninja.cc
+index 92d0761..8e3e1b8 100644
+--- a/src/ninja.cc
++++ b/src/ninja.cc
+@@ -252,15 +252,40 @@ void Usage(const BuildConfig& config) {
+
+ /// Choose a default value for the -j (parallelism) flag.
+ int GuessParallelism() {
+- switch (int processors = GetProcessorCount()) {
++ int nprocs = GetProcessorCount();
++ switch (nprocs) {
+ case 0:
+ case 1:
+- return 2;
+ case 2:
+- return 3;
++ nprocs++;
++ break;
+ default:
+- return processors + 2;
++ nprocs += 2;
++ break;
+ }
++
++ const char * nprocs_str = getenv("NINJA_NPROCS");
++ if (!nprocs_str) return nprocs;
++
++ char * end;
++ auto nprocs_env = strtol(nprocs_str, &end, 10);
++
++ if (*end != 0 || nprocs_env <= 0) return nprocs;
++
++ return int(nprocs_env);
++}
++
++/// Returns verbosity mode from the environment variable
++int HasVerbose() {
++ const char * verbose_str = getenv("NINJA_VERBOSE");
++ if (!verbose_str) return 0;
++
++ char * end;
++ auto verbose = strtol(verbose_str, &end, 10);
++
++ if (*end != 0 || verbose <= 0) return 0;
++
++ return verbose > 0;
+ }
+
+ /// Rebuild the build manifest, if necessary.
+@@ -1781,6 +1806,9 @@ int ReadFlags(int* argc, char*** argv,
+ *argv += optind;
+ *argc -= optind;
+
++ if (HasVerbose())
++ config->verbosity = BuildConfig::VERBOSE;
++
+ return -1;
+ }
+
+diff --git a/src/status_printer.cc b/src/status_printer.cc
+index e69cd15..0b9d0f8 100644
+--- a/src/status_printer.cc
++++ b/src/status_printer.cc
+@@ -51,7 +51,7 @@ StatusPrinter::StatusPrinter(const BuildConfig& config)
+
+ progress_status_format_ = getenv("NINJA_STATUS");
+ if (!progress_status_format_)
+- progress_status_format_ = "[%f/%t] ";
++ progress_status_format_ = "[%es %p %rx %f/%t] ";
+ }
+
+ void StatusPrinter::EdgeAddedToPlan(const Edge* edge) {
+diff --git a/src/version.cc b/src/version.cc
+index 17e59e6..7b8d94c 100644
+--- a/src/version.cc
++++ b/src/version.cc
+@@ -20,7 +20,7 @@
+
+ using namespace std;
+
+-const char* kNinjaVersion = "1.14.0.git";
++const char* kNinjaVersion = "1.13.1-mk";
+
+ void ParseVersion(const string& version, int* major, int* minor) {
+ size_t end = version.find('.');
diff --git a/bin/patches/ninja-nprocs-v1.13.2.patch b/bin/patches/ninja-nprocs-v1.13.2.patch
new file mode 100644
index 0000000000..342aaf57f6
--- /dev/null
+++ b/bin/patches/ninja-nprocs-v1.13.2.patch
@@ -0,0 +1,85 @@
+diff --git a/src/ninja.cc b/src/ninja.cc
+index 92d0761..8e3e1b8 100644
+--- a/src/ninja.cc
++++ b/src/ninja.cc
+@@ -252,15 +252,40 @@ void Usage(const BuildConfig& config) {
+
+ /// Choose a default value for the -j (parallelism) flag.
+ int GuessParallelism() {
+- switch (int processors = GetProcessorCount()) {
++ int nprocs = GetProcessorCount();
++ switch (nprocs) {
+ case 0:
+ case 1:
+- return 2;
+ case 2:
+- return 3;
++ nprocs++;
++ break;
+ default:
+- return processors + 2;
++ nprocs += 2;
++ break;
+ }
++
++ const char * nprocs_str = getenv("NINJA_NPROCS");
++ if (!nprocs_str) return nprocs;
++
++ char * end;
++ auto nprocs_env = strtol(nprocs_str, &end, 10);
++
++ if (*end != 0 || nprocs_env <= 0) return nprocs;
++
++ return int(nprocs_env);
++}
++
++/// Returns verbosity mode from the environment variable
++int HasVerbose() {
++ const char * verbose_str = getenv("NINJA_VERBOSE");
++ if (!verbose_str) return 0;
++
++ char * end;
++ auto verbose = strtol(verbose_str, &end, 10);
++
++ if (*end != 0 || verbose <= 0) return 0;
++
++ return verbose > 0;
+ }
+
+ /// Rebuild the build manifest, if necessary.
+@@ -1781,6 +1806,9 @@ int ReadFlags(int* argc, char*** argv,
+ *argv += optind;
+ *argc -= optind;
+
++ if (HasVerbose())
++ config->verbosity = BuildConfig::VERBOSE;
++
+ return -1;
+ }
+
+diff --git a/src/status_printer.cc b/src/status_printer.cc
+index e69cd15..0b9d0f8 100644
+--- a/src/status_printer.cc
++++ b/src/status_printer.cc
+@@ -51,7 +51,7 @@ StatusPrinter::StatusPrinter(const BuildConfig& config)
+
+ progress_status_format_ = getenv("NINJA_STATUS");
+ if (!progress_status_format_)
+- progress_status_format_ = "[%f/%t] ";
++ progress_status_format_ = "[%es %p %rx %f/%t] ";
+ }
+
+ void StatusPrinter::EdgeAddedToPlan(const Edge* edge) {
+diff --git a/src/version.cc b/src/version.cc
+index b108660..8fbd82b 100644
+--- a/src/version.cc
++++ b/src/version.cc
+@@ -20,7 +20,7 @@
+
+ using namespace std;
+
+-const char* kNinjaVersion = "1.13.2";
++const char* kNinjaVersion = "1.13.2-mk";
+
+ void ParseVersion(const string& version, int* major, int* minor) {
+ size_t end = version.find('.');
diff --git a/bin/patches/patch-control-file_23.0.txt b/bin/patches/patch-control-file_23.0.txt
new file mode 100644
index 0000000000..ba011601eb
--- /dev/null
+++ b/bin/patches/patch-control-file_23.0.txt
@@ -0,0 +1,13 @@
+openlibm: openlibm.patch
+RAJA: raja.patch
+RAJAPerf: rajaperf.patch
+GenASis: genasis.patch
+GenASiS_Basics: genasis_basics.patch
+hipamd: hipamd-rpath.patch
+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
+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 6c357f7ab8..cef5703248 100644
--- a/bin/patches/rocr-runtime-numa.patch
+++ b/bin/patches/rocr-runtime-numa.patch
@@ -1,13 +1,13 @@
diff --git a/runtime/hsa-runtime/CMakeLists.txt b/runtime/hsa-runtime/CMakeLists.txt
-index fbbcaf03..46977599 100644
+index cfcd3fba..cdc500bb 100644
--- a/runtime/hsa-runtime/CMakeLists.txt
+++ b/runtime/hsa-runtime/CMakeLists.txt
-@@ -292,7 +292,7 @@ if(${IMAGE_SUPPORT})
-
+@@ -335,7 +335,7 @@ if(${IMAGE_SUPPORT})
endif()
--target_link_libraries ( ${CORE_RUNTIME_TARGET} PRIVATE elf::elf dl pthread rt )
-+target_link_libraries ( ${CORE_RUNTIME_TARGET} PRIVATE elf::elf dl pthread rt numa drm_amdgpu drm)
- # For static package rocprofiler-register dependency is not required
- # Link to hsakmt target for shared library builds
- # Link to hsakmt-staticdrm target for static library builds
+ if (UNIX)
+- target_link_libraries ( ${CORE_RUNTIME_TARGET} PRIVATE elf::elf dl pthread rt )
++ target_link_libraries ( ${CORE_RUNTIME_TARGET} PRIVATE elf::elf dl pthread rt numa drm_amdgpu drm)
+ else()
+ target_link_libraries ( ${CORE_RUNTIME_TARGET} PRIVATE Ws2_32 )
+ target_link_directories(${CORE_RUNTIME_TARGET} PRIVATE ${DXCORE_LIB_PATH})
diff --git a/bin/rocm_quick_check.sh b/bin/rocm_quick_check.sh
index c35c237a9c..6e5ee3d687 100755
--- a/bin/rocm_quick_check.sh
+++ b/bin/rocm_quick_check.sh
@@ -1,4 +1,7 @@
#!/bin/bash
+# Copyright © Advanced Micro Devices, Inc., or its affiliates.
+cat /etc/os-release
+
if [ -e /proc/cmdline ]; then
cat /proc/cmdline
fi
@@ -27,6 +30,12 @@ else
echo "/usr/bin/python is missing FAIL"
fi
+if [ -e /usr/bin/python3 ]; then
+ echo "/usr/bin/python3 OK"
+else
+ echo "/usr/bin/python3 is missing FAIL"
+fi
+
echo "Checking for libnvida compute pieces "
if [ -e /usr/bin/dpkg ]; then
dpkg -l | grep -i nvid
@@ -110,7 +119,8 @@ else
echo "Warning ----Warning---- FileCheck was not found and is needed by smoke tests."
echo "FileCheck notfound. May need to install llvm-XY-tools (where XY is llvm version)."
fi
-
+echo python file check:
+which filecheck
echo "Checking for SRIOV "
if [ -e /sbin/lspci ]; then
diff --git a/bin/rocmlibs/build_half.sh b/bin/rocmlibs/build_half.sh
index 8ef9ffc843..418f567235 100755
--- a/bin/rocmlibs/build_half.sh
+++ b/bin/rocmlibs/build_half.sh
@@ -1,8 +1,4 @@
#!/bin/bash
-#
-#Copyright © Advanced Micro Devices, Inc., or its affiliates.
-#
-#SPDX-License-Identifier: MIT
#
# build_half.sh: script to build and install half
#
diff --git a/bin/rocmlibs/build_hipBLAS-common.sh b/bin/rocmlibs/build_hipBLAS-common.sh
index 8fe81aa675..ed16b68590 100755
--- a/bin/rocmlibs/build_hipBLAS-common.sh
+++ b/bin/rocmlibs/build_hipBLAS-common.sh
@@ -1,9 +1,4 @@
#!/bin/bash
-#
-#Copyright © Advanced Micro Devices, Inc., or its affiliates.
-#
-#SPDX-License-Identifier: MIT
-#
#
# build_hipprim-common.sh: Script to build and install hipprim-common library
# This build is classic cmake, make, make install
diff --git a/bin/rocmlibs/build_hipRAND.sh b/bin/rocmlibs/build_hipRAND.sh
index 92d8199c38..c35fab740c 100755
--- a/bin/rocmlibs/build_hipRAND.sh
+++ b/bin/rocmlibs/build_hipRAND.sh
@@ -1,9 +1,4 @@
#!/bin/bash
-#
-#Copyright © Advanced Micro Devices, Inc., or its affiliates.
-#
-#SPDX-License-Identifier: MIT
-#
#
# build_hipRAND.sh.sh: script to build rocRAND
#
diff --git a/bin/rocmlibs/build_hipSOLVER.sh b/bin/rocmlibs/build_hipSOLVER.sh
index 1e4316aa57..05137d502c 100755
--- a/bin/rocmlibs/build_hipSOLVER.sh
+++ b/bin/rocmlibs/build_hipSOLVER.sh
@@ -1,9 +1,4 @@
#!/bin/bash
-#
-#Copyright © Advanced Micro Devices, Inc., or its affiliates.
-#
-#SPDX-License-Identifier: MIT
-#
#
# build_rocsolver.sh: Script to build and install rocsolver library
#
diff --git a/bin/rocmlibs/build_rccl.sh b/bin/rocmlibs/build_rccl.sh
index eb68811aec..36c92c5608 100755
--- a/bin/rocmlibs/build_rccl.sh
+++ b/bin/rocmlibs/build_rccl.sh
@@ -1,9 +1,4 @@
#!/bin/bash
-#
-#Copyright © Advanced Micro Devices, Inc., or its affiliates.
-#
-#SPDX-License-Identifier: MIT
-#
#
# build_rccl.sh: Script to build and install rccl.
# This uses a slightly modified install.sh from rccl.
diff --git a/bin/rocmlibs/build_rocRAND.sh b/bin/rocmlibs/build_rocRAND.sh
index a7ad01b26f..d76261daf5 100755
--- a/bin/rocmlibs/build_rocRAND.sh
+++ b/bin/rocmlibs/build_rocRAND.sh
@@ -1,9 +1,4 @@
#!/bin/bash
-#
-#Copyright © Advanced Micro Devices, Inc., or its affiliates.
-#
-#SPDX-License-Identifier: MIT
-#
#
# build_rocRAND.sh: script to build rocRAND
#
diff --git a/bin/rocmlibs/patches/tensile.patch b/bin/rocmlibs/patches/tensile.patch
index 43a44bdfd3..83fc0b5d2c 100644
--- a/bin/rocmlibs/patches/tensile.patch
+++ b/bin/rocmlibs/patches/tensile.patch
@@ -1,5 +1,18 @@
+diff --git a/Tensile/Code.py b/Tensile/Code.py
+index eefccff..da321cd 100644
+--- a/Tensile/Code.py
++++ b/Tensile/Code.py
+@@ -632,7 +632,7 @@ class MacInst (Inst):
+ cStr = "v[%s+%u+%u*%u]" % ("vgprValuC", self.aIdx, self.bIdx, self.kernel["ThreadTile0"])
+ aStr = "v[%s+%u]" % ("vgprValuA_X%u_I%u"%(self.PLR,iui), self.aIdx)
+ bStr = "v[%s+%u]" % ("vgprValuB_X%u_I%u"%(self.PLR,iui), self.bIdx)
+- kStr += "v_dot4_i32_i8 %s, %s, %s, %s op_sel:[0,0] op_sel_hi:[1,1] //valuC[%u]%s" % (cStr, aStr, bStr, cStr, cidx, self.endLine)
++ kStr += "v_dot4_i32_i8 %s, %s, %s, %s //valuC[%u]%s" % (cStr, aStr, bStr, cStr, cidx, self.endLine)
+ # single precision
+ elif self.kernel["ProblemType"]["DataType"].isSingle():
+ for iui in range(0, self.innerUnroll):
diff --git a/Tensile/Common.py b/Tensile/Common.py
-index 86c6c577..376afc47 100644
+index 86c6c57..376afc4 100644
--- a/Tensile/Common.py
+++ b/Tensile/Common.py
@@ -307,7 +307,7 @@ globalParameters["SeparateArchitectures"] = False # write Tensile library metada
@@ -11,8 +24,21 @@ index 86c6c577..376afc47 100644
globalParameters["ExperimentalLogicDir"] = "/experimental/"
+diff --git a/Tensile/Components/MAC_I8X4.py b/Tensile/Components/MAC_I8X4.py
+index 72cf802..e8bb772 100644
+--- a/Tensile/Components/MAC_I8X4.py
++++ b/Tensile/Components/MAC_I8X4.py
+@@ -49,7 +49,7 @@ class MAC_I8X4_Plain(MAC):
+ vars["cStr"] = "v[vgprValuC+{a}+{b}*{ThreadTile0}]".format_map(vars)
+ vars["aStr"] = "v[vgprValuA_X{m}_I{iui}+{a}]".format_map(vars)
+ vars["bStr"] = "v[vgprValuB_X{m}_I{iui}+{b}]".format_map(vars)
+- kStr += "v_dot4_i32_i8 {cStr}, {aStr}, {bStr}, {cStr} op_sel:[0,0] op_sel_hi:[1,1] //valuC[{cidx}]{endLine}".format_map(vars)
++ kStr += "v_dot4_i32_i8 {cStr}, {aStr}, {bStr}, {cStr} //valuC[{cidx}]{endLine}".format_map(vars)
+ kStr += priority(writer, 1, "Raise priority while processing macs")
+
+ kStr += priority(writer, 0, "Reset priority after macs")
diff --git a/Tensile/Source/lib/include/Tensile/AMDGPU.hpp b/Tensile/Source/lib/include/Tensile/AMDGPU.hpp
-index 317250db..66eb5336 100644
+index 317250d..66eb533 100644
--- a/Tensile/Source/lib/include/Tensile/AMDGPU.hpp
+++ b/Tensile/Source/lib/include/Tensile/AMDGPU.hpp
@@ -60,6 +60,7 @@ namespace Tensile
@@ -44,7 +70,7 @@ index 317250db..66eb5336 100644
{
return AMDGPU::Processor::gfx942;
diff --git a/Tensile/Source/lib/include/Tensile/PlaceholderLibrary.hpp b/Tensile/Source/lib/include/Tensile/PlaceholderLibrary.hpp
-index a21e584d..c941f831 100644
+index a21e584..c941f83 100644
--- a/Tensile/Source/lib/include/Tensile/PlaceholderLibrary.hpp
+++ b/Tensile/Source/lib/include/Tensile/PlaceholderLibrary.hpp
@@ -44,6 +44,7 @@ namespace Tensile
@@ -65,7 +91,7 @@ index a21e584d..c941f831 100644
return "TensileLibrary_*_gfx942";
case LazyLoadingInit::gfx950:
diff --git a/Tensile/Source/lib/include/Tensile/Serialization/Predicates.hpp b/Tensile/Source/lib/include/Tensile/Serialization/Predicates.hpp
-index 361a0e14..b8b41723 100644
+index 361a0e1..b8b4172 100644
--- a/Tensile/Source/lib/include/Tensile/Serialization/Predicates.hpp
+++ b/Tensile/Source/lib/include/Tensile/Serialization/Predicates.hpp
@@ -220,6 +220,7 @@ namespace Tensile
@@ -77,7 +103,7 @@ index 361a0e14..b8b41723 100644
iot::enumCase(io, value, "gfx950", AMDGPU::Processor::gfx950);
iot::enumCase(io, value, "gfx1010", AMDGPU::Processor::gfx1010);
diff --git a/Tensile/TensileCreateLib/ParseArguments.py b/Tensile/TensileCreateLib/ParseArguments.py
-index f19dab13..be76194a 100644
+index f19dab1..be76194 100644
--- a/Tensile/TensileCreateLib/ParseArguments.py
+++ b/Tensile/TensileCreateLib/ParseArguments.py
@@ -259,7 +259,7 @@ def parseArguments(input: Optional[List[str]] = None) -> Dict[str, Any]:
@@ -90,7 +116,7 @@ index f19dab13..be76194a 100644
)
parser.add_argument(
diff --git a/docs/src/cli-reference/tensile-create-library-cli.rst b/docs/src/cli-reference/tensile-create-library-cli.rst
-index 4826f944..78ec17c5 100644
+index 4826f94..78ec17c 100644
--- a/docs/src/cli-reference/tensile-create-library-cli.rst
+++ b/docs/src/cli-reference/tensile-create-library-cli.rst
@@ -54,7 +54,7 @@ Here is the list of optional arguments for invoking the ``TensileCreateLibrary``
@@ -103,7 +129,7 @@ index 4826f944..78ec17c5 100644
gfx1100; gfx1101; gfx1102; gfx1103; gfx1150; gfx1151; gfx1200; gfx1201.
diff --git a/pytest.ini b/pytest.ini
-index 93384c4b..13d9e054 100644
+index 93384c4..13d9e05 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -92,6 +92,7 @@ markers =
diff --git a/bin/run_OpenMP_VV.sh b/bin/run_OpenMP_VV.sh
index c4fe6bb3e2..a417501e49 100755
--- a/bin/run_OpenMP_VV.sh
+++ b/bin/run_OpenMP_VV.sh
@@ -213,8 +213,21 @@ if [ "${make_target}" != "all" ]; then
elif [ "${testcase_omp_version}" == "4.5" ]; then
export openmpvv_compile_flags="${openmpvv_compile_flags} -fopenmp-version=45"
fi
+
+ if gpu_needs_xnack_for_usm "${AOMP_GPU}" && ! is_apu && [ "${HSA_XNACK}" == "" ]; then
+ export HSA_XNACK=1
+ enable_xnack=1
+ echo "Turning on HSA_XNACK=1 to allow USM tests to pass."
+ fi
+
+ # Perform single-test make and run
perform_make OMP_VERSION="${testcase_omp_version}" SOURCES="${testcase}"
rc=$?
+
+ if [ "${enable_xnack}" == 1 ]; then
+ unset HSA_XNACK
+ fi
+
echo
echo "DONE: Single OPENMP_VV test case: ${testcase}"
echo " Source file: ${testcase_file_path}"
diff --git a/bin/run_RSBench.sh b/bin/run_RSBench.sh
index 1d176e23ab..e8ada16342 100755
--- a/bin/run_RSBench.sh
+++ b/bin/run_RSBench.sh
@@ -37,8 +37,14 @@ echo RUN_OPTIONS: $RUN_OPTIONS
for option in $RUN_OPTIONS; do
if [ "$option" == "openmp" ]; then
cd openmp-offload
+ # Update Makefile with detected GPU architecture
+ if [ -f Makefile ]; then
+ sed -i "s/-fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx[0-9a-zA-Z]*/--offload-arch=$AOMP_GPU/g" Makefile
+ echo "Updated Makefile: --offload-arch=$AOMP_GPU"
+ fi
make clean
export PATH=$AOMP/bin:$PATH
+ export LD_LIBRARY_PATH=$AOMP/lib:$LD_LIBRARY_PATH
make COMPILER=amd
if [ $? -ne 1 ]; then
./rsbench -m event 2>&1 | tee -a results.txt
diff --git a/bin/run_XSBench.sh b/bin/run_XSBench.sh
index bc2b99487f..110094943e 100755
--- a/bin/run_XSBench.sh
+++ b/bin/run_XSBench.sh
@@ -37,8 +37,14 @@ echo RUN_OPTIONS: $RUN_OPTIONS
for option in $RUN_OPTIONS; do
if [ "$option" == "openmp" ]; then
cd openmp-offload
+ # Update Makefile with detected GPU architecture
+ if [ -f Makefile ]; then
+ sed -i "s/-fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx[0-9a-zA-Z]*/--offload-arch=$AOMP_GPU/g" Makefile
+ echo "Updated Makefile: --offload-arch=$AOMP_GPU"
+ fi
make clean
export PATH=$AOMP/bin:$PATH
+ export LD_LIBRARY_PATH=$AOMP/lib:$LD_LIBRARY_PATH
make COMPILER=amd
if [ $? -ne 1 ]; then
./XSBench -m event 2>&1 | tee -a results.txt
@@ -46,6 +52,13 @@ for option in $RUN_OPTIONS; do
cd ..
elif [ "$option" == "hip" ]; then
cd hip
+ # Add missing #include to source files if not present
+ for srcfile in io.cpp Materials.cpp; do
+ if [ -f $srcfile ] && ! grep -q '#include ' $srcfile; then
+ sed -i '1i #include ' $srcfile
+ echo "Added #include to $srcfile"
+ fi
+ done
make clean
export PATH=$AOMP/bin:$PATH
make
diff --git a/bin/run_accel2023.sh b/bin/run_accel2023.sh
index 02f6fd203d..5ab8dd5e61 100755
--- a/bin/run_accel2023.sh
+++ b/bin/run_accel2023.sh
@@ -35,6 +35,6 @@ if [ "$1" == "-clean" ]; then
else
cd ${ACCEL2023_SOURCE_DIR} || exit 1
fi
-export PATH=$AOMP/../bin:$AOMP/../../bin:$AOMP/lib/llvm/bin:$PATH
+export PATH=$HOME/openmp-utils/bin:$AOMP/../bin:$AOMP/../../bin:$AOMP/lib/llvm/bin:$PATH
./runOne
#grep ratio= result/*.log
diff --git a/bin/run_babelstream.sh b/bin/run_babelstream.sh
index 30426dd231..68077f73d3 100755
--- a/bin/run_babelstream.sh
+++ b/bin/run_babelstream.sh
@@ -34,6 +34,9 @@ export ROCR_VISIBLE_DEVICES=0
# --- end standard header ----
if [ "$1" != "nocopy" ] ; then
+pushd $AOMP_REPOS_TEST/$AOMP_BABELSTREAM_REPO_NAME
+git checkout 2f00dfb
+popd
patchrepo $AOMP_REPOS_TEST/$AOMP_BABELSTREAM_REPO_NAME
fi
@@ -160,7 +163,7 @@ echo RUN_OPTIONS: $RUN_OPTIONS
thisdate=`date`
echo >>results.txt
echo "=========> RUNDATE: $thisdate" >>results.txt
-COMPILER=`$AOMP/bin/llc --version | grep version`
+COMPILER=`$AOMP/bin/clang --version | grep version`
echo "=========> COMPILER: $COMPILER" >>results.txt
echo "=========> GPU: $AOMP_GPU" >>results.txt
compile_error=0
diff --git a/bin/run_composable-kernels.sh b/bin/run_composable-kernels.sh
index 2859f23fb3..931b65ec8e 100755
--- a/bin/run_composable-kernels.sh
+++ b/bin/run_composable-kernels.sh
@@ -1,11 +1,13 @@
#!/usr/bin/env bash
+
#
#Copyright © Advanced Micro Devices, Inc., or its affiliates.
#
#SPDX-License-Identifier: MIT
-#
+#
+
set -x
-CKRepoURL='https://github.com/ROCm/composable_kernel.git'
+CKRepoURL='https://github.com/ROCm/rocm-libraries.git'
CKRepoBranchName='develop'
CKBenchmarkRepoBranchName='main'
@@ -13,6 +15,12 @@ CKBenchmarkRepoBranchName='main'
# when building CK. This is likely a bit conservative.
CKBuildParallelism=$(free -g | grep Mem | awk '{print int($2/10)}')
+# Check if the user overrode number of parallel build jobs
+# via env var
+if [ ! -z ${CK_BUILD_PARALLELISM} ]; then
+ CKBuildParallelism=${CK_BUILD_PARALLELISM}
+fi
+
realpath=$(realpath $0)
thisdir=$(dirname $realpath)
@@ -25,11 +33,12 @@ function printHelp {
echo "Usage: run_composable-kernels.sh"
echo " -h: Show this help message"
echo " -i: Install the (incremental) CK build"
+ echo " -l: Library-only build (no examples or tests)"
echo " -r: Rebuild the CK repo"
echo " -u: Update the CK repo"
echo " -b: Update the CK benchmarks repo"
- echo " -s : Select from:" \
- "[benchmarks client-examples smoke regression]. (Default: benchmarks)"
+ echo " -s : Select from:" \
+ "[benchmarks client-examples smoke regression skip]. (Default: skip)"
echo " -t : Run from selected suite (e.g. 'gemm/fa1.yaml')"
exit 0
}
@@ -123,6 +132,8 @@ function getLDLibraryPathExportCmd {
# Some tests may require an installed instance of CK.
ShouldInstallCK='no'
+# It my be desired to build the CK library only, without any examples or tests.
+ShouldBuildLibraryOnly='no'
# For some situations during testing it may not be desired to rebuild the CK repo.
ShouldRebuildCK='no'
# While doing perf / other compiler work, keeping CK fix is useful.
@@ -132,13 +143,17 @@ ShouldUpdateCKRepo='no'
ShouldUpdateCKBenchmarks='no'
# CK may be run using different test- or benchmark-suites.
-SelectedSuite='benchmarks'
+SelectedSuite='skip'
# CK may be run using a specfic test from the selected suite.
SelectedTest=''
-while getopts "hirubs:t:" opt; do
+while getopts "j:hilrubs:t:" opt; do
case ${opt} in
+ j)
+ # User-defined parallelism for CK build via argument
+ CKBuildParallelism="${OPTARG}"
+ ;;
h)
printHelp
;;
@@ -146,6 +161,10 @@ while getopts "hirubs:t:" opt; do
# Install the CK build
ShouldInstallCK='yes'
;;
+ l)
+ # Build the CK library only
+ ShouldBuildLibraryOnly='yes'
+ ;;
r)
# Rebuild the CK repo
ShouldRebuildCK='yes'
@@ -162,34 +181,38 @@ while getopts "hirubs:t:" opt; do
# Select benchmark or test suite.
# To support this as an optional argument, we take a look at the next.
case ${OPTARG} in
- benchmarks)
- # Run the CK benchmarks.
- SelectedSuite="${OPTARG}"
- ;;
- client-examples)
- # Build and run the client examples provided by CK.
- SelectedSuite="${OPTARG}"
- ;;
- examples)
- # Build and run the examples provided by CK.
- SelectedSuite="${OPTARG}"
- ;;
- smoke)
- # A minimal smoke test suite.
- SelectedSuite="${OPTARG}"
- ;;
- regression)
- # A minimal regression test suite.
- SelectedSuite="${OPTARG}"
- ;;
- *)
- # If there's a following string which does not start with '-'
- # we interpret it as an attempt at providing an unknown suite.
- if [[ "${OPTARG}" =~ ^[^-].*$ ]]; then
- echo "Unknown suite: ${OPTARG}"
- printHelp
- fi
- ;;
+ skip)
+ # Skip running any suite.
+ SelectedSuite='skip'
+ ;;
+ benchmarks)
+ # Run the CK benchmarks.
+ SelectedSuite="${OPTARG}"
+ ;;
+ client-examples)
+ # Build and run the client examples provided by CK.
+ SelectedSuite="${OPTARG}"
+ ;;
+ examples)
+ # Build and run the examples provided by CK.
+ SelectedSuite="${OPTARG}"
+ ;;
+ smoke)
+ # A minimal smoke test suite.
+ SelectedSuite="${OPTARG}"
+ ;;
+ regression)
+ # A minimal regression test suite.
+ SelectedSuite="${OPTARG}"
+ ;;
+ *)
+ # If there's a following string which does not start with '-'
+ # we interpret it as an attempt at providing an unknown suite.
+ if [[ "${OPTARG}" =~ ^[^-].*$ ]]; then
+ echo "Unknown suite: ${OPTARG}"
+ printHelp
+ fi
+ ;;
esac
;;
t)
@@ -204,13 +227,14 @@ done
# Set the default build prefix, i.e., build-top-level
: ${CK_TOP:=$AOMP_REPOS_TEST/composable-kernels}
-: ${CK_REPO:=$CK_TOP/ck-src}
+: ${CK_REPO:=$CK_TOP/rocm-libraries}
+: ${CK_SRC:=$CK_REPO/projects/composablekernel}
: ${CK_BUILD:=$CK_TOP/ck-build}
: ${CK_BENCHMARK_REPO:=$CK_TOP/ck-benchmark}
# Move this to its own place, to avoid potential permission conflicts with certain setups.
: ${CK_BENCHMARK_RESULT:=$CK_TOP/ck-benchmark-result}
: ${CK_INSTALL:=$CK_TOP/ck-install}
-: ${CK_CLIENT_EXAMPLES_SOURCE:=$CK_REPO/client_example}
+: ${CK_CLIENT_EXAMPLES_SOURCE:=$CK_SRC/client_example}
: ${CK_CLIENT_EXAMPLES_BUILD:=$CK_TOP/ck-client-examples-build}
# Run regular and client examples on multiple GPUs (if present)
: ${CK_EXAMPLES_PARALLEL:='yes'}
@@ -251,7 +275,7 @@ if [ ! -d ${CK_TOP} ]; then
fi
if [ ! -d ${CK_REPO} ]; then
- git clone ${CKRepoURL} ${CK_REPO}
+ git clone --single-branch --depth 1 ${CKRepoURL} ${CK_REPO}
elif [ "${ShouldUpdateCKRepo}" == 'yes' ]; then
pushd ${CK_REPO} || exit 1
git reset --hard origin/${CKRepoBranchName}
@@ -261,10 +285,25 @@ elif [ "${ShouldUpdateCKRepo}" == 'yes' ]; then
popd
fi
+CKBuildTool='make'
+if command -v ninja >/dev/null; then
+ CmakeGenerator="-GNinja"
+ CKBuildTool='ninja'
+fi
+
# TODO Fix / Finalize the cmake command
-CKCmakeCmd="cmake -GNinja -B ${CK_BUILD} -S ${CK_REPO} -DCMAKE_PREFIX_PATH=${ROCM_PATH} -DCMAKE_INSTALL_PREFIX=${CK_INSTALL} "
+CKCmakeCmd="cmake ${CmakeGenerator} -B ${CK_BUILD} -S ${CK_SRC} -DCMAKE_PREFIX_PATH=${ROCM_PATH} -DCMAKE_INSTALL_PREFIX=${CK_INSTALL} "
CKCmakeCmd+="-DCMAKE_CXX_COMPILER=${AOMP}/bin/clang++ -DCMAKE_HIP_COMPILER=${AOMP}/bin/clang++ "
-CKCmakeCmd+="-DCMAKE_BUILD_TYPE=Release -DGPU_TARGETS=${CK_GPU_TARGETS} "
+CKCmakeCmd+="-DCMAKE_BUILD_TYPE=Release "
+
+# Handle library-only build for CK
+# Note: GPU_ARCHS takes precedence over GPU_TARGETS and omits examples & tests
+if [ "${ShouldBuildLibraryOnly}" == 'yes' ]; then
+ CKCmakeCmd+="-DGPU_ARCHS=${CK_GPU_TARGETS} "
+else
+ CKCmakeCmd+="-DGPU_TARGETS=${CK_GPU_TARGETS} "
+fi
+
# For some reason, CK on gfx12 wants this set.
CKCmakeCmd+="-DBUILD_DEV=On"
@@ -292,11 +331,16 @@ fi
if [ "${ShouldRebuildCK}" == 'yes' ] || [ "${ShouldInstallCK}" == 'yes' ]; then
pushd ${CK_BUILD} || exit 1
- time ninja -j ${CKBuildParallelism}
+ # -k parameter avoids stopping at first error
+ # ckProfiler target seems to depend on all library targets, which we want to build first
+ /usr/bin/time -o build-times.tlog ${CKBuildTool} -j ${CKBuildParallelism} -k 0 ckProfiler
if [ $? -ne 0 ]; then
exit 1
fi
+ # Find build success in the build log
+ echo "CK-BUILD-SUCCESS"
+
popd
fi
@@ -305,11 +349,14 @@ if [ "${ShouldInstallCK}" == 'yes' ]; then
pushd ${CK_BUILD} || exit 1
# TODO: Check parallelism. This may use all available threads.
- time ninja install
+ /usr/bin/time -o install-times.tlog ${CKBuildTool} -k 0 install
if [ $? -ne 0 ]; then
exit 1
fi
+ # Find install success in the log
+ echo "CK-INSTALL-SUCCESS"
+
popd
fi
@@ -318,8 +365,8 @@ echo "Run suite: ${SelectedSuite}"
# Check if parallel execution is requested and possible
UseParallel=0
if ([ "${SelectedSuite}" == 'client-examples' ] ||
- [ "${SelectedSuite}" == 'examples' ]) &&
- [ "${CK_EXAMPLES_PARALLEL}" == 'yes' ]; then
+ [ "${SelectedSuite}" == 'examples' ]) &&
+ [ "${CK_EXAMPLES_PARALLEL}" == 'yes' ]; then
if [ ! -z "$(command -v parallel)" ]; then
UseParallel=1
else
@@ -333,7 +380,7 @@ if [ "${SelectedSuite}" == 'smoke' ]; then
mkdir -p "${CK_TESTS_LOG_LOCATION}" || exit 1
fi
pushd ${CK_BUILD} || exit 1
- ninja -j 16 smoke 2>&1 | tee "${CK_TESTS_LOG_LOCATION}/smoke_tests.log"
+ ${CKBuildTool} -j 16 smoke 2>&1 | tee "${CK_TESTS_LOG_LOCATION}/smoke_tests.log"
echo "Log at ${CK_TESTS_LOG_LOCATION}/smoke_tests.log"
popd
fi
@@ -344,7 +391,7 @@ if [ "${SelectedSuite}" == 'regression' ]; then
mkdir -p "${CK_TESTS_LOG_LOCATION}" || exit 1
fi
pushd ${CK_BUILD} || exit 1
- ninja -j 16 regression 2>&1 | tee "${CK_TESTS_LOG_LOCATION}/regression_tests.log"
+ ${CKBuildTool} -j 16 regression 2>&1 | tee "${CK_TESTS_LOG_LOCATION}/regression_tests.log"
echo "Log at ${CK_TESTS_LOG_LOCATION}/regression_tests.log"
popd
fi
@@ -408,7 +455,7 @@ fi
# Handle CK client examples
if [ "${SelectedSuite}" == 'client-examples' ]; then
# Configure and build the client examples
- CKCmakeCmd="cmake -G Ninja "
+ CKCmakeCmd="cmake ${CmakeGenerator} "
CKCmakeCmd+="-B ${CK_CLIENT_EXAMPLES_BUILD} -S ${CK_CLIENT_EXAMPLES_SOURCE} "
CKCmakeCmd+="-DCMAKE_CXX_COMPILER=${AOMP}/bin/clang++ "
CKCmakeCmd+="-DCMAKE_HIP_COMPILER=${AOMP}/bin/clang++ "
@@ -436,14 +483,14 @@ if [ "${SelectedSuite}" == 'client-examples' ]; then
pushd ${CK_CLIENT_EXAMPLES_BUILD} || exit 1
- ninja
+ ${CKBuildTool}
if [ $? -ne 0 ]; then
exit 1
fi
# Process directories to exclude
# Usage of here-string to avoid sub-shell and removal of potential parentheses
- read -ra DirsToExclude <<< "${CK_CLIENT_EXAMPLES_TO_EXCLUDE//[()]/}"
+ read -ra DirsToExclude <<<"${CK_CLIENT_EXAMPLES_TO_EXCLUDE//[()]/}"
# Build argument list for find
# If globbed directories are provided, the list is expanded correspondingly
@@ -486,7 +533,7 @@ if [ "${SelectedSuite}" == 'client-examples' ]; then
RunCmd="echo \"Running client-example: ${ExamplePath}\";"
RunCmd+="\"${ExamplePath}\" | tee \"${ExampleLogfile}\""
ExampleRunCmds+=("${RunCmd}")
- done <<< "${ExamplesToRun}"
+ done <<<"${ExamplesToRun}"
NumJobs=${#ExampleRunCmds[@]}
echo "Found ${NumJobs} client-examples to run"
@@ -554,7 +601,7 @@ if [ "${SelectedSuite}" == 'examples' ]; then
RunCmd="echo \"Running example: ${ExamplePath}\";"
RunCmd+="\"${ExamplePath}\" | tee \"${ExampleLogfile}\""
ExampleRunCmds+=("${RunCmd}")
- done <<< "${ExamplesToRun}"
+ done <<<"${ExamplesToRun}"
NumJobs=${#ExampleRunCmds[@]}
echo "Found ${NumJobs} examples to run"
diff --git a/bin/run_fBabel.sh b/bin/run_fBabel.sh
index f6fc04aa7f..2bab219fed 100755
--- a/bin/run_fBabel.sh
+++ b/bin/run_fBabel.sh
@@ -112,7 +112,7 @@ echo RUN_OPTIONS: $RUN_OPTIONS
thisdate=`date`
echo >>results.txt
echo "=========> RUNDATE: $thisdate" >>results.txt
-COMPILER=`$AOMP/bin/llc --version | grep version`
+COMPILER=`$AOMP/bin/clang --version | grep version`
echo "=========> COMPILER: $COMPILER" >>results.txt
echo "=========> GPU: $AOMP_GPU" >>results.txt
compile_error=0
diff --git a/bin/run_genasis_flang_new.sh b/bin/run_genasis_flang_new.sh
index 6c1b541eb2..7da59262a8 100755
--- a/bin/run_genasis_flang_new.sh
+++ b/bin/run_genasis_flang_new.sh
@@ -110,10 +110,17 @@ if [[ "$USE_OPENMP_RUNTIME" -eq "1" ]] ; then
OMP_DEFINES+=" -DUSE_OPENMP_RUNTIME"
fi
+IMPLICIT_GPU_FLANG_RT=${IMPLICIT_GPU_FLANG_RT:-1}
+if [[ "$IMPLICIT_GPU_FLANG_RT" -eq "1" ]]; then
+ FORTRAN_OFFLOAD_LIB=
+else
+ FORTRAN_OFFLOAD_LIB="-fno-gpu-flang-rt -lflang_rt.hostdevice"
+fi
+
export LD_LIBRARY_PATH=$AOMP/lib:$AOMPHIP/lib:$OPENMPI_DIR/lib:$LD_LIBRARY_PATH
export FORTRAN_COMPILE="$AOMP/bin/$FLANG -c -fopenmp --offload-arch=$GPU_ID -fPIC -I$OPENMPI_DIR/lib -cpp $OMP_DEFINES -fstack-arrays"
export CC_COMPILE="$AOMP/bin/clang -fPIC"
-export FORTDEV_LIBS=${FORTDEV_LIBS:-"-lflang_rt.hostdevice"}
+export FORTDEV_LIBS=${FORTDEV_LIBS:-"$FORTRAN_OFFLOAD_LIB"}
export FORTHOST_LIBS=${FORTHOST_LIBS:-"-lflang_rt.runtime"}
export OTHER_LIBS="-lm -L$AOMP/lib $FORTHOST_LIBS $FORTDEV_LIBS -lomp -lomptarget -z muldefs "
export FORTRAN_LINK="$AOMP/bin/clang $OTHER_LIBS"
diff --git a/bin/run_gpurun_rocprof_env.sh b/bin/run_gpurun_rocprof_env.sh
index 2a05794650..dcf6b5b7ab 100755
--- a/bin/run_gpurun_rocprof_env.sh
+++ b/bin/run_gpurun_rocprof_env.sh
@@ -1,10 +1,5 @@
#!/bin/bash
#
-#Copyright © Advanced Micro Devices, Inc., or its affiliates.
-#
-#SPDX-License-Identifier: MIT
-#
-#
# run_gpurun_rocprof_env.sh : compare environments with different process launchers
#
# Rule1: Always run rocprof, rocgdb binaries from gpurun and not the opposite.
diff --git a/bin/run_hpc2021.sh b/bin/run_hpc2021.sh
index f25e423924..cf1fb84bfa 100755
--- a/bin/run_hpc2021.sh
+++ b/bin/run_hpc2021.sh
@@ -19,8 +19,10 @@ export AOMP_USE_CCACHE=0
: ${HPC2021_SOURCE_DIR:=$AOMP_REPOS_TEST/hpc2021-1.1.9}
: ${HPC2021_BUILD_NUM_THREADS:=32}
-export INST=${INST:-/tmp/npsdbInst$$/openmpi-5-flang}
-./npsdb_bld_ompi.sh
+if [ "$NO_HPC2021_MPI_BLD" == "" ]; then
+ export INST=${INST:-/tmp/npsdbInst$$/openmpi-5-flang}
+ ./npsdb_bld_ompi.sh
+fi
if [ "$1" == "-clean" ]; then
rm -rf ${HPC2021_SOURCE_DIR}
@@ -38,10 +40,11 @@ if [ "$1" == "-clean" ]; then
else
cd ${HPC2021_SOURCE_DIR} || exit 1
fi
-export PATH=$AOMP/../bin:$AOMP/../../bin:$PATH
+export PATH=$HOME/openmp-utils/bin:$AOMP/../bin:$AOMP/../../bin:$PATH
export MPI=$INST
# strange UCX warnings in dockers using openmpi, this suppresses
export UCX_LOG_LEVEL=error
+ulimit -t 200
./runOne
rm -rf $INST
#grep ratio= result/*.log
diff --git a/bin/run_llama.sh b/bin/run_llama.sh
new file mode 100755
index 0000000000..24cbc44757
--- /dev/null
+++ b/bin/run_llama.sh
@@ -0,0 +1,141 @@
+#!/usr/bin/env bash
+
+#
+#Copyright © Advanced Micro Devices, Inc., or its affiliates.
+#
+#SPDX-License-Identifier: MIT
+#
+
+# Build script for LLaMA with HIP support using AOMP compiler
+
+. aomp_common_vars
+
+: AOMP_GPU=${AOMP_GPU:=gfx90a}
+: ${LLAMA_GPU:=$AOMP_GPU}
+
+: ${LLAMA_TLDIR:=$AOMP_REPOS_TEST/llama}
+: ${LLAMA_BUILD_DIR:=$LLAMA_TLDIR/build}
+: ${LLAMA_SRC_DIR:=$LLAMA_TLDIR/src}
+: ${LLAMA_BUILD_MODE:=Release}
+: ${LLAMA_TESTS_LOG_LOCATION:=$LLAMA_TLDIR/logs}
+
+# Model to use in benchmarks (default is a smaller model)
+: ${LLAMA_BENCH_HF_ID:="ggml-org/gemma-3-1b-it-GGUF"}
+: ${LLAMA_CACHE:="$HOME/.cache/llama.cpp"}
+
+pushd "${AOMP_REPOS_TEST}" || exit
+mkdir -p "${LLAMA_TLDIR}" && cd "${LLAMA_TLDIR}" || exit
+
+# Run CMake configuration
+DoConfigure='no'
+
+# Run build command
+DoCompile='no'
+
+# Run ctest
+DoCTest='no'
+
+# Run benchmark (llama-bench)
+DoBenchmark='no'
+
+# Update llama sources
+DoUpdate='no'
+
+IsVerbose='no'
+
+while getopts "j:cbtveu" opt; do
+ case ${opt} in
+ j) AOMP_BUILD_JOBS=${OPTARG} ;;
+ c) DoConfigure='yes' ;;
+ b) DoCompile='yes' ;;
+ t) DoCTest='yes' ;;
+ v) IsVerbose='yes' ;;
+ e) DoBenchmark='yes' ;;
+ u) DoUpdate='yes' ;;
+ \?)
+ echo "Usage: cmd [-j build_jobs] [-c configure] [-b build] [-t ctest] [-e benchmark] [-v verbose] [-u update_sources]"
+ exit 1
+ ;;
+ esac
+done
+
+if [ "${IsVerbose}" == "yes" ]; then
+ set -x
+fi
+
+if command -v ninja >/dev/null; then
+ CmakeGenerator="-GNinja"
+fi
+
+if [ ! -d "${LLAMA_TESTS_LOG_LOCATION}" ]; then
+ mkdir -p "${LLAMA_TESTS_LOG_LOCATION}"
+fi
+
+if [ ! -d "${LLAMA_SRC_DIR}" ]; then
+ echo "Cloning llama.cpp repository..."
+ git clone https://github.com/ggml-org/llama.cpp.git src
+elif [ "${DoUpdate}" == "yes" ]; then
+ echo "Updating llama.cpp repository..."
+ cd "${LLAMA_SRC_DIR}" || exit
+ git pull
+ cd ..
+fi
+
+if ! command -v git-lfs >/dev/null; then
+ echo "WARNING: git-lfs is not installed. Expect some tests to fail."
+else
+ # Ensure git-lfs is initialized and pulls any large files
+ cd "${LLAMA_SRC_DIR}" || exit
+ git lfs install
+ git lfs pull
+ cd ..
+fi
+
+echo "Configuring build with CMake..."
+if [ "${DoConfigure}" == "yes" ]; then
+ rm -rf "${LLAMA_BUILD_DIR}"
+ cmake -B build \
+ -S src \
+ -DCMAKE_PREFIX_PATH="${AOMP}"/lib/cmake \
+ -DGGML_HIP=On \
+ -DCMAKE_BUILD_TYPE=${LLAMA_BUILD_MODE} \
+ -DGPU_TARGETS=${LLAMA_GPU} \
+ ${CmakeGenerator} \
+ -DCMAKE_C_COMPILER="${AOMP}"/bin/clang \
+ -DCMAKE_CXX_COMPILER="${AOMP}"/bin/clang++ \
+ -DCMAKE_HIP_COMPILER="${AOMP}"/bin/clang++
+fi
+
+if [ "${DoCompile}" == "yes" ]; then
+ echo "Building LLaMA..."
+ cmake --build "${LLAMA_BUILD_DIR}" --parallel -j "${AOMP_BUILD_JOBS}"
+fi
+
+if [ "${DoCTest}" == "yes" ]; then
+ echo "Running tests..."
+ cd "${LLAMA_BUILD_DIR}" || exit
+ echo "Log in ${LLAMA_TESTS_LOG_LOCATION}/ctest.log"
+
+ # Some model files are git-lfs and come from huggingface. They will auto-download during test
+ ctest --output-on-failure 2>&1 | tee "${LLAMA_TESTS_LOG_LOCATION}/ctest.log"
+fi
+
+if [ "${DoBenchmark}" == "yes" ]; then
+ echo "Running benchmark..."
+ cd "${LLAMA_BUILD_DIR}" || exit
+ # Download model from HF (this will make it avail in local cache); bench call requires local model file
+ # llama-cli will turn on interactive mode, so echo /exit to it immediately
+ echo "/exit" | ./bin/llama-cli -hf ${LLAMA_BENCH_HF_ID}
+
+ # For the find command, we need to replace '/' with '_' in the LLAMA_BENCH_HF_ID
+ ModelSearchPattern=${LLAMA_BENCH_HF_ID/\//\_}
+ # Pick up first model with that name. Basically, pick up first quantization of that model
+ LlamaModelPath=$(find "$LLAMA_CACHE" -maxdepth 1 -name "${ModelSearchPattern}*.gguf" 2>/dev/null | head -1)
+
+ # Marker for external scripts
+ echo "LLAMA_BENCHMARK_BEGIN" | tee "${LLAMA_TESTS_LOG_LOCATION}/llama-bench.log"
+ # Run benchmark
+ ./bin/llama-bench -ngl 999 -fa 1 -ub 2048 -m "$LlamaModelPath" 2>&1 | tee -a "${LLAMA_TESTS_LOG_LOCATION}/llama-bench.log"
+fi
+
+popd || exit
diff --git a/bin/run_llvm-test-suite.sh b/bin/run_llvm-test-suite.sh
new file mode 100755
index 0000000000..1f4be38149
--- /dev/null
+++ b/bin/run_llvm-test-suite.sh
@@ -0,0 +1,231 @@
+#!/usr/bin/env bash
+
+#
+#Copyright © Advanced Micro Devices, Inc., or its affiliates.
+#
+#SPDX-License-Identifier: MIT
+#
+
+# Build script for llvm-test-suite with HIP support using AOMP compiler
+
+# --- Start standard header to set AOMP environment variables ----
+realpath=$(realpath "$0")
+thisdir=$(dirname "$realpath")
+export AOMP_USE_CCACHE=0
+
+# shellcheck source=aomp_common_vars
+. "$thisdir/aomp_common_vars"
+# --- end standard header ----
+
+# Environment variable defaults
+: "${LLVMTS_TLDIR:=$AOMP_REPOS_TEST/llvm-test-suite}"
+: "${LLVMTS_SRC_DIR:=$LLVMTS_TLDIR/src}"
+: "${LLVMTS_BUILD_DIR:=$LLVMTS_TLDIR/build}"
+: "${LLVMTS_EXTERNAL_DIR:=$LLVMTS_TLDIR/External}"
+: "${LLVMTS_LOGS_DIR:=$LLVMTS_TLDIR/logs}"
+: "${LLVMTS_GPU:=$AOMP_GPU}"
+: "${LLVMTS_BUILD_TYPE:=Release}"
+: "${LLVMTS_TEST_TIMEOUT:=840}"
+# Fallback to system ROCm if AOMP doesn't have HIP libraries
+: "${ROCM:=/opt/rocm}"
+
+# Determine clang major version for device libs path
+CLANG_VERSION=$("${AOMP}/bin/clang" --version | head -1 | grep -o 'version [0-9]*' | awk '{print $2}')
+if [ -z "${CLANG_VERSION}" ]; then
+ echo "WARNING: Could not determine clang version, defaulting to 23"
+ CLANG_VERSION=23
+fi
+
+# Set AMD device libs path for HIP compilation
+# HIP tests need to find device bitcode libraries
+HIP_DEVICE_LIB_PATH="${AOMP}/lib/clang/${CLANG_VERSION}/lib/amdgcn/bitcode"
+export HIP_DEVICE_LIB_PATH
+
+pushd "${AOMP_REPOS_TEST}" || exit
+mkdir -p "${LLVMTS_TLDIR}" && cd "${LLVMTS_TLDIR}" || exit
+
+# Control variables
+DoConfigure='no'
+DoCompile='no'
+DoTest='no'
+DoUpdate='no'
+IsVerbose='no'
+
+while getopts "j:cbtvhu" opt; do
+ case ${opt} in
+ j) AOMP_BUILD_JOBS=${OPTARG} ;;
+ c) DoConfigure='yes' ;;
+ b) DoCompile='yes' ;;
+ t) DoTest='yes' ;;
+ v) IsVerbose='yes' ;;
+ u) DoUpdate='yes' ;;
+ h)
+ echo "Usage: $(basename "$0") [-j build_jobs] [-c configure] [-b build] [-t test] [-v verbose] [-u update_sources]"
+ echo ""
+ echo "Options:"
+ echo " -c Run CMake configuration"
+ echo " -b Build the test suite"
+ echo " -t Run tests"
+ echo " -u Update sources (git pull)"
+ echo " -j Number of parallel build jobs (default: $AOMP_BUILD_JOBS)"
+ echo " -v Verbose mode (set -x)"
+ echo " -h Show this help message"
+ echo ""
+ echo "Environment Variables:"
+ echo " LLVMTS_TLDIR - Top-level directory (default: \$AOMP_REPOS_TEST/llvm-test-suite)"
+ echo " LLVMTS_GPU - Target GPU(s) (default: \$AOMP_GPU)"
+ echo " LLVMTS_BUILD_TYPE - CMake build type (default: Release)"
+ echo " LLVMTS_TEST_TIMEOUT - Test timeout in seconds (default: 800)"
+ echo " AOMP - AOMP compiler location (default: \$HOME/rocm/aomp)"
+ echo " ROCM - ROCm installation path (fallback, default: /opt/rocm)"
+ echo " Only needed if AOMP doesn't contain HIP libraries"
+ exit 0
+ ;;
+ \?)
+ echo "Usage: $(basename "$0") [-j build_jobs] [-c configure] [-b build] [-t test] [-v verbose] [-u update_sources] [-h help]"
+ exit 1
+ ;;
+ esac
+done
+
+if [ "${IsVerbose}" == "yes" ]; then
+ set -x
+fi
+
+# Detect ninja vs make
+TestBuildTool='make'
+CmakeGenerator=""
+if command -v ninja >/dev/null; then
+ CmakeGenerator="-GNinja"
+ TestBuildTool='ninja'
+fi
+
+# Create log directory
+if [ ! -d "${LLVMTS_LOGS_DIR}" ]; then
+ mkdir -p "${LLVMTS_LOGS_DIR}"
+fi
+
+# Clone or update repository
+if [ ! -d "${LLVMTS_SRC_DIR}" ]; then
+ echo "Cloning llvm-test-suite repository..."
+ git clone https://github.com/llvm/llvm-test-suite.git "${LLVMTS_SRC_DIR}"
+elif [ "${DoUpdate}" == "yes" ]; then
+ echo "Updating llvm-test-suite repository..."
+ cd "${LLVMTS_SRC_DIR}" || exit
+ git pull
+ cd "${LLVMTS_TLDIR}" || exit
+fi
+
+# Check for HIP tests in the cloned suite
+if [ -d "${LLVMTS_SRC_DIR}" ] && [ ! -d "${LLVMTS_SRC_DIR}/External/HIP" ]; then
+ echo "WARNING: External/HIP tests not found in llvm-test-suite"
+ echo " The test suite may not have HIP tests available"
+fi
+
+# Determine ROCm path for HIP tests
+# Prefer using AOMP's root directory (which contains HIP runtime and libraries)
+# over system ROCm installation. AOMP root is typically $AOMP/../.. when AOMP points
+# to lib/llvm subdirectory
+AOMP_ROOT_DIR=$(cd "${AOMP}/../.." && pwd)
+if [ -f "${AOMP_ROOT_DIR}/lib/libamdhip64.so" ]; then
+ ROCM_FOR_TESTS="${AOMP_ROOT_DIR}"
+ echo "Using AOMP installation for HIP tests: ${ROCM_FOR_TESTS}"
+elif [ -f "${AOMP}/../lib/libamdhip64.so" ]; then
+ # Handle case where AOMP points directly to root (e.g., /opt/rocm/llvm)
+ AOMP_ROOT_DIR=$(cd "${AOMP}/.." && pwd)
+ ROCM_FOR_TESTS="${AOMP_ROOT_DIR}"
+ echo "Using AOMP installation for HIP tests: ${ROCM_FOR_TESTS}"
+else
+ if [ ! -d "${ROCM}" ]; then
+ echo "ERROR: AOMP installation does not contain HIP libraries and system ROCm not found at ${ROCM}"
+ echo " Please set ROCM environment variable to a valid ROCm installation"
+ exit 1
+ fi
+ ROCM_FOR_TESTS="${ROCM}"
+ echo "Using system ROCm for HIP tests: ${ROCM_FOR_TESTS}"
+fi
+
+# Export ROCm CMake directories based on selected ROCm path
+export hsaruntime64_DIR=${ROCM_FOR_TESTS}/lib/cmake/hsa-runtime64/
+export hipblas_DIR=${ROCM_FOR_TESTS}/lib/cmake/hipblas/
+export hip_DIR=${ROCM_FOR_TESTS}/lib/cmake/hip
+export AMDDeviceLibs_DIR=${ROCM_FOR_TESTS}/lib/cmake/AMDDeviceLibs/
+export amd_comgr_DIR=${ROCM_FOR_TESTS}/lib/cmake/amd_comgr/
+
+# Get ROCm version and create symlink
+if [ -f "${ROCM_FOR_TESTS}/.info/version" ]; then
+ ROCM_VERSION_FILE=$(cat "${ROCM_FOR_TESTS}/.info/version")
+elif command -v dpkg >/dev/null && dpkg -l rocm-core >/dev/null 2>&1; then
+ ROCM_VERSION_FILE=$(dpkg -l rocm-core | grep rocm-core | awk '{print $3}' | cut -d- -f1)
+else
+ # Default fallback version
+ ROCM_VERSION_FILE="6.0.0"
+fi
+
+# Create hip subdirectory and symlink to ROCm installation
+# This is a prerequisite / assumption that the LLVM test suite makes
+if [ ! -d "${LLVMTS_EXTERNAL_DIR}/hip" ]; then
+ mkdir -p "${LLVMTS_EXTERNAL_DIR}/hip"
+fi
+
+ROCM_LINK="${LLVMTS_EXTERNAL_DIR}/hip/rocm-${ROCM_VERSION_FILE}"
+if [ ! -L "${ROCM_LINK}" ] && [ ! -d "${ROCM_LINK}" ]; then
+ echo "Creating symlink: ${ROCM_LINK} -> ${ROCM_FOR_TESTS}"
+ ln -sf "${ROCM_FOR_TESTS}" "${ROCM_LINK}"
+fi
+
+# Configure with CMake
+if [ "${DoConfigure}" == "yes" ]; then
+ echo "Configuring build with CMake..."
+ rm -rf "${LLVMTS_BUILD_DIR}"
+ cmake ${CmakeGenerator} \
+ -B "${LLVMTS_BUILD_DIR}" \
+ -S "${LLVMTS_SRC_DIR}" \
+ -DTEST_SUITE_SUBDIRS=External \
+ -DTEST_SUITE_EXTERNALS_DIR="${LLVMTS_EXTERNAL_DIR}" \
+ -DTEST_SUITE_COLLECT_CODE_SIZE=OFF \
+ -DTEST_SUITE_COLLECT_COMPILE_TIME=OFF \
+ -DTEST_SUITE_LIT="${AOMP}/bin/llvm-lit" \
+ -DCMAKE_STRIP="" \
+ -DAMDGPU_ARCHS="${LLVMTS_GPU}" \
+ -DHIP_EXPORT_XUNIT_XML=ON \
+ -DENABLE_HIP_CATCH_TESTS=ON \
+ -DCMAKE_BUILD_TYPE="${LLVMTS_BUILD_TYPE}" \
+ -DCMAKE_C_COMPILER="${AOMP}/bin/clang" \
+ -DCMAKE_CXX_COMPILER="${AOMP}/bin/clang++"
+fi
+
+# Build
+if [ "${DoCompile}" == "yes" ]; then
+ echo "Building llvm-test-suite..."
+ cmake --build "${LLVMTS_BUILD_DIR}" --parallel -j "${AOMP_BUILD_JOBS}"
+fi
+
+# Run tests
+if [ "${DoTest}" == "yes" ]; then
+ echo "Running HIP tests (timeout: ${LLVMTS_TEST_TIMEOUT}s)..."
+ cd "${LLVMTS_BUILD_DIR}" || exit
+
+ echo "Log in ${LLVMTS_LOGS_DIR}/test-output.log"
+
+ for TestTarget in check-hip-simple check-hip-catch; do
+ # Use timeout to prevent tests from hanging
+ # -k 30: Send SIGKILL after 30 seconds if SIGTERM doesn't terminate the process
+ # This ensures even completely hung processes are killed
+ if command -v timeout >/dev/null; then
+ timeout -k 30 "${LLVMTS_TEST_TIMEOUT}" "${TestBuildTool}" "${TestTarget}" 2>&1 | tee "${LLVMTS_LOGS_DIR}/test-output.log"
+ test_exit_code="${PIPESTATUS[0]}"
+ if [ "${test_exit_code}" -eq 124 ]; then
+ echo "WARNING: Tests timed out after ${LLVMTS_TEST_TIMEOUT} seconds"
+ elif [ "${test_exit_code}" -eq 137 ]; then
+ echo "WARNING: Tests were forcefully killed (SIGKILL) after timeout grace period"
+ fi
+ else
+ echo "WARNING: timeout command not found. Not running tests"
+ popd || exit 1
+ exit 1
+ fi
+ done
+fi
+
+popd || exit
diff --git a/bin/run_miniQMC.sh b/bin/run_miniQMC.sh
index fef7f6244e..64ddd31d09 100755
--- a/bin/run_miniQMC.sh
+++ b/bin/run_miniQMC.sh
@@ -9,11 +9,11 @@
# ROCM_INSTALL_PATH top-level ROCm install directory (default: /opt/rocm-5.3.0)
# --- Start standard header to set AOMP environment variables ----
-realpath=`realpath $0`
-thisdir=`dirname $realpath`
+realpath=`realpath "$0"`
+thisdir=`dirname "$realpath"`
export AOMP_USE_CCACHE=0
-. $thisdir/aomp_common_vars
+. "$thisdir"/aomp_common_vars
# --- end standard header ----
# Default ROCm installation
@@ -46,31 +46,31 @@ export rocsolver_DIR=${ROCM}/lib/cmake/rocsolver/
: ${MQMC_GIT_TAG:=9d9d7d3}
-if [ ! -d $MQMC_SOURCE_DIR ]; then
- git clone https://github.com/ye-luo/miniqmc $MQMC_SOURCE_DIR
- git checkout ${MQMC_GIT_TAG}
+if [ ! -d "$MQMC_SOURCE_DIR" ]; then
+ git clone https://github.com/ye-luo/miniqmc "$MQMC_SOURCE_DIR"
+ git checkout "${MQMC_GIT_TAG}"
fi
-rm -rf ${MQMC_BUILD_DIR}
+rm -rf "${MQMC_BUILD_DIR}"
# Note: We currently need the -fopenmp-assume-no-nested-parallelism to work around a call to malloc which probably should not be there.
# In the case that we disable hostservices, the application crashes when trying to call malloc.
-CMAKE_PREFIX_PATH=${ROCM}/lib/cmake/ cmake -B ${MQMC_BUILD_DIR} -S ${MQMC_SOURCE_DIR} -DCMAKE_CXX_COMPILER=clang++ -DENABLE_OFFLOAD=ON -DQMC_ENABLE_ROCM=ON -DCMAKE_CXX_FLAGS='-fopenmp-assume-no-nested-parallelism -DCUDART_VERSION=10000 -DcudaMemoryTypeManaged=hipMemoryTypeManaged ' -DAMDGPU_DISABLE_HOST_DEVMEM=ON -DCMAKE_VERBOSE_MAKEFILE=ON
+CMAKE_PREFIX_PATH=${ROCM}/lib/cmake/ cmake -B "${MQMC_BUILD_DIR}" -S "${MQMC_SOURCE_DIR}" -DCMAKE_CXX_COMPILER=clang++ -DENABLE_OFFLOAD=ON -DQMC_ENABLE_ROCM=ON -DCMAKE_CXX_FLAGS='-fopenmp-assume-no-nested-parallelism -DCUDART_VERSION=10000 -DcudaMemoryTypeManaged=hipMemoryTypeManaged ' -DAMDGPU_DISABLE_HOST_DEVMEM=ON -DCMAKE_VERBOSE_MAKEFILE=ON
# Build miniqmc binaries
#cmake --build ${MQMC_BUILD_DIR} --clean-first -j ${MQMC_NUM_BUILD_PROCS}
-pushd ${MQMC_BUILD_DIR}
+pushd "${MQMC_BUILD_DIR}" || exit
make clean
-make --output-sync -j ${MQMC_NUM_BUILD_PROCS}
-popd
+make --output-sync -j "${MQMC_NUM_BUILD_PROCS}"
+popd || exit
echo "Running Tests"
echo "OMP_NUM_THREADS=${MQMC_OMP_NUM_THREADS} ${MQMC_BUILD_DIR}/bin/check_spo_batched_reduction -n 10"
-OMP_NUM_THREADS=${MQMC_OMP_NUM_THREADS} ${MQMC_BUILD_DIR}/bin/check_spo_batched_reduction -n 10
+OMP_NUM_THREADS=${MQMC_OMP_NUM_THREADS} "${MQMC_BUILD_DIR}"/bin/check_spo_batched_reduction -n 10
echo ""
echo "OMP_NUM_THREADS=${MQMC_OMP_NUM_THREADS} ${MQMC_BUILD_DIR}/bin/miniqmc"
-OMP_NUM_THREADS=${MQMC_OMP_NUM_THREADS} ${MQMC_BUILD_DIR}/bin/miniqmc -v
+OMP_NUM_THREADS=${MQMC_OMP_NUM_THREADS} "${MQMC_BUILD_DIR}"/bin/miniqmc -v
echo ""
echo "OMP_NUM_THREADS=${MQMC_OMP_NUM_THREADS} ${MQMC_BUILD_DIR}/bin/check_spo -n 10"
-OMP_NUM_THREADS=${MQMC_OMP_NUM_THREADS} ${MQMC_BUILD_DIR}/bin/check_spo -n 10 -v
+OMP_NUM_THREADS=${MQMC_OMP_NUM_THREADS} "${MQMC_BUILD_DIR}"/bin/check_spo -n 10 -v
diff --git a/bin/run_nekbone.sh b/bin/run_nekbone.sh
index a43f95672a..6d00cf288d 100755
--- a/bin/run_nekbone.sh
+++ b/bin/run_nekbone.sh
@@ -42,11 +42,14 @@ fi
ulimit -s unlimited
PATH=$AOMP/bin/:$PATH make F77=$FLANG -f makefile.aomp ${make_overrides}
VERBOSE=${VERBOSE:-"1"}
+if [ $GPURUN_BYPASS -eq 0 ]; then
+ GPURUNEXE=$GPURUN_BINDIR/gpurun
+fi
set -x
if [ $VERBOSE -eq 0 ]; then
- $GPURUN_BINDIR/gpurun -s ./nekbone 2>&1 | tee nek.log > /dev/null
+ $GPURUNEXE ./nekbone 2>&1 | tee nek.log > /dev/null
else
- $GPURUN_BINDIR/gpurun -s ./nekbone 2>&1 | tee nek.log
+ $GPURUNEXE ./nekbone 2>&1 | tee nek.log
fi
set +x
grep -s Exitting nek.log
diff --git a/bin/run_omptests.sh b/bin/run_omptests.sh
index 21de8e4d8e..6acb386492 100755
--- a/bin/run_omptests.sh
+++ b/bin/run_omptests.sh
@@ -53,6 +53,9 @@ fi
log=$(date --iso-8601=minutes).log
+# Show latest git commit
+echo -e "\n$(git show -s)\n"
+
echo "env DEVICE_TYPE=amd DEVICE_TARGET=$DEVICE_TARGET DEVICE_ARCH=$DEVICE_ARCH HOSTRTL=$AOMP/lib/libdevice TARGETRTL=$AOMP/lib GLOMPRTL=$AOMP/lib LLVMBIN=$AOMP/bin make -i"
env DEVICE_TYPE=amd DEVICE_TARGET="$DEVICE_TARGET" DEVICE_ARCH="$DEVICE_ARCH" HOSTRTL="$AOMP/lib/libdevice" \
diff --git a/bin/run_rocm_test.sh b/bin/run_rocm_test.sh
index aedf413a27..68b8eb6e12 100755
--- a/bin/run_rocm_test.sh
+++ b/bin/run_rocm_test.sh
@@ -20,18 +20,7 @@ export CLEANUP=0
# whats the OS ?
cat /etc/os-release
-rocm-smi
-rocminfo
-# Export SKIP_USM=1 if xnack can not be turned ON, even with HSA_XNACK=1.
-# Makefile.defs uses SKIP_USM env var to disable compilation and execution
-# of the tests which require USM support.
-SKIP_USM=0
-XNACK_PLUS=$(HSA_XNACK=1 rocminfo | grep -i "xnack+" | wc -l)
-if [ $XNACK_PLUS -eq 0 ]; then
- SKIP_USM=1
-fi
-export SKIP_USM=$SKIP_USM
if [ -e /usr/sbin/lspci ]; then
lspci_loc=/usr/sbin/lspci
@@ -65,18 +54,20 @@ if [ $ISVIRT -eq 1 ] ; then
# run on configurations that do not support USM.
export OMPX_STRICT_SANITY_CHECKS={OMPX_STRICT_SANITY_CHECKS:-1}
-SUITE_LIST=${SUITE_LIST:-"examples smoke-limbo smoke smoke-asan smoke-fort smoke-fort-limbo omp5 openmpapps ovo babelstream fortran-babelstream accel2023 hpc2021"}
+ SUITE_LIST=${SUITE_LIST:-"examples smoke-limbo smoke smoke-asan smoke-fort smoke-fort-limbo omp5 openmpapps ovo babelstream fortran-babelstream accel2023 hpc2021"}
else
-SUITE_LIST=${SUITE_LIST:-"examples smoke-limbo smoke-dev smoke-fort-dev smoke smoke-asan smoke-fort smoke-fort-limbo omp5 openmpapps LLNL nekbone ovo babelstream fortran-babelstream accel2023 hpc2021"}
+ SUITE_LIST=${SUITE_LIST:-"examples smoke-limbo smoke-dev smoke-fort-dev smoke smoke-asan smoke-fort smoke-fort-limbo omp5 openmpapps LLNL nekbone ovo babelstream fortran-babelstream accel2023 hpc2021"}
fi
+
blockinglist="examples smoke smoke-limbo openmpapps sollve45 sollve50 sollve51 sollve52 babelstream ovo accel2023 hpc2021 nekbone smoke-fort smoke-fort-limbo"
EPSDB_LIST=${EPSDB_LIST:-"examples smoke-limbo smoke-dev smoke smoke-asan omp5 openmpapps LLNL nekbone ovo babelstream fortran-babelstream accel2023 hpc2021 smoke-fort smoke-fort-limbo smoke-fort-dev"}
+THEROCK_LIST=${THEROCK_LIST:-"smoke smoke-fort nekbone babelstream fortran-babelstream accel2023 hpc2021"}
export AOMP_USE_CCACHE=0
-echo $SUITE_LIST
-echo $blockinglist
+echo Initial SUITE_LIST: $SUITE_LIST
+echo Blocking List: $blockinglist
# Use bogus path to avoid using target.lst, a user-defined target list
# used by rocm_agent_enumerator.
@@ -112,13 +103,13 @@ fi
# Set AOMP to point to rocm symlink or newest version.
if [ -e /opt/rocm/lib/llvm/bin ]; then
AOMP=${AOMP:-"/opt/rocm/lib/llvm"}
- ROCMINF=/opt/rocm
- ROCMDIR=/opt/rocm/lib
+ ROCMINF="$AOMP/../../"
+ ROCMDIR="$AOMP/../../"
echo setting 1 $AOMP
elif [ -e /opt/rocm/llvm/bin ]; then
AOMP=${AOMP:-"/opt/rocm/llvm"}
- ROCMINF=/opt/rocm
- ROCMDIR=/opt/rocm
+ ROCMINF="$AOMP/../"
+ ROCMDIR="$AOMP/../"
echo setting 2 $AOMP
else
newestrocm=$(ls --sort=time /opt | grep -m 1 rocm)
@@ -137,42 +128,107 @@ fi
export AOMP
echo "AOMP = $AOMP"
export REAL_AOMP=`realpath $AOMP`
+"$ROCMINF/bin/rocm-smi"
+"$ROCMINF/bin/rocminfo"
-function extract_rpm(){
- local test_package=$1
- cd $tmpdir
- rpm2cpio $test_package | cpio -idmv > /dev/null
- script=$(find . -type f -name 'run_rocm_test.sh')
- cd $(dirname $script)
-}
+# Export SKIP_USM=1 if xnack can not be turned ON, even with HSA_XNACK=1.
+# Makefile.defs uses SKIP_USM env var to disable compilation and execution
+# of the tests which require USM support.
+SKIP_USM=0
+XNACK_PLUS=$(HSA_XNACK=1 "$ROCMINFO/binrocminfo" | grep -i "xnack+" | wc -l)
+if [ $XNACK_PLUS -eq 0 ]; then
+ SKIP_USM=1
+fi
+export SKIP_USM=$SKIP_USM
-# Keep support for older release testing that will not have release branch
-# updated. From 6.2 onwards the openmp-extras-tests package will be used for testing.
-if [[ $REAL_AOMP =~ "/opt/rocm-6.0" ]] || [[ $REAL_AOMP =~ "/opt/rocm-6.1" ]]; then
- if [ "$TEST_BRANCH" == "" ]; then
- git reset --hard
- export TEST_BRANCH="aomp-test-6.0-6.1"
- git checkout 080e9bc62ad8501defc4ec9124c90e28a1f749db
+# Download FileCheck if not present
+mkdir -p "$HOME/openmp-utils/bin"
+if [ ! -f "$AOMP/bin/FileCheck" ]; then
+ rm -f "$HOME/openmp-utils/bin/FileCheck"
+ if ! wget -P "$HOME/openmp-utils/bin" https://compute-artifactory.amd.com/artifactory/rocm-generic-local/compiler-infra/FileCheck ; then
+ echo "Error: Could not download FileCheck"
+ exit 1
fi
- echo "+++ Using $TEST_BRANCH +++"
- sleep 5
- ./run_rocm_test.sh
- exit $?
+ chmod 755 "$HOME/openmp-utils/bin/FileCheck"
fi
+if [ ! -f "$AOMP/bin/gpurun" ]; then
+ rm -f "$HOME/openmp-utils/bin/gpurun"
+ if ! wget -P "$HOME/openmp-utils/bin" https://compute-artifactory.amd.com/artifactory/rocm-generic-local/compiler-infra/gpurun ; then
+ echo "Error: Could not download gpurun"
+ exit 1
+ fi
+ chmod 755 "$HOME/openmp-utils/bin/gpurun"
+ export GPURUN_BINDIR="$HOME/openmp-utils/bin"
+fi
clangversion=`$AOMP/bin/clang --version`
aomp=0
if [[ "$clangversion" =~ "AOMP_STANDALONE" ]]; then
aomp=1
fi
+if [ $aomp -eq 0 ]; then
+ # Determine ROCm version.
+ echo ROCMINF=$ROCMINF
+ rocm=$(cat "$ROCMINF"/.info/version*|head -1)
+ rocmregex="([0-9]+\.[0-9]+\.[0-9]+)"
+ therock=0
+ rocmver=0
+ if [[ "$rocm" =~ $rocmregex ]]; then
+ rocmver=$(echo ${BASH_REMATCH[1]} | sed "s/\.//g")
+ echo rocmver: $rocmver
+ if [ $rocmver -ge 7100 ]; then
+ echo "--- Using TheRock Compiler ---"
+ therock=1
+ fi
+ else
+ echo Unable to determine rocm version.
+ exit 1
+ fi
+fi
+
+function extract_rpm(){
+ local test_package=$1
+ cd $tmpdir
+ rpm2cpio $test_package | cpio -idmv > /dev/null
+ script=$(find . -type f -name 'run_rocm_test.sh')
+ cd $(dirname $script)
+}
+
+#if [ $therock -eq 1 ] && [ "$EPSDB" != "1" ] ; then
+# if [ "$TEST_BRANCH" == "" ]; then
+# if ! aomprev=$(grep -Po "OPENMP_TEST_REVISION \K\w+" "$AOMP/include/llvm/Config/llvm-config.h"); then
+# echo "Error: Cannot determine aomp revision from llvm-config.h"
+# exit 1
+# else
+# echo "Using aomp hash: $aomprev"
+# fi
+
+ #if ! git checkout $aomprev ; then
+ # if ! git stash
+ # git reset --hard
+ # fi
+ # if ! git checkout $aomprev; then
+ # echo "Fatal Error: Cannot checkout $aomprev for aomp."
+# exit 1
+# fi
+# fi
+# export TEST_BRANCH=$aomprev
+# fi
+# echo "+++ Using $TEST_BRANCH +++"
+# sleep 5
+# ./run_rocm_test.sh
+# exit $?
+#fi
+
+
# Support for using openmp-extras-tests package.
if [ "$aomp" != 1 ]; then
tmpdir="$HOME/tmp/openmp-extras"
os_name=$(cat /etc/os-release | grep NAME)
test_package_name="openmp-extras-tests"
- if [ "$SKIP_TEST_PACKAGE" != 1 ] && [ "$TEST_BRANCH" == "" ]; then
+ if [ $therock -eq 0 ] && [ "$SKIP_TEST_PACKAGE" != 1 ] && [ "$TEST_BRANCH" == "" ]; then
rm -rf $tmpdir
mkdir -p $tmpdir
export debsupport=0
@@ -379,30 +435,18 @@ function getversion(){
versions[543]=5.4.3
versions[550]=5.5.0
- if [ $aomp -eq 1 ]; then
- echo "AOMP detected at $AOMP, skipping ROCm version detections"
+ if [ $aomp -eq 1 ] || [ $therock -eq 1 ]; then
maxvers=`echo $supportedvers | grep -o "[0-9].[0-9].[0-9]$" | sed -e 's/\.//g'`
versionregex="(.*${versions[$maxvers]})"
if [[ "$supportedvers" =~ $versionregex ]]; then
finalvers=${BASH_REMATCH[1]}
else
- echo "AOMP - Cannot select proper version list."
+ echo "Error: Cannot select proper version list."
exit 1
fi
+ echo "AOMP or TheRock detected at $AOMP, skipping ROCm version detections"
echo "Selecting highest supported version: ${versions[$maxvers]}"
else
- # Determine ROCm version.
- echo ROCMINF=$ROCMINF
- rocm=$(cat "$ROCMINF"/.info/version*|head -1)
- rocmregex="([0-9]+\.[0-9]+\.[0-9]+)"
- if [[ "$rocm" =~ $rocmregex ]]; then
- rocmver=$(echo ${BASH_REMATCH[1]} | sed "s/\.//g")
- echo rocmver: $rocmver
- else
- echo Unable to determine rocm version.
- exit 1
- fi
-
# Determine OS flavor to properly query openmp-extras version.
osname=$(cat /etc/os-release | grep -e ^NAME=)
# Regex to cover single/multi version installs for deb/rpm.
@@ -466,6 +510,7 @@ function getversion(){
fi
fi
}
+
function notAllMustPass() {
#if [ "$1" != "smoke" ] && [ "$1" != "smoke-limbo" ] && [ "$1" != "smoke-fort" ] && [ "$1" != "smoke-fort-limbo" ]; then
if [ "$1" != "smoke" ] && [ "$1" != "smoke-limbo" ] && [ "$1" != "smoke-fort" ] && [ "$1" != "examples_openmp" ] && [ "$1" != "examples_fortran" ]; then
@@ -831,7 +876,7 @@ function smoke-fort(){
if [ "$SMOKE_FORT" == "1" ]; then
mkdir -p "$resultsdir"/smoke-fort
cd "$aompdir"/test/smoke-fort
- ./check_smoke_fort.sh
+ AOMP_PARALLEL_SMOKE=1 ./check_smoke_fort.sh
checkrc $?
copyresults smoke-fort "$aompdir"/test/smoke-fort
else
@@ -1068,7 +1113,9 @@ rm -rf $resultsdir
mkdir -p $resultsdir
# Run Tests
-if [ "$EPSDB" == "1" ]; then
+if [ $therock -eq 1 ]; then
+ SUITE_LIST="$THEROCK_LIST"
+elif [ "$EPSDB" == "1" ]; then
SUITE_LIST="$EPSDB_LIST"
fi
echo Running List: $SUITE_LIST
diff --git a/bin/run_su3bench.sh b/bin/run_su3bench.sh
index a98a79d74b..629201549f 100755
--- a/bin/run_su3bench.sh
+++ b/bin/run_su3bench.sh
@@ -28,8 +28,8 @@ RUN_OPTIONS=${RUN_OPTIONS:-"openmp"}
#hip_src="main.cpp HIPStream.cpp"
#std="-std=c++11"
-if [ -d $AOMP_REPOS_TEST/su3_bench ]; then
- cd $AOMP_REPOS_TEST/su3_bench
+if [ -d $AOMP_REPOS_TEST/su3bench ]; then
+ cd $AOMP_REPOS_TEST/su3bench
rm -f results.txt
else
echo "ERROR: su3bench found in $AOMP_REPOS_TEST."
@@ -39,8 +39,14 @@ fi
echo RUN_OPTIONS: $RUN_OPTIONS
for option in $RUN_OPTIONS; do
if [ "$option" == "openmp" ]; then
+ # Update Makefile with detected GPU architecture
+ if [ -f Makefile.openmp ]; then
+ sed -i "s/-march=gfx[0-9a-zA-Z]*/-march=$AOMP_GPU/g" Makefile.openmp
+ echo "Updated Makefile.openmp: -march=$AOMP_GPU"
+ fi
make -f Makefile.openmp clean
export PATH=$AOMP/bin:$PATH
+ export LD_LIBRARY_PATH=$AOMP/lib:$LD_LIBRARY_PATH
make -f Makefile.openmp VENDOR=amd ARCH=MI200 all
if [ $? -ne 1 ]; then
./bench_f32_openmp.exe 2>&1 | tee -a results.txt
diff --git a/bin/run_theRockCI.sh b/bin/run_theRockCI.sh
new file mode 100755
index 0000000000..41fbe2107a
--- /dev/null
+++ b/bin/run_theRockCI.sh
@@ -0,0 +1,402 @@
+#!/bin/bash
+# Copyright © Advanced Micro Devices, Inc., or its affiliates.
+#
+# run_theRockCI.sh
+# runs smoke, smoke-fort, smoke-limbo, smoke-fort-libmo,
+# babelstream fortran-babelstream accel2023 hpc2021 openmpapps
+# override with SUITE_LIST
+# Please check with Ron or Ethan for script modifications.
+date
+SUITE_LIST=${SUITE_LIST:-"smoke-limbo smoke-fort-limbo smoke smoke-fort nekbone babelstream fortran-babelstream accel2023 bldopenmpi hpc2021 openmpapps"}
+declare -A assocSuite=(
+["smoke-limbo"]=" 5 minutes"
+["smoke-fort-limbo"]=" 2 minutes"
+["smoke"]=" 20 minutes"
+["smoke-fort"]=" 8 minutes"
+["nekbone"]=" 1 minute"
+["babelstream"]=" 1 minute"
+["fortran-babelstream"]=" 1 minute"
+["accel2023"]=" 3 minutes"
+["bldopenmpi"]=" 6 minutes"
+["hpc2021"]=" 4 minutes"
+["openmpapps"]=" 2 minutes"
+)
+
+function hide_unrunnable_files() {
+set -x
+pushd $aompdir/test/smoke/
+mkdir .savem
+mv clang-host-targ clang-host-targ2 flags host_targ usm-globals-with-pragma usm-globals-with-pragma usm-globals .savem/
+popd
+pushd $aompdir/test/smoke-fort
+mkdir .savem
+mv flang-gpu-abort .savem/
+popd
+pushd $aompdir/test/smoke-limbo
+mkdir .savem
+mv hipreg_usm usm-locals-pragma-xnack-enabled-xnack-any usm-locals-pragma-xnack-enabled-xnack-plus .savem/
+popd
+set +x
+}
+
+
+ulimit -t 400
+ulimit -s unlimited
+
+tmpfile=/tmp/smoke-$$
+export PATH=$PATH:/opt/rocm/bin
+echo "PATH=" $PATH
+which lspci
+which rocm-smi
+which rocminfo
+which make
+
+export GPURUN_BYPASS=1
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/rocm/llvm/lib
+echo "LD_LIBRARY_PATH="$LD_LIBRARY_PATH
+pip install --no-warn-script-location filecheck
+export FILECHECK=`which filecheck`
+echo filecheck: $FILECHECK
+
+RUN_SPEC=1
+WLOC=https://compute-artifactory.amd.com/artifactory/rocm-generic-local/compiler-infra
+wget --timeout 5 --tries=2 $WLOC/Accel23-scripts.tar
+if [ "$?" -ne 0 ]; then
+ echo "SPECScripts not accessible " $?
+ RUN_SPEC=0
+else
+ echo "SPECscripts are available"
+fi
+
+if [ "$SKIP_QUICK" == "" ]; then
+./rocm_quick_check.sh
+fi
+export ROCR_VISIBLE_DEVICES=0
+export AOMP_USE_CCACHE=0
+
+echo $SUITE_LIST
+
+TLOG=/tmp/log$$
+echo "================" >$TLOG
+
+# Use bogus path to avoid using target.lst, a user-defined target list
+# used by rocm_agent_enumerator.
+export ROCM_TARGET_LST=/opt/nowhere
+
+
+realpath=`realpath $0`
+scriptdir=`dirname $realpath`
+parentdir=`eval "cd $scriptdir;pwd;cd - > /dev/null"`
+aompdir="$(dirname "$parentdir")"
+summary=`pwd`"/summary.txt"
+
+if [ "$SKIP_CLONE" == "" ]; then
+ EPSDB=1 ./clone_test.sh
+fi
+AOMP_TEST_DIR=${AOMP_TEST_DIR:-"$HOME/git/aomp-test"}
+echo AOMP before : $AOMP
+if [ ! -e $AOMP/bin ]; then
+ echo $AOMP does not point to valid location, unsetting
+ unset AOMP
+fi
+# Set AOMP to point to rocm symlink or newest version.
+if [ -e /opt/rocm/lib/llvm/bin ]; then
+ AOMP=${AOMP:-"/opt/rocm/lib/llvm"}
+ ROCMINF=/opt/rocm
+ ROCMDIR=/opt/rocm/lib
+ echo setting 1 $AOMP
+elif [ -e /opt/rocm/llvm/bin ]; then
+ AOMP=${AOMP:-"/opt/rocm/llvm"}
+ ROCMINF=/opt/rocm
+ ROCMDIR=/opt/rocm
+ echo setting 2 $AOMP
+else
+ pushd $AOMP
+ cd `realpath .`
+ cd ../..
+ ROCMINF=`pwd`/
+ ROCMDIR=`pwd`
+ popd
+fi
+export AOMP
+echo "AOMP = $AOMP"
+
+if [ ! -f "$AOMP/bin/gpurun" ]; then
+ echo "Error: Could not find gpurun"
+ exit 1
+fi
+
+clangversion=`$AOMP/bin/clang --version`
+aomp=0
+if [[ "$clangversion" =~ "AOMP_STANDALONE" ]]; then
+ aomp=1
+fi
+
+# Make sure clang is present.
+$AOMP/bin/clang --version
+if [ $? -ne 0 ]; then
+ echo "Error: Clang not found at "$AOMP"/bin/clang."
+ exit 1
+fi
+
+$AOMP/bin/flang --version
+if [ $? -ne 0 ]; then
+ echo "Error: flang not found at "$AOMP"/bin/flang."
+ exit 1
+fi
+
+# Use bogus path to avoid using target.lst, a user-defined target list
+# used by rocm_agent_enumerator.
+export ROCM_TARGET_LST=/opt/nowhere
+
+echo "AMDGPU devices:"
+$ROCMINF/bin/rocm_agent_enumerator
+
+# Set AOMP_GPU.
+# Regex skips first result 'gfx000' and selects second id.
+if [ "$AOMP_GPU" == "" ]; then
+ AOMP_GPU=$($ROCMINF/bin/rocm_agent_enumerator | grep -m 1 -E gfx[^0]{1}.{2})
+fi
+
+# mygpu will eventually relocate to /opt/rocm/bin, support both cases for now.
+if [ "$AOMP_GPU" != "" ]; then
+ echo "AOMP_GPU set with rocm_agent_enumerator."
+else
+ echo "AOMP_GPU is empty, use mygpu."
+ if [ -a $AOMP/bin/mygpu ]; then
+ AOMP_GPU=$($AOMP/bin/mygpu)
+ else
+ AOMP_GPU=$($AOMP/../bin/mygpu)
+ fi
+fi
+if [ "$AOMP_GPU" == "" ]; then
+ echo "Error: AOMP_GPU was not able to be set with RAE or mygpu."
+ exit 1
+fi
+echo AOMP_GPU=$AOMP_GPU
+export AOMP_GPU
+
+# Run quick sanity test
+echo
+echo "check-xnack test"
+cd "$aompdir"/test/smoke-limbo/check-xnack
+make clean > /dev/null
+VERBOSE=1 make
+./check-xnack
+HSA_XNACK=1 OMPX_APU_MAPS=1 ./check-xnack
+echo
+echo "Helloworld sanity test:"
+cd "$aompdir"/test/smoke/helloworld
+make clean > /dev/null
+OMP_TARGET_OFFLOAD=MANDATORY VERBOSE=1 make run > hello.log 2>&1
+sed -n -e '/ld.lld/,$p' hello.log
+echo
+echo "Checking plugin"
+LIBOMPTARGET_DEBUG=1 OMP_TARGET_OFFLOAD=MANDATORY make run 2>&1 | grep "libomptarget.rtl.amdgpu"
+echo
+
+function checkRes() {
+ tail -100 $1
+ actual=`grep "Passing tests: " $1 | awk -F'[ /\033]' '{print $4}'`
+ expect=`grep "Passing tests: " $1 | awk -F'[ /\033]' '{print $5}'`
+ if [ "$actual" == "$expect" ]; then
+ return 0;
+ else
+ return 1;
+ fi
+}
+
+function smoke-fort(){
+ echo "%================ smoke-fort"
+ cd "$aompdir"/test/smoke-fort
+ ./check_smoke_fort.sh > $tmpfile 2>&1
+ checkRes $tmpfile
+ if [ "$?" == 0 ]; then
+ echo "Passed smoke-fort">> $TLOG
+ else
+ echo "FAILED smoke-fort">> $TLOG
+ fi
+}
+
+function smoke(){
+ echo "%================ smoke"
+ cd "$aompdir"/test/smoke
+ ./check_smoke.sh > $tmpfile 2>&1
+ checkRes $tmpfile
+ if [ "$?" == 0 ]; then
+ echo "Passed smoke" >> $TLOG
+ else
+ echo "FAILED smoke" >> $TLOG
+ fi
+}
+
+function smoke-fort-limbo(){
+ echo "%================ smoke-fort-limbo"
+ cd "$aompdir"/test/smoke-fort-limbo
+ ./check_smoke_fort_limbo.sh > $tmpfile 2>&1
+ checkRes $tmpfile
+ if [ "$?" == 0 ]; then
+ echo "Passed smoke-fort-limbo" >> $TLOG
+ else
+ echo "FAILED smoke-fort-limbo" >> $TLOG
+ fi
+}
+
+function smoke-limbo(){
+ echo "%================ smoke-limbo"
+ cd "$aompdir"/test/smoke-limbo
+ export SKIP_OMPT=1
+ ./check_smoke_limbo.sh > $tmpfile 2>&1
+ unset SKIP_OMPT
+ checkRes $tmpfile
+ if [ "$?" == 0 ]; then
+ echo "Passed smoke-limbo" >> $TLOG
+ else
+ echo "FAILED smoke-limbo" >> $TLOG
+ fi
+}
+
+function openmpapps(){
+ echo "%================ openmpapps"
+ # -----Run Openmpapps-----
+ cd "$AOMP_TEST_DIR"/openmpapps
+ rm -rf matmul_usm hpgmg-mp4
+ echo rockMPI=$MPI
+ ./check_openmpapps.sh
+ git checkout .
+ if [ "$?" == 0 ]; then
+ echo "Passed openmpapps" >> $TLOG
+ else
+ echo "FAILED openmpapps" >> $TLOG
+ fi
+}
+
+function nekbone(){
+ echo "%================ nekbone"
+ # -----Run Nekbone-----
+ cd "$aompdir"/bin
+ ( VERBOSE=0 ./run_nekbone.sh )
+ if [ "$?" == 0 ]; then
+ echo "Passed Nekbone" >> $TLOG
+ else
+ echo "FAILED Nekbone" >> $TLOG
+ fi
+}
+
+function babelstream(){
+ echo "%================ babelestream"
+ export AOMPHIP=$ROCMDIR
+ cd "$aompdir"/bin
+ if [ $aomp -eq 0 ]; then
+ export ROCMINFO_BINARY=$ROCMINF/bin/rocminfo
+ fi
+ export RUN_OPTIONS="omp-default omp-fast"
+ ./run_babelstream.sh
+ if [ "$?" == 0 ]; then
+ echo "Passed Babelstream" >> $TLOG
+ else
+ echo "FAILED Babelstream" >> $TLOG
+ fi
+}
+
+function fortran-babelstream(){
+ echo "%================ fortran-babelstream"
+ export AOMPHIP=$ROCMDIR
+ cd "$aompdir"/bin
+ if [ "$?" != 0 ]; then
+ export ROCMINFO_BINARY=$ROCMINF/bin/rocminfo
+ fi
+ ./run_fBabel.sh
+ if [ "$?" == 0 ]; then
+ echo "Passed fortran-babelstream" >> $TLOG
+ else
+ echo "FAILED fortran-babelstream" >> $TLOG
+ fi
+}
+
+
+function accel2023(){
+ echo "%================ accel2023"
+ if [ "$RUN_SPEC" -eq 0 ]; then
+ echo "Skipping accel2023, runners external to AMD"
+ return 0
+ fi
+ cd "$aompdir"/bin
+ export GPURUN_BYPASS=1
+ ./run_accel2023.sh -clean
+ cd $AOMP_TEST_DIR/accel2023-2.0.18
+ grep ratio= result/*.log | tail -12
+ nsucc=$(grep ratio= result/*.log | grep Succ | wc -l)
+ if [ $nsucc -eq 12 ]; then
+ echo "Passed accel2023 $nsucc passes" >> $TLOG
+ else
+ echo "FAILED accel2023 $nsucc passes" >> $TLOG
+ fi
+}
+
+function hpc2021(){
+ echo "%================ hpc2021"
+ if [ "$RUN_SPEC" -eq 0 ]; then
+ echo "Skipping hpc2021, runners external to AMD"
+ return 0
+ fi
+ cd "$aompdir"/bin
+ unset ROCR_VISIBLE_DEVICES
+ export GPURUN_BYPASS=1
+ echo rockMPI=$MPI
+ ./run_hpc2021.sh -clean
+ cd $AOMP_TEST_DIR/hpc2021-1.1.9
+ grep ratio= result/*.log | tail -9
+ nsucc=$(grep ratio= result/*.log | grep Succ | wc -l)
+ if [ $nsucc -eq 9 ]; then
+ echo "Passed hpc2021 $nsucc passes" >> $TLOG
+ else
+ echo "FAILED hpc2021 $nsucc passes" >> $TLOG
+ fi
+}
+
+function bldopenmpi(){
+ echo "%================ OpenMPI"
+ export NO_HPC2021_MPI_BLD=1
+ export INST=${INST:-/tmp/npsdbInst$$/openmpi-5-flang}
+ export MPI=$INST
+ echo rocmMPI=$MPI
+ pushd $aompdir/bin
+ ./npsdb_bld_ompi.sh
+ popd
+}
+
+echo Running List: $SUITE_LIST
+
+hide_unrunnable_files
+
+declare -A warnings
+warningcount=0
+for suite in $SUITE_LIST; do
+ echo "=== Running $suite `date` ==="
+ echo "--- expected time: ${assocSuite[$suite]}"
+ if [[ "$suite" =~ "smoke" ]]; then
+ $suite 2>&1 |tail -200
+ else
+ $suite
+ fi
+done
+
+echo "************************************" > $summary
+grep -i -q fail $TLOG
+scriptfails=$?
+if [ "$scriptfails" == 0 ]; then
+ echo FAIL >> $summary
+ echo "EPSDB Status: red" >> $summary
+ RC=1
+else
+ echo PASS >> $summary
+ echo "EPSDB Status: green" >> $summary
+ RC=0
+fi
+cat $TLOG
+echo ""
+echo >> $summary
+cat $summary
+date
+exit $((RC))
diff --git a/bin/run_umt.sh b/bin/run_umt.sh
index fdc4f02ee3..11b2afb416 100755
--- a/bin/run_umt.sh
+++ b/bin/run_umt.sh
@@ -152,6 +152,13 @@ if [ "$1" == "build_umt" ]; then
exit $mystat
fi
+ IMPLICIT_GPU_FLANG_RT=${IMPLICIT_GPU_FLANG_RT:-1}
+ if [[ $IMPLICIT_GPU_FLANG_RT -eq 1 ]]; then
+ FORTRAN_OFFLOAD_LIB=
+ else
+ FORTRAN_OFFLOAD_LIB=$AOMP/lib/libflang_rt.hostdevice.a
+ fi
+
rm -rf build
mkdir build
pushd build
@@ -162,7 +169,7 @@ if [ "$1" == "build_umt" ]; then
-DUMPIRE_ROOT=$AOMP_REPOS_TEST/$UMPIRE_SRC_DIR/install \
-DCAMP_ROOT=$AOMP_REPOS_TEST/$CAMP_SRC_DIR/install \
-DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_Fortran_COMPILER=$FC \
- -DCMAKE_FORTRAN_OFFLOAD_LIB=$AOMP/lib/libflang_rt.hostdevice.a \
+ -DCMAKE_FORTRAN_OFFLOAD_LIB=$FORTRAN_OFFLOAD_LIB \
-DCMAKE_Fortran_LINKER_WRAPPER_FLAG="-Wl," \
-DENABLE_CUDA=OFF \
-DENABLE_OPENMP=ON -DOPENMP_HAS_FORTRAN_INTERFACE=ON \
diff --git a/docs/INSTALL.md b/docs/INSTALL.md
index af505d1350..f067205d6c 100644
--- a/docs/INSTALL.md
+++ b/docs/INSTALL.md
@@ -1,9 +1,6 @@
# AOMP Install
Platform Install Options:
-- [Ubuntu or Debian](UBUNTUINSTALL.md)
-- [SUSE SLES-15-SP5](SLES15INSTALL.md)
-- [RHEL 8/9](RHELINSTALL.md)
-- [Install Without Root](NOROOTINSTALL.md)
+- [Manylinux (alma8)](MANYLINUX.md)
- Build AOMP from source:
* [Prerequisites to install from source](SOURCEINSTALL_PREREQUISITE.md)
* [Build and install from release source tarball](RELEASESOURCEINSTALL.md)
diff --git a/docs/MANYLINUX.md b/docs/MANYLINUX.md
new file mode 100644
index 0000000000..7f7c69a1df
--- /dev/null
+++ b/docs/MANYLINUX.md
@@ -0,0 +1,13 @@
+# Install From Release Binary Tarball
+
+AOMP releases are now built on AlmaLinux (manylinux) can be installed on various operating systems from the release binary tarball.
+
+```
+ cd /usr/local
+ wget https://github.com/ROCm/aomp/releases/download/rel_23.0-0/aomp-23.0-0.tar.gz
+ tar -xzf aomp-23.0-0.tar.gz
+ ln -s aomp_23.0-0 aomp
+```
+```
+AOMP = /usr/local/aomp
+```
diff --git a/docs/RELEASESOURCEINSTALL.md b/docs/RELEASESOURCEINSTALL.md
index 7634c28f83..7efd6d649d 100644
--- a/docs/RELEASESOURCEINSTALL.md
+++ b/docs/RELEASESOURCEINSTALL.md
@@ -1,22 +1,20 @@
# Build and Install From Release Source Tarball
-The AOMP build and install from the release source tarball can be done manually or with spack.
+The AOMP build and install from the release source tarball can be done manually.
Building from source requires a number of platform dependencies.
-These dependencies are not yet provided with the spack configuration file.
-So if you are building from source either manually or building with spack, you must install the prerequisites for the platforms listed below.
## Source Build Prerequisites
-To build AOMP from source you must: 1. Install certain distribution packages, 2. Build CMake 3.25.2 from source, this can be done with build_prereq.sh 3. ensure the KFD kernel module is installed and operating, 4. create the Unix video group, and 5. install spack if required. [This link](SOURCEINSTALL_PREREQUISITE.md) provides instructions to satisfy all the AOMP source build dependencies.
+To build AOMP from source you must: 1. Install certain distribution packages, 2. Build CMake 3.25.2 from source, this can be done with build_prereq.sh 3. ensure the KFD kernel module is installed and operating, and 4. create the Unix video group. [This link](SOURCEINSTALL_PREREQUISITE.md) provides instructions to satisfy all the AOMP source build dependencies.
## Build AOMP manually from release source tarball
To build and install aomp from the release source tarball run these commands:
```
- wget https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp-22.0-1.tar.gz
- tar -xzf aomp-22.0-1.tar.gz
- cd aomp22.0
+ wget https://github.com/ROCm/aomp/releases/download/rel_23.0-0/aomp-23.0-0-source.tar.gz
+ tar -xzf aomp-23.0-0-source.tar.gz
+ cd aomp23.0
nohup make &
```
Depending on your system, the last command could take a very long time. So it is recommended to use nohup and background the process. The simple Makefile that make will use runs build script "build_aomp.sh" and sets some flags to avoid git checks and applying ROCm patches. Here is that Makefile:
@@ -30,24 +28,6 @@ If you set the environment variable AOMP, the Makefile will install to that dire
Otherwise, the Makefile will install into /usr/local.
So you must have authorization to write into /usr/local if you do not set the environment variable AOMP.
Let's assume you set the environment variable AOMP to "$HOME/rocm/aomp" in .bash_profile.
-The build_aomp.sh script will install into $HOME/rocm/aomp_22.0-1 and create a symbolic link from $HOME/rocm/aomp to $HOME/rocm/aomp_22.0-1.
+The build_aomp.sh script will install into $HOME/rocm/aomp_23.0-0 and create a symbolic link from $HOME/rocm/aomp to $HOME/rocm/aomp_23.0-0.
This feature allows multiple versions of AOMP to be installed concurrently.
-To enable a backlevel version of AOMP, simply set AOMP to $HOME/rocm/aomp_22.0-1.
-
-## Build AOMP with spack
-
-Assuming your have installed the [prerequisites](SOURCEINSTALL_PREREQUISITE.md), use these commands to fetch the source and build aomp. Currently the aomp configuration is not yet in the spack git hub so you must create the spack package first.
-
-```
- wget https://github.com/ROCm/aomp/blob/aomp-22.0-1/bin/package.py
- spack create -n aomp -t makefile --force https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp-22.0-1.tar.gz
- spack edit aomp
- spack install aomp
-```
-The "spack create" command will download and start an editor of a newly created spack config file.
-With the exception of the sha256 value, copy the contents of the downloaded package.py file into
-into the spack configuration file. You may restart this editor with the command "spack edit aomp"
-
-Depending on your system, the "spack install aomp" command could take a very long time.
-Unless you set the AOMP environment variable, AOMP will be installed in /usr/local/aomp_ with a symbolic link from /usr/local/aomp to /usr/local/aomp_.
-Be sure you have write access to /usr/local or set AOMP to a location where you have write access.
+To enable a backlevel version of AOMP, simply set AOMP to $HOME/rocm/aomp_22.0-2.
diff --git a/docs/SOURCEINSTALL.md b/docs/SOURCEINSTALL.md
index 6a023970e3..0ca767b43b 100644
--- a/docs/SOURCEINSTALL.md
+++ b/docs/SOURCEINSTALL.md
@@ -1,4 +1,4 @@
-# Source Install V 22.0-2
+# Source Install V 23.0-0
Build and install from sources is possible. However, the source build for AOMP is complex for several reasons.
- Many repos are required.
@@ -12,9 +12,8 @@ To build and test AOMP from source you must:
```
1. Install certain distribution packages,
2. Build CMake 3.25.2 from source. This can be done with ./build_prereq.sh,
-3. Ensure the KFD kernel module is installed and operating,
-4. Create the Unix video group, and
-5. Install spack if required.
+3. Ensure the KFD kernel module is installed and operating, and
+4. Create the Unix video group
```
[This link](SOURCEINSTALL_PREREQUISITE.md) provides detailed instructions to satisfy all the AOMP source build requirements.
@@ -32,7 +31,7 @@ Here are the commands to do a source build of AOMP:
Development Branch:
```
- export AOMP_VERSION=22.0
+ export AOMP_VERSION=23.0
export AOMP_REPOS=$HOME/git/aomp${AOMP_VERSION}
mkdir -p $AOMP_REPOS
cd $AOMP_REPOS
@@ -40,14 +39,14 @@ Here are the commands to do a source build of AOMP:
```
The development version is the next version to be released. It is possible that the development version is broken due to regressions that often occur during development.
-These commands will build a previous release of AOMP such as aomp-22.0-1.
+These commands will build a previous release of AOMP such as aomp-23.0-0.
Release Branch:
```
- export AOMP_VERSION=22.0
+ export AOMP_VERSION=23.0
export AOMP_REPOS=$HOME/git/aomp${AOMP_VERSION}
mkdir -p $AOMP_REPOS
cd $AOMP_REPOS
- git clone -b aomp-22.0-1 https://github.com/ROCm/aomp
+ git clone -b aomp-23.0-0 https://github.com/ROCm/aomp
```
Clone and build:
```
@@ -74,7 +73,7 @@ There is a "list" option on the clone\_aomp.sh that provides useful information
```
The above command will produce output like this showing you the location and branch of the repos in the AOMP\_REPOS directory and if there are any discrepencies with respect to the manifest file.
-USED manifest file: /work/grodgers/git/aomp22.0/aomp/bin/../manifests/aompi_22.0.xml
+USED manifest file: /work/grodgers/git/aomp23.0/aomp/bin/../manifests/aompi_23.0.xml
```
repo src branch path repo name last hash updated commitor for author
-------- ------ ---- --------- --------- ------- -------- ----------
@@ -82,15 +81,15 @@ The above command will produce output like this showing you the location and bra
emu amd-staging SPIRV-LLVM-Translator SPIRV-LLVM-Translator 0659e45216b2 2024-12-04 AlexVlx AlexVlx
roc aomp-dev flang flang 88b81b0a8ead 2023-11-30 GitHub Emma Pilkington
roc aomp-dev aomp aomp df5b5d8ddffa 2023-12-05 Dhruva Chakrabarti Dhruva Chakrabarti
- roc release/rocm-rel-7.0 rocprofiler-sdk rocprofiler-sdk 7283f62b2c16 2025-09-22 GitHub Ammar ELWazir
- roc release/rocm-rel-7.0 roctracer roctracer 6fbf7673aa7f 2023-07-13 Ranjith Ramakrishnan Ranjith Ramakrishnan
- roc release/rocm-rel-7.0 ROCdbgapi ROCdbgapi df1a8df2be08 2023-07-28 Lancelot SIX Lancelot SIX
- roc release/rocm-rel-7.0 ROCgdb ROCgdb 157eed788288 2023-07-28 Lancelot SIX Lancelot SIX
- roc release/rocm-rel-7.0 hip hip 80681169ae20 2023-08-15 Julia Jiang Julia Jiang
- roc release/rocm-rel-7.0 clr clr 1949b1621a80 2023-09-21 Julia Jiang Julia Jiang
- roc release/rocm-rel-7.0 rocminfo rocminfo c8db38ede264 2023-06-02 Mark Searles Mark Searles
- roc release/rocm-rel-7.0 rocm-cmake rocm-cmake 15cbb2e47f0b 2023-07-11 Lauren Wrubleski Lauren Wrubleski
- roc release/rocm-rel-7.0 rocr-runtime ROCR-Runtime b2b6811571bf 2023-09-15 David Yat Sin David Yat Sin
- roc release/rocm-rel-7.0 hipfort hipfort 41f33eeaa3f7 2023-09-07 Sam Wu dependabot[bot]
+ roc release/rocm-rel-7.2 rocprofiler-sdk rocprofiler-sdk 7283f62b2c16 2025-09-22 GitHub Ammar ELWazir
+ roc release/rocm-rel-7.2 roctracer roctracer 6fbf7673aa7f 2023-07-13 Ranjith Ramakrishnan Ranjith Ramakrishnan
+ roc release/rocm-rel-7.2 ROCdbgapi ROCdbgapi df1a8df2be08 2023-07-28 Lancelot SIX Lancelot SIX
+ roc release/rocm-rel-7.2 ROCgdb ROCgdb 157eed788288 2023-07-28 Lancelot SIX Lancelot SIX
+ roc release/rocm-rel-7.2 hip hip 80681169ae20 2023-08-15 Julia Jiang Julia Jiang
+ roc release/rocm-rel-7.2 clr clr 1949b1621a80 2023-09-21 Julia Jiang Julia Jiang
+ roc release/rocm-rel-7.2 rocminfo rocminfo c8db38ede264 2023-06-02 Mark Searles Mark Searles
+ roc release/rocm-rel-7.2 rocm-cmake rocm-cmake 15cbb2e47f0b 2023-07-11 Lauren Wrubleski Lauren Wrubleski
+ roc release/rocm-rel-7.2 rocr-runtime ROCR-Runtime b2b6811571bf 2023-09-15 David Yat Sin David Yat Sin
+ roc release/rocm-rel-7.2 hipfort hipfort 41f33eeaa3f7 2023-09-07 Sam Wu dependabot[bot]
```
For more information, or if you are interested in joining the development of AOMP, please read the AOMP developers README file located here [README](../bin/README.md).
diff --git a/docs/SOURCEINSTALL_PREREQUISITE.md b/docs/SOURCEINSTALL_PREREQUISITE.md
index b98d488527..40cbc7e846 100644
--- a/docs/SOURCEINSTALL_PREREQUISITE.md
+++ b/docs/SOURCEINSTALL_PREREQUISITE.md
@@ -2,6 +2,22 @@
### 1. Required Distribution Packages
+#### ManyLinux (AlmaLinux 8)
+```
+ sudo dnf -y install bison ccache cmake elfutils-libelf-devel elfutis-devel expat-devel flex fmt-devel gcc-c++ gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-gcc-gfortran gcc-toolset-12-libatomic-devel gcc-toolset-12-libstdc++-devel gdb git gmp-devel gtest-devel libatomic libbabeltrace-devel libffi-devel libquadmath-devel libtool mesa-libGL-devel mpfr-devel msgpack-devel ncurses-devel numactl-devel openssl-devel ocl-icd-devel pciutils-devel python3-devel rpm-build rsync sqlite-devel systemd-devel texinfo vim wget xz-devel
+
+ # Download and install Python 3.10.18
+ wget https://www.python.org/ftp/python/3.10.18/Python-3.10.18.tgz; tar xf Python-3.10.18.tgz; cd Python-3.10.18; ./configure --enable-optimizations --enable-shared; make altinstall; --prefix=$HOME/local/Python-3.10.18; ln -s $HOME/local/Python-3.10.18/bin/python3.10 $HOME/local/Python-3.10.18/bin/python3
+
+ # Configure environemnt
+ export PATH=$HOME/local/Python-3.10.18/bin:$PATH
+ export LD_LIBRARY_PATH=$HOME/local/Python-3.10.18/lib:$LD_LIBRARY_PATH
+ export LIBRARY_PATH=$HOME/local/Python-3.10.18/lib:$LIBRARY_PATH
+
+ # Finally source the gcc-toolset-12
+ source /opt/rh/gcc-toolset-12/enable
+
+```
#### Debian or Ubuntu Packages
```
@@ -94,6 +110,11 @@ RHEL 9
After all the required system package from section 1 are installed, there are some python packages that must be locally installed by the user building AOMP. Use this command to install these. Do not install these as root.
+ManyLinux (AlmaLinux 8)
+```
+ python3 -m pip install --ignore-installed --no-cache-dir barectf==3.1.2 PyYAML==5.3.1; python3.10 -m pip install CppHeaderParser argparse wheel lit lxml pandas
+```
+
Ubuntu 22.04
```
python3 -m pip install --ignore-installed --no-cache-dir barectf==3.1.2 PyYAML==5.3.1; python3 -m pip install CppHeaderParser argparse wheel lit lxml pandas
@@ -235,8 +256,3 @@ However, to build AOMP from source, you SHOULD have the Nvidia CUDA SDK version
See [these install instructions](https://developer.nvidia.com/cuda-toolkit-archive)
-
-### 7. Optional Install of Spack
-
-If you expect to install AOMP sources using the release source tarball with spack, you must install Spack. Refer to [these install instructions](https://spack.readthedocs.io/en/latest/getting_started.html#installation) for instructions on installing spack.
-The AOMP spack configuration file is currently missing proper dependencies, so be sure to install the packages listed above before proceeding with source install via spack.
diff --git a/docs/NOROOTINSTALL.md b/docs/deprecated/NOROOTINSTALL.md
similarity index 72%
rename from docs/NOROOTINSTALL.md
rename to docs/deprecated/NOROOTINSTALL.md
index ebb1b2a8d2..91933936ee 100644
--- a/docs/NOROOTINSTALL.md
+++ b/docs/deprecated/NOROOTINSTALL.md
@@ -8,17 +8,17 @@ To install the debian package without root access into your home directory, you
On Ubuntu 22.04:
```
- wget https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp_Ubuntu2204_22.0-1_amd64.deb
- dpkg -x aomp_Ubuntu2204_22.0-1_amd64.deb /tmp/temproot
+ wget https://github.com/ROCm/aomp/releases/download/rel_22.0-2/aomp_Ubuntu2204_22.0-2_amd64.deb
+ dpkg -x aomp_Ubuntu2204_22.0-2_amd64.deb /tmp/temproot
- Also can be done with aomp-hip-libraries_Ubuntu2204_22.0-1_amd64.deb
+ Also can be done with aomp-hip-libraries_Ubuntu2204_22.0-2_amd64.deb
```
On Ubuntu 24.04:
```
- wget https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp_Ubuntu2404_22.0-1_amd64.deb
- dpkg -x aomp_Ubuntu2404_22.0-1_amd64.deb /tmp/temproot
+ wget https://github.com/ROCm/aomp/releases/download/rel_22.0-2/aomp_Ubuntu2404_22.0-2_amd64.deb
+ dpkg -x aomp_Ubuntu2404_22.0-2_amd64.deb /tmp/temproot
- Also can be done with aomp-hip-libraries_Ubuntu2404_22.0-1_amd64.deb
+ Also can be done with aomp-hip-libraries_Ubuntu2404_22.0-2_amd64.deb
```
Move to $HOME and set variables:
```
@@ -35,24 +35,24 @@ To install the rpm package without root access into your home directory, you can
```
For SLES15-SP5:
```
- wget https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp_SLES15_SP5-22.0-1.x86_64.rpm
- rpm2cpio aomp_SLES15_SP5-22.0-1.x86_64.rpm | cpio -idmv
+ wget https://github.com/ROCm/aomp/releases/download/rel_22.0-2/aomp_SLES15_SP5-22.0-2.x86_64.rpm
+ rpm2cpio aomp_SLES15_SP5-22.0-2.x86_64.rpm | cpio -idmv
- Also can be done with aomp-hip-libraries_SLES15_SP5-22.0-1.x86_64.rpm
+ Also can be done with aomp-hip-libraries_SLES15_SP5-22.0-2.x86_64.rpm
```
For RHEL 8:
```
- wget https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp_REDHAT_8-22.0-1.x86_64.rpm
- rpm2cpio aomp_REDHAT_8-22.0-1.x86_64.rpm | cpio -idmv
+ wget https://github.com/ROCm/aomp/releases/download/rel_22.0-2/aomp_REDHAT_8-22.0-2.x86_64.rpm
+ rpm2cpio aomp_REDHAT_8-22.0-2.x86_64.rpm | cpio -idmv
- Also can be done with aomp-hip-libraries_REDHAT_8-22.0-1.x86_64.rpm
+ Also can be done with aomp-hip-libraries_REDHAT_8-22.0-2.x86_64.rpm
```
For RHEL 9:
```
- wget https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp_REDHAT_9-22.0-1.x86_64.rpm
- rpm2cpio aomp_REDHAT_9-22.0-1.x86_64.rpm | cpio -idmv
+ wget https://github.com/ROCm/aomp/releases/download/rel_22.0-2/aomp_REDHAT_9-22.0-2.x86_64.rpm
+ rpm2cpio aomp_REDHAT_9-22.0-2.x86_64.rpm | cpio -idmv
- Also can be done with aomp-hip-libraries_REDHAT_9-22.0-1.x86_64.rpm
+ Also can be done with aomp-hip-libraries_REDHAT_9-22.0-2.x86_64.rpm
```
Move to $HOME and set variables:
```
diff --git a/docs/RHELINSTALL.md b/docs/deprecated/RHELINSTALL.md
similarity index 74%
rename from docs/RHELINSTALL.md
rename to docs/deprecated/RHELINSTALL.md
index 118b5ef9f7..7bd0aff275 100644
--- a/docs/RHELINSTALL.md
+++ b/docs/deprecated/RHELINSTALL.md
@@ -5,19 +5,19 @@ AOMP will install to /usr/lib/aomp. The AOMP environment variable will automatic
### Download and Install (RHEL 9)
```
-wget https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp_REDHAT_9-22.0-1.x86_64.rpm
-sudo rpm -i aomp_REDHAT_9-22.0-1.x86_64.rpm
+wget https://github.com/ROCm/aomp/releases/download/rel_22.0-2/aomp_REDHAT_9-22.0-2.x86_64.rpm
+sudo rpm -i aomp_REDHAT_9-22.0-2.x86_64.rpm
-wget https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp-hip-libraries_REDHAT_9-22.0-1.x86_64.rpm
-sudo rpm -i aomp-hip-libraries_REDHAT_9-22.0-1.x86_64.rpm
+wget https://github.com/ROCm/aomp/releases/download/rel_22.0-2/aomp-hip-libraries_REDHAT_9-22.0-2.x86_64.rpm
+sudo rpm -i aomp-hip-libraries_REDHAT_9-22.0-2.x86_64.rpm
```
### Download and Install (RHEL 8)
```
-wget https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp_REDHAT_8-22.0-1.x86_64.rpm
-sudo rpm -i aomp_REDHAT_8-22.0-1.x86_64.rpm
+wget https://github.com/ROCm/aomp/releases/download/rel_22.0-2/aomp_REDHAT_8-22.0-2.x86_64.rpm
+sudo rpm -i aomp_REDHAT_8-22.0-2.x86_64.rpm
-wget https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp-hip-libraries_REDHAT_8-22.0-1.x86_64.rpm
-sudo rpm -i aomp-hip-libraries_REDHAT_8-22.0-1.x86_64.rpm
+wget https://github.com/ROCm/aomp/releases/download/rel_22.0-2/aomp-hip-libraries_REDHAT_8-22.0-2.x86_64.rpm
+sudo rpm -i aomp-hip-libraries_REDHAT_8-22.0-2.x86_64.rpm
```
## Prerequisites
diff --git a/docs/SLES15INSTALL.md b/docs/deprecated/SLES15INSTALL.md
similarity index 80%
rename from docs/SLES15INSTALL.md
rename to docs/deprecated/SLES15INSTALL.md
index 13d9f5df18..5e615efc78 100644
--- a/docs/SLES15INSTALL.md
+++ b/docs/deprecated/SLES15INSTALL.md
@@ -1,11 +1,11 @@
# AOMP SUSE SLES-15-SP5 Install
AOMP will install to /usr/lib/aomp. The AOMP environment variable will automatically be set to the install location. This may require a new terminal to be launched to see the change.
```
-wget https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp_SLES15_SP5-22.0-1.x86_64.rpm
-sudo rpm -i aomp_SLES15_SP5-22.0-1.x86_64.rpm
+wget https://github.com/ROCm/aomp/releases/download/rel_22.0-2/aomp_SLES15_SP5-22.0-2.x86_64.rpm
+sudo rpm -i aomp_SLES15_SP5-22.0-2.x86_64.rpm
-wget https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp-hip-libraries_SLES15_SP5-22.0-1.x86_64.rpm
-sudo rpm -i aomp-hip-libraries_SLES15_SP5-22.0-1.x86_64.rpm
+wget https://github.com/ROCm/aomp/releases/download/rel_22.0-2/aomp-hip-libraries_SLES15_SP5-22.0-2.x86_64.rpm
+sudo rpm -i aomp-hip-libraries_SLES15_SP5-22.0-2.x86_64.rpm
```
## Prerequisites
diff --git a/docs/UBUNTUINSTALL.md b/docs/deprecated/UBUNTUINSTALL.md
similarity index 83%
rename from docs/UBUNTUINSTALL.md
rename to docs/deprecated/UBUNTUINSTALL.md
index 0bfbf133c4..10f69a9cc7 100644
--- a/docs/UBUNTUINSTALL.md
+++ b/docs/deprecated/UBUNTUINSTALL.md
@@ -3,19 +3,19 @@ AOMP will install to /usr/lib/aomp. The AOMP environment variable will automatic
On Ubuntu 22.04, run these commands:
```
-wget https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp_Ubuntu2204_22.0-1_amd64.deb
-sudo dpkg -i aomp_Ubuntu2204_22.0-1_amd64.deb
+wget https://github.com/ROCm/aomp/releases/download/rel_22.0-2/aomp_Ubuntu2204_22.0-2_amd64.deb
+sudo dpkg -i aomp_Ubuntu2204_22.0-2_amd64.deb
-wget https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp-hip-libraries_Ubuntu2204_22.0-1_amd64.deb
-sudo dpkg -i aomp-hip-libraries_Ubuntu2204_22.0-1_amd64.deb
+wget https://github.com/ROCm/aomp/releases/download/rel_22.0-2/aomp-hip-libraries_Ubuntu2204_22.0-2_amd64.deb
+sudo dpkg -i aomp-hip-libraries_Ubuntu2204_22.0-2_amd64.deb
```
On Ubuntu 24.04, run these commands:
```
-wget https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp_Ubuntu2404_22.0-1_amd64.deb
-sudo dpkg -i aomp_Ubuntu2404_22.0-1_amd64.deb
+wget https://github.com/ROCm/aomp/releases/download/rel_22.0-2/aomp_Ubuntu2404_22.0-2_amd64.deb
+sudo dpkg -i aomp_Ubuntu2404_22.0-2_amd64.deb
-wget https://github.com/ROCm/aomp/releases/download/rel_22.0-1/aomp-hip-libraries_Ubuntu2404_22.0-1_amd64.deb
-sudo dpkg -i aomp-hip-libraries_Ubuntu2404_22.0-1_amd64.deb
+wget https://github.com/ROCm/aomp/releases/download/rel_22.0-2/aomp-hip-libraries_Ubuntu2404_22.0-2_amd64.deb
+sudo dpkg -i aomp-hip-libraries_Ubuntu2404_22.0-2_amd64.deb
```
The AOMP bin directory (which includes the standard clang and llvm binaries) is not intended to be in your PATH for typical operation.
diff --git a/examples/fortran/.Makefile.swp b/examples/fortran/.Makefile.swp
deleted file mode 100644
index 6d450a7e83..0000000000
Binary files a/examples/fortran/.Makefile.swp and /dev/null differ
diff --git a/examples/fortran/fortran-hip-interop/fortran_callable_init.hip b/examples/fortran/fortran-hip-interop/fortran_callable_init.hip
index 72fef8ca74..a6bd393bce 100644
--- a/examples/fortran/fortran-hip-interop/fortran_callable_init.hip
+++ b/examples/fortran/fortran-hip-interop/fortran_callable_init.hip
@@ -1,7 +1,3 @@
-// Copyright © Advanced Micro Devices, Inc., or its affiliates.
-//
-// SPDX-License-Identifier: MIT
-
#include "hip/hip_runtime.h"
#include
__global__ void init_array(float *arr1){
diff --git a/examples/fortran/fortran-hip-interop/fortran_hip_interop.f95 b/examples/fortran/fortran-hip-interop/fortran_hip_interop.f95
index 5c63b79ed1..94324b2bf1 100644
--- a/examples/fortran/fortran-hip-interop/fortran_hip_interop.f95
+++ b/examples/fortran/fortran-hip-interop/fortran_hip_interop.f95
@@ -1,8 +1,3 @@
-!
-!Copyright © Advanced Micro Devices, Inc., or its affiliates.
-!
-!SPDX-License-Identifier: MIT
-!
program main
use iso_c_binding
use omp_lib
diff --git a/examples/fortran/gdb-simple/gdb_simple.f95 b/examples/fortran/gdb-simple/gdb_simple.f95
index 068dd9de21..6976f2fb57 100644
--- a/examples/fortran/gdb-simple/gdb_simple.f95
+++ b/examples/fortran/gdb-simple/gdb_simple.f95
@@ -1,8 +1,3 @@
-!
-!Copyright © Advanced Micro Devices, Inc., or its affiliates.
-!
-!SPDX-License-Identifier: MIT
-!
! example of simple Fortran AMD GPU offloading
program main
parameter (nsize=10)
diff --git a/examples/fortran/gdb-simple/gdbcmds b/examples/fortran/gdb-simple/gdbcmds
index 8da0a868a9..f689227dee 100644
--- a/examples/fortran/gdb-simple/gdbcmds
+++ b/examples/fortran/gdb-simple/gdbcmds
@@ -1,7 +1,2 @@
-#
-#Copyright © Advanced Micro Devices, Inc., or its affiliates.
-#
-#SPDX-License-Identifier: MIT
-#
run
exit
diff --git a/examples/fortran/is-initial-device-api/is-initial-device.f90 b/examples/fortran/is-initial-device-api/is-initial-device.f90
index cd94253e0e..daa1b9539d 100644
--- a/examples/fortran/is-initial-device-api/is-initial-device.f90
+++ b/examples/fortran/is-initial-device-api/is-initial-device.f90
@@ -1,8 +1,3 @@
-!
-!Copyright © Advanced Micro Devices, Inc., or its affiliates.
-!
-!SPDX-License-Identifier: MIT
-!
program simple
use omp_lib, ONLY : omp_is_initial_device
integer onGPU
diff --git a/examples/fortran/simple-offload/simple_offload.f95 b/examples/fortran/simple-offload/simple_offload.f95
index 8af8094f2b..2545243129 100644
--- a/examples/fortran/simple-offload/simple_offload.f95
+++ b/examples/fortran/simple-offload/simple_offload.f95
@@ -1,8 +1,3 @@
-!
-!Copyright © Advanced Micro Devices, Inc., or its affiliates.
-!
-!SPDX-License-Identifier: MIT
-!
! example of simple Fortran AMD GPU offloading
program main
parameter (nsize=1000000)
diff --git a/manifests/aomp_22.0-2.xml b/manifests/aomp_22.0-2.xml
new file mode 100644
index 0000000000..297776ffce
--- /dev/null
+++ b/manifests/aomp_22.0-2.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/manifests/aomp_22.0.xml b/manifests/aomp_22.0.xml
index 95e108faa1..a4d772cc44 100644
--- a/manifests/aomp_22.0.xml
+++ b/manifests/aomp_22.0.xml
@@ -13,7 +13,6 @@
-
diff --git a/manifests/aomp_23.0-0.xml b/manifests/aomp_23.0-0.xml
new file mode 100644
index 0000000000..395f87a5a0
--- /dev/null
+++ b/manifests/aomp_23.0-0.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/manifests/aomp_23.0.xml b/manifests/aomp_23.0.xml
new file mode 100644
index 0000000000..e0119381b2
--- /dev/null
+++ b/manifests/aomp_23.0.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/manifests/aompi_22.0.xml b/manifests/aompi_22.0.xml
index 3f646af2ff..59ed2dca14 100644
--- a/manifests/aompi_22.0.xml
+++ b/manifests/aompi_22.0.xml
@@ -12,7 +12,6 @@
-
diff --git a/manifests/aompi_23.0.xml b/manifests/aompi_23.0.xml
new file mode 100644
index 0000000000..14b23d0363
--- /dev/null
+++ b/manifests/aompi_23.0.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/manifests/test_22.0.xml b/manifests/test_22.0.xml
index f64df2bfca..8cde6f0723 100644
--- a/manifests/test_22.0.xml
+++ b/manifests/test_22.0.xml
@@ -20,6 +20,9 @@
+
+
+
@@ -43,5 +46,8 @@
+
+
+
diff --git a/manifests/test_23.0.xml b/manifests/test_23.0.xml
new file mode 100644
index 0000000000..8cde6f0723
--- /dev/null
+++ b/manifests/test_23.0.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/srock-bin/build_cmake.sh b/srock-bin/build_cmake.sh
index 0c848fc957..26cc44a482 100755
--- a/srock-bin/build_cmake.sh
+++ b/srock-bin/build_cmake.sh
@@ -14,12 +14,6 @@ thisdir=$(dirname "$realpath")
# --- end standard header ----
FLANG=${FLANG:-flang}
-SROCK_SUPP=${SROCK_SUPP:-$HOME/local}
-# SROCK_SUPP_BUILD could be a temp directory but defaults to $SROCK_SUPP/build
-SROCK_SUPP_BUILD=${SROCK_SUPP_BUILD:-$SROCK_SUPP/build}
-# SROCK_SUPP_INSTALL must be permanent directory.
-SROCK_SUPP_INSTALL=${SROCK_SUPP_INSTALL:-$SROCK_SUPP/install}
-
function runcmd(){
THISCMD=$1
if [ "$DRYRUN" ] ; then
@@ -153,7 +147,7 @@ function buildopenmpi(){
function buildninja(){
_cname="ninja"
- _version=1.11.1
+ _version=1.13.2
_installdir=$SROCK_SUPP_INSTALL/$_cname-$_version
_linkfrom=$SROCK_SUPP/$_cname
_builddir=$SROCK_SUPP_BUILD/$_cname
@@ -486,7 +480,11 @@ CMDLOGFILE=$SROCK_SUPP_BUILD/cmdlog
mkdir -p "$SROCK_SUPP_BUILD"
buildcmake
+buildninja
+echo "SROCK_SUPP=$SROCK_SUPP"
+echo "SROCK_JOB_THREADS=$SROCK_JOB_THREADS"
+echo "NINJA_NPROCS=$NINJA_NPROCS"
_thisdate=$(date)
echo "# DONE: successful build of cmake on $_thisdate " >>"$CMDLOGFILE"
diff --git a/srock-bin/build_srock.sh b/srock-bin/build_srock.sh
index d0c87b0bf6..020acc2c29 100755
--- a/srock-bin/build_srock.sh
+++ b/srock-bin/build_srock.sh
@@ -27,8 +27,6 @@ _curdir=$PWD
_start_date=$(date)
_start_secs=$(date +%s)
-_gfxsemicolons=$(echo "$GFXLIST" | tr ' ' ';')
-
# build_srock.sh Modes:
# The default mode "fullupdate" will
# - if TheRock repo exists, remove all previous updates
@@ -49,45 +47,57 @@ _gfxsemicolons=$(echo "$GFXLIST" | tr ' ' ';')
# FIXME: Add support for build modes: newclone and newbuild
#
_build_srock_mode=${1:-fullupdate}
+_cmake_enable=""
# This TheRock config is full build minus failing components
if [ "$SROCK_CONFIG" == "all" ] ; then
- _cmake_args="-B build -GNinja -DTHEROCK_AMDGPU_TARGETS='$_gfxsemicolons' \
--DTHEROCK_AMDGPU_DIST_BUNDLE_NAME=srock \
+ _cmake_enable="\
-DTHEROCK_ENABLE_ALL=ON \
-DTHEROCK_ENABLE_MIOPEN=OFF \
-DTHEROCK_ENABLE_COMPOSABLE_KERNEL=OFF \
-DTHEROCK_ENABLE_FFT=OFF \
-$SROCK_THEROCK_DIR"
+"
fi
# This is full build which could include failing components
if [ "$SROCK_CONFIG" == "all-debug" ] ; then
- _cmake_args"-B build -GNinja -DTHEROCK_AMDGPU_TARGETS='$_gfxsemicolons' \
--DTHEROCK_AMDGPU_DIST_BUNDLE_NAME=srock \
+ _cmake_enable="\
-DTHEROCK_ENABLE_ALL=ON \
-$SROCK_THEROCK_DIR"
+"
fi
# Default is minimal for compiler developers
if [ "$SROCK_CONFIG" == "minimal" ] ; then
- _cmake_args="-B build -GNinja -DTHEROCK_AMDGPU_TARGETS='$_gfxsemicolons' \
--DTHEROCK_AMDGPU_DIST_BUNDLE_NAME=srock \
+ _cmake_enable="\
-DTHEROCK_ENABLE_ALL=OFF \
-DTHEROCK_ENABLE_HIP=ON \
-DTHEROCK_ENABLE_HIP_RUNTIME=ON \
-DTHEROCK_ENABLE_HIPIFY=ON \
-DTHEROCK_BUNDLE_SYSDEPS=ON \
-DTHEROCK_ENABLE_COMPILER=ON \
-$SROCK_THEROCK_DIR"
+"
fi
+_gfxsemicolons=$(echo "$GFXLIST" | tr ' ' ';')
+_gfamsemicolons=$(echo "$GFXFAM" | tr ' ' ';')
+
+_cmake_args="-B build -GNinja \
+-DTHEROCK_AMDGPU_TARGETS='$_gfxsemicolons' \
+-DTHEROCK_AMDGPU_FAMILIES='$_gfamsemicolons' \
+-DTHEROCK_AMDGPU_DIST_BUNDLE_NAME=srock \
+-DTHEROCK_BACKGROUND_BUILD_JOBS=1 \
+-DTHEROCK_ENABLE_LLVM_TESTS=1 \
+$_cmake_enable \
+$SROCK_THEROCK_DIR"
+
# Print the start banner similar to DONE banner, useful if fails
echo
echo "===== START $0 on $_start_date"
echo " THEROCK targets: $_gfxsemicolons"
+echo " THEROCK families: $_gfamsemicolons"
echo " ROCm install dir: $SROCK_INSTALL_DIR"
echo " TheRock Dir: $SROCK_THEROCK_DIR"
+echo " TheRock branch: $SROCK_THEROCK_BRANCH"
echo " Compiler branch: $SROCK_COMPILER_BRANCH"
echo " Build Mode: $_build_srock_mode"
echo " SROCK config name: $SROCK_CONFIG"
@@ -124,6 +134,8 @@ if [ -d $SROCK_THEROCK_DIR ] ; then
cd $SROCK_THEROCK_DIR
echo " --- git checkout . (clean TheRock repo for update and to be patched)"
git checkout .
+ echo " --- git checkout $SROCK_THEROCK_BRANCH"
+ git checkout $SROCK_THEROCK_BRANCH
echo " --- git pull"
git pull
echo " --- git submodule update --remote --recursive"
@@ -135,8 +147,8 @@ if [ -d $SROCK_THEROCK_DIR ] ; then
else
cd $SROCK_REPOS
echo
- echo "===== git clone https://github.com/ROCm/TheRock.git -b main TheRock"
- git clone https://github.com/ROCm/TheRock.git -b main TheRock
+ echo "===== git clone https://github.com/ROCm/TheRock.git -b $SROCK_THEROCK_BRANCH TheRock"
+ git clone https://github.com/ROCm/TheRock.git -b $SROCK_THEROCK_BRANCH TheRock
fi
cd $SROCK_THEROCK_DIR
@@ -313,6 +325,7 @@ echo "===== DONE $0 on $_end_date"
echo " THEROCK targets: $_gfxsemicolons"
echo " ROCm install dir: $SROCK_INSTALL_DIR"
echo " TheRock Dir: $SROCK_THEROCK_DIR"
+echo " TheRock branch: $SROCK_THEROCK_BRANCH"
echo " Compiler branch: $SROCK_COMPILER_BRANCH"
echo " Build Mode: $_build_srock_mode"
echo " SROCK config name: $SROCK_CONFIG"
diff --git a/srock-bin/patches/amd-staging/_TheRock.patch b/srock-bin/patches/amd-staging/_TheRock.patch
index 728490b8d4..eab4d1475c 100644
--- a/srock-bin/patches/amd-staging/_TheRock.patch
+++ b/srock-bin/patches/amd-staging/_TheRock.patch
@@ -1,5 +1,17 @@
+diff --git a/cmake/therock_subproject.cmake b/cmake/therock_subproject.cmake
+index e8356406..d3373e56 100644
+--- a/cmake/therock_subproject.cmake
++++ b/cmake/therock_subproject.cmake
+@@ -1410,6 +1410,7 @@ function(_therock_cmake_subproject_setup_toolchain
+ string(APPEND _toolchain_contents "set(AMDGPU_TARGETS @_filtered_gpu_targets@ CACHE STRING \"From super-project\" FORCE)\n")
+ string(APPEND _toolchain_contents "set(GPU_TARGETS @_filtered_gpu_targets@ CACHE STRING \"From super-project\" FORCE)\n")
+ string(APPEND _toolchain_contents "set(CMAKE_HIP_ARCHITECTURES @_filtered_gpu_targets@ CACHE STRING \"From super-project\" FORCE)\n")
++ string(APPEND _toolchain_contents "set(CMAKE_HIP_COMPILER \"@AMD_LLVM_CXX_COMPILER@\")\n")
+ endif()
+
+ # General settings applicable to all toolchains.
diff --git a/compiler/CMakeLists.txt b/compiler/CMakeLists.txt
-index 4df4bcab..52569d0f 100644
+index 9db31320..8552b77c 100644
--- a/compiler/CMakeLists.txt
+++ b/compiler/CMakeLists.txt
@@ -10,6 +10,10 @@ if(THEROCK_ENABLE_COMPILER)
@@ -11,27 +23,28 @@ index 4df4bcab..52569d0f 100644
+ list(APPEND _extra_llvm_cmake_args "-DLLVM_VERSION_PATCH=$ENV{SROCK_VERSION_MOD}")
+ endif()
- # If the compiler is not pristine (i.e. has patches), then there will be a
- # ".amd-llvm.smrev" file present which must be used instead of the auto
-@@ -67,7 +71,17 @@ if(THEROCK_ENABLE_COMPILER)
- -DCLANG_ENABLE_STATIC_ANALYZER=OFF
+ # Building Flang is very memory-intensive on systems with many cores. Allow
+ # users to specify the level of concurrency for these tasks so they can
+@@ -71,6 +75,9 @@ if(THEROCK_ENABLE_COMPILER)
+
+ # Features
+ -DLLVM_INCLUDE_TESTS=${THEROCK_ENABLE_LLVM_TESTS}
++ -DLLVM_BUILD_TESTS=${THEROCK_ENABLE_LLVM_TESTS}
++ -DCLANG_INCLUDE_TESTS=${THEROCK_ENABLE_LLVM_TESTS}
++ -DLLVM_LIT_ARGS='-vv --show-unsupported --show-xfail -j 16'
+ -DLLVM_ENABLE_ZLIB=FORCE_ON
+ -DLLVM_ENABLE_Z3_SOLVER=OFF
+ -DLLVM_ENABLE_LIBXML2=OFF
+@@ -92,6 +99,9 @@ if(THEROCK_ENABLE_COMPILER)
-DCLANG_ENABLE_CLANGD=OFF
-DCLANG_TIDY_ENABLE_STATIC_ANALYZER=OFF
--
-+ -DCLANG_TOOL_CLANG_LINKER_WRAPPER_BUILD=ON
-+ -DCLANG_TOOL_OFFLOAD_ARCH_BUILD=ON
-+ -DOPENMP_ENABLE_LIBOMPTARGET=ON
-+ -DLIBOMPTARGET_BUILD_DEVICE_FORTRT=ON
-+ -DOFFLOAD_EXTERNAL_PROJECT_UNIFIED_ROCR=ON
+
+ -DLIBOMP_USE_HWLOC=ON
-+ -DLIBOMPTARGET_EXTERNAL_PROJECT_HSA_PATH=${CMAKE_CURRENT_SOURCE_DIR}/../rocm-systems/projects/rocr-runtime
-+ -DFLANG_RUNTIME_F128_MATH_LIB=libquadmath
+ -DROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_NEW=${CMAKE_CURRENT_BINARY_DIR}/lib/clang/${LLVM_VERSION_MAJOR}/lib/amdgcn
-+ -DRUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
-+ -DRUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES=openmp
- # ASAN features.
- # Note that building AMDGPU ASAN extensions depends on various runtime headers
- # (since it instruments them). These paths must line up and will be an error
++
+ -DCLANG_TOOL_CLANG_LINKER_WRAPPER_BUILD=${THEROCK_CONDITION_IS_NON_WINDOWS}
+ -DCLANG_TOOL_OFFLOAD_ARCH_BUILD=${THEROCK_CONDITION_IS_NON_WINDOWS}
+ -DOPENMP_ENABLE_LIBOMPTARGET=${THEROCK_CONDITION_IS_NON_WINDOWS}
diff --git a/compiler/artifact-amd-llvm.toml b/compiler/artifact-amd-llvm.toml
index b0645ebe..54755ad2 100644
--- a/compiler/artifact-amd-llvm.toml
@@ -45,27 +58,10 @@ index b0645ebe..54755ad2 100644
# LLVM deviates from the defaults in some key ways:
diff --git a/compiler/pre_hook_amd-llvm.cmake b/compiler/pre_hook_amd-llvm.cmake
-index 0b457d61..38973bd7 100644
+index 48aa6a8b..20ea73f1 100644
--- a/compiler/pre_hook_amd-llvm.cmake
+++ b/compiler/pre_hook_amd-llvm.cmake
-@@ -13,7 +13,7 @@ if(WIN32)
- # TODO(#36): Enable libunwind, libcxx, and libcxxabi on Windows?
- # Should they be supported? What depends on them?
- set(LLVM_ENABLE_LIBCXX OFF)
-- set(LLVM_ENABLE_RUNTIMES "compiler-rt" CACHE STRING "Enabled runtimes" FORCE)
-+ set(LLVM_ENABLE_RUNTIMES "libcxx;libcxxabi;libunwind;openmp;offload;compiler-rt;flang-rt" CACHE STRING "Enabled runtimes" FORCE)
- set(LLVM_ENABLE_PROJECTS "clang;lld;clang-tools-extra" CACHE STRING "Enable LLVM projects" FORCE)
- else()
- set(LLVM_BUILD_LLVM_DYLIB ON)
-@@ -57,6 +57,7 @@ endif()
- # Set the LLVM_ENABLE_PROJECTS variable before including LLVM's CMakeLists.txt
- set(BUILD_TESTING OFF CACHE BOOL "DISABLE BUILDING TESTS IN SUBPROJECTS" FORCE)
- set(LLVM_TARGETS_TO_BUILD "AMDGPU;X86" CACHE STRING "Enable LLVM Targets" FORCE)
-+set(LLVM_RUNTIME_TARGETS "default;amdgcn-amd-amdhsa")
-
- # Packaging.
- set(PACKAGE_VENDOR "AMD" CACHE STRING "Vendor" FORCE)
-@@ -77,9 +78,9 @@ set(LLVM_EXTERNAL_PROJECTS "rocm-device-libs;spirv-llvm-translator" CACHE STRING
+@@ -121,9 +121,9 @@ set(LLVM_EXTERNAL_PROJECTS "rocm-device-libs;spirv-llvm-translator" CACHE STRING
# options to manage this transition but they require knowing the clange resource
# dir. In order to avoid drift, we just fixate that too. This can all be
# removed in a future version.
@@ -78,50 +74,11 @@ index 0b457d61..38973bd7 100644
# Setup the install rpath (let CMake handle build RPATH per usual):
# * Executables and libraries can always search their adjacent lib directory
-@@ -154,6 +155,7 @@ block()
- CLANG_OFFLOAD_PACKAGER
- CLANG_OFFLOAD_WRAPPER
- CLANG_LINKER_WRAPPER
-+ OFFLOAD_ARCH
- CLANG_SHLIB
- DRIVER
- )
-diff --git a/math-libs/BLAS/pre_hook_hipSPARSE.cmake b/math-libs/BLAS/pre_hook_hipSPARSE.cmake
-index e0b10dd5..190b51c8 100644
---- a/math-libs/BLAS/pre_hook_hipSPARSE.cmake
-+++ b/math-libs/BLAS/pre_hook_hipSPARSE.cmake
-@@ -1,6 +1,6 @@
- # See the artifact descriptor where we require these matrices for the test
- # artifact. Consider installing as part of the main project.
--install(
-- DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/clients/matrices"
-- DESTINATION "clients"
--)
-+#install(
-+# DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/clients/matrices"
-+# DESTINATION "clients"
-+#)
-diff --git a/math-libs/BLAS/pre_hook_rocSPARSE.cmake b/math-libs/BLAS/pre_hook_rocSPARSE.cmake
-index 697bba2b..3856a68c 100644
---- a/math-libs/BLAS/pre_hook_rocSPARSE.cmake
-+++ b/math-libs/BLAS/pre_hook_rocSPARSE.cmake
-@@ -11,7 +11,7 @@ endif()
-
- # See the artifact descriptor where we require these matrices for the test
- # artifact. Consider installing as part of the main project.
--install(
-- DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/clients/matrices"
-- DESTINATION "clients"
--)
-+#install(
-+# DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/clients/matrices"
-+# DESTINATION "clients"
-+#)
diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt
-index 29b9a404..6947a640 100644
+index de446e14..af47ddad 100644
--- a/profiler/CMakeLists.txt
+++ b/profiler/CMakeLists.txt
-@@ -50,10 +50,15 @@ if(THEROCK_ENABLE_ROCPROFV3)
+@@ -82,11 +82,16 @@ endif(THEROCK_BUILD_TESTING)
EXTERNAL_SOURCE_DIR "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/projects/rocprofiler-sdk"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/rocprofiler-sdk"
BACKGROUND_BUILD
@@ -130,14 +87,16 @@ index 29b9a404..6947a640 100644
+ -DCMAKE_CXX_FLAGS=-I${THEROCK_SOURCE_DIR}/build/dist/rocm/include
+ -DCMAKE_C_FLAGS=-I${THEROCK_SOURCE_DIR}/build/dist/rocm/include
-DHIP_PLATFORM=amd
+ -DROCPROFILER_PYTHON_VERSIONS:STRING="${_detected_python_versions_str}"
CMAKE_INCLUDES
therock_explicit_finders.cmake
+ INTERFACE_INCLUDE_DIRS
+ ${THEROCK_SOURCE_DIR}/build/dist/rocm/include
+ COMPILER_TOOLCHAIN
+ amd-hip
RUNTIME_DEPS
- aqlprofile
- hip-clr
-@@ -89,10 +94,14 @@ if(THEROCK_ENABLE_ROCPROFV3)
+@@ -163,11 +168,15 @@ endif(THEROCK_BUILD_TESTING)
+ # Must build with the HIP compiler.
amd-hip
CMAKE_ARGS
+ -DCMAKE_CXX_FLAGS=-I${THEROCK_SOURCE_DIR}/build/dist/rocm/include
diff --git a/srock-bin/patches/amd-staging/compiler_amd-llvm.patch b/srock-bin/patches/amd-staging/compiler_amd-llvm.patch
new file mode 100644
index 0000000000..3ae33ffbec
--- /dev/null
+++ b/srock-bin/patches/amd-staging/compiler_amd-llvm.patch
@@ -0,0 +1,16 @@
+diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt
+index 46d799cbec11..e1228651d856 100644
+--- a/libc/CMakeLists.txt
++++ b/libc/CMakeLists.txt
+@@ -420,10 +420,9 @@ add_subdirectory(lib)
+ if(LLVM_INCLUDE_TESTS)
+ add_subdirectory(test)
+ add_subdirectory(fuzzing)
++# add_subdirectory(benchmarks)
+ endif()
+
+-add_subdirectory(benchmarks)
+-
+ if (LIBC_INCLUDE_DOCS)
+ add_subdirectory(docs)
+ endif()
diff --git a/srock-bin/patches/ninja-nprocs-v1.13.2.patch b/srock-bin/patches/ninja-nprocs-v1.13.2.patch
new file mode 100644
index 0000000000..342aaf57f6
--- /dev/null
+++ b/srock-bin/patches/ninja-nprocs-v1.13.2.patch
@@ -0,0 +1,85 @@
+diff --git a/src/ninja.cc b/src/ninja.cc
+index 92d0761..8e3e1b8 100644
+--- a/src/ninja.cc
++++ b/src/ninja.cc
+@@ -252,15 +252,40 @@ void Usage(const BuildConfig& config) {
+
+ /// Choose a default value for the -j (parallelism) flag.
+ int GuessParallelism() {
+- switch (int processors = GetProcessorCount()) {
++ int nprocs = GetProcessorCount();
++ switch (nprocs) {
+ case 0:
+ case 1:
+- return 2;
+ case 2:
+- return 3;
++ nprocs++;
++ break;
+ default:
+- return processors + 2;
++ nprocs += 2;
++ break;
+ }
++
++ const char * nprocs_str = getenv("NINJA_NPROCS");
++ if (!nprocs_str) return nprocs;
++
++ char * end;
++ auto nprocs_env = strtol(nprocs_str, &end, 10);
++
++ if (*end != 0 || nprocs_env <= 0) return nprocs;
++
++ return int(nprocs_env);
++}
++
++/// Returns verbosity mode from the environment variable
++int HasVerbose() {
++ const char * verbose_str = getenv("NINJA_VERBOSE");
++ if (!verbose_str) return 0;
++
++ char * end;
++ auto verbose = strtol(verbose_str, &end, 10);
++
++ if (*end != 0 || verbose <= 0) return 0;
++
++ return verbose > 0;
+ }
+
+ /// Rebuild the build manifest, if necessary.
+@@ -1781,6 +1806,9 @@ int ReadFlags(int* argc, char*** argv,
+ *argv += optind;
+ *argc -= optind;
+
++ if (HasVerbose())
++ config->verbosity = BuildConfig::VERBOSE;
++
+ return -1;
+ }
+
+diff --git a/src/status_printer.cc b/src/status_printer.cc
+index e69cd15..0b9d0f8 100644
+--- a/src/status_printer.cc
++++ b/src/status_printer.cc
+@@ -51,7 +51,7 @@ StatusPrinter::StatusPrinter(const BuildConfig& config)
+
+ progress_status_format_ = getenv("NINJA_STATUS");
+ if (!progress_status_format_)
+- progress_status_format_ = "[%f/%t] ";
++ progress_status_format_ = "[%es %p %rx %f/%t] ";
+ }
+
+ void StatusPrinter::EdgeAddedToPlan(const Edge* edge) {
+diff --git a/src/version.cc b/src/version.cc
+index b108660..8fbd82b 100644
+--- a/src/version.cc
++++ b/src/version.cc
+@@ -20,7 +20,7 @@
+
+ using namespace std;
+
+-const char* kNinjaVersion = "1.13.2";
++const char* kNinjaVersion = "1.13.2-mk";
+
+ void ParseVersion(const string& version, int* major, int* minor) {
+ size_t end = version.find('.');
diff --git a/srock-bin/srock_common_vars b/srock-bin/srock_common_vars
index 387c2f6553..05e7be6d1e 100644
--- a/srock-bin/srock_common_vars
+++ b/srock-bin/srock_common_vars
@@ -23,13 +23,14 @@ if [ ! -d $SROCK_REPOS ] ; then
[ $? != 0 ] && echo "ERROR: Could not create $SROCK_REPOS" && exit 1
fi
-SROCK_VERSION=${SROCK_VERSION:-"22.0"}
-SROCK_VERSION_MOD=${SROCK_VERSION_MOD:-"4"}
+SROCK_VERSION=${SROCK_VERSION:-"23.0"}
+SROCK_VERSION_MOD=${SROCK_VERSION_MOD:-"0"}
SROCK_VERSION_STRING=${SROCK_VERSION_STRING:-"$SROCK_VERSION-$SROCK_VERSION_MOD"}
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_CONFIG=${SROCK_CONFIG:-minimal}
# Set default value for ROCm install directory SROCK_INSTALL_DIR.
@@ -50,12 +51,35 @@ SROCK_VERSION_INFO_DIR=$SROCK_REPOS/$SROCK_REPO_NAME/srock-bin/srock_$SROCK_VERS
SROCK_INFO_FILE=$SROCK_VERSION_INFO_DIR/srock_$SROCK_VERSION_STRING.info
SROCK_SUBMOD_FILE=$SROCK_VERSION_INFO_DIR/srock_$SROCK_VERSION_STRING.submodules
-# Specify target GFXLIST
+# SROCK_SUPP is for SUPPlemental software components needed for testing.
+# such as openmpi, hdf5, and silo. Applications that need supplemental
+# components can get the latest version with $SROCK_SUPP/
+SROCK_SUPP=${SROCK_SUPP:-$HOME/local}
+# SROCK_SUPP_BUILD could be a temp directory but defaults to $SROCK_SUPP/build
+SROCK_SUPP_BUILD=${SROCK_SUPP_BUILD:-$SROCK_SUPP/build}
+# SROCK_SUPP_INSTALL must be permanent directory.
+SROCK_SUPP_INSTALL=${SROCK_SUPP_INSTALL:-$SROCK_SUPP/install}
+export SROCK_SUPP SROCK_SUPP_BUILD SROCK_SUPP_INSTALL
+export PATH=$SROCK_SUPP/cmake/bin:$SROCK_SUPP/ninja/bin:$PATH
+
+# Specify target GFXLIST/GFXFAM
# gfx not currently supported by TheRock:
# gfx900 gfx902 gfx90c gfx1031 gfx1052 gfx1053
# gfx9-generic gfx9-4-generic gfx10-1-generic gfx10-3-generic gfx11-generic gfx12-generic
GFXLIST=${GFXLIST:-"gfx906 gfx908 gfx90a gfx942 gfx950 gfx1010 gfx1011 gfx1012 gfx1030 gfx1032 gfx1035 gfx1036 gfx1100 gfx1101 gfx1102 gfx1103 gfx1150 gfx1151 gfx1200 gfx1201"}
export GFXLIST
+GFXFAM=${GFXFAM:-"dcgpu-all dgpu-all igpu-all"}
+export GFXFAM
+
+# Calculate the number of threads to use for make
+COMP_THREADS=1
+if [ "$(which getconf)" ] && [ "$(which bc)" ]; then
+ COMP_THREADS=$(getconf _NPROCESSORS_ONLN)
+ COMP_THREADS=$(echo "$COMP_THREADS/2.5" | bc)
+fi
+SROCK_JOB_THREADS=${SROCK_JOB_THREADS:-$COMP_THREADS}
+NINJA_NPROCS=${NINJA_NPROCS:-$SROCK_JOB_THREADS}
+export SROCK_JOB_THREADS NINJA_NPROCS
SROCK_DEV_BRANCH=${SROCK_DEV_BRANCH:-aomp-dev}
SROCK_HIPFORT_BRANCH=${SROCK_HIPFORT_BRANCH:-release/rocm-rel-7.0}
diff --git a/test/Makefile.defs b/test/Makefile.defs
index 8b2e3432db..35d5dcbf9d 100644
--- a/test/Makefile.defs
+++ b/test/Makefile.defs
@@ -101,17 +101,19 @@ else
AOMPHIP = $(AOMP)/../..
endif
endif
-
-# Look for FileCheck on the system in various places.
-# Check local AOMP install first.
-FILECHECK=$(AOMP)/bin/FileCheck
+# look file pip installed filecheck first
+FILECHECK?=/home/$(USER)/.local/bin/filecheck
FILECHECK_RT=$(shell ls $(FILECHECK) 2>/dev/null || echo error)
ifeq ($(FILECHECK_RT),error)
-TESTPACKAGE_BINDIR=$(shell find $(HOME)/tmp/openmp-extras -type f -name 'aomp_common_vars' | xargs dirname)
-FILECHECK=$(TESTPACKAGE_BINDIR)/FileCheck
-FILECHECK_RT=$(shell ls $(FILECHECK) 2>/dev/null || echo error)
-endif
-ifeq ($(FILECHECK_RT),error)
+# Look for FileCheck on the system in various places.
+# Check local AOMP install first.
+ FILECHECK=$(AOMP)/bin/FileCheck
+ FILECHECK_RT=$(shell ls $(FILECHECK) 2>/dev/null || echo error)
+ ifeq ($(FILECHECK_RT),error)
+ FILECHECK=$(HOME)/openmp-utils/bin/FileCheck
+ FILECHECK_RT=$(shell ls $(FILECHECK) 2>/dev/null || echo error)
+ endif
+ ifeq ($(FILECHECK_RT),error)
# Check default AOMP release location.
FILECHECK=/usr/lib/aomp/bin/FileCheck
FILECHECK_RT=$(shell ls $(FILECHECK) 2> /dev/null || echo error)
@@ -143,7 +145,9 @@ ifeq ($(FILECHECK_RT),error)
endif
endif
endif
+ endif
endif
+#$(warning ----INFO---- FileCheck found at $(FILECHECK))
OMPIDIR ?= ~/local/openmpi
@@ -353,6 +357,13 @@ ifeq ($(TEMPS),1)
VERBOSE += -save-temps
endif
+IMPLICIT_GPU_FLANG_RT ?= 1
+ifeq ($(IMPLICIT_GPU_FLANG_RT),1)
+ FLANG_GPU_LINK_FLAGS =
+else
+ FLANG_GPU_LINK_FLAGS = -fno-gpu-flang-rt -lflang_rt.hostdevice
+endif
+
ifeq ($(NOOPT),1)
CFLAGS =
else
diff --git a/test/smoke/aomp-issue376/Makefile b/test/smoke-dev/aomp-issu376-a/Makefile
similarity index 100%
rename from test/smoke/aomp-issue376/Makefile
rename to test/smoke-dev/aomp-issu376-a/Makefile
diff --git a/test/smoke/aomp-issue376/aomp-issue376.cpp b/test/smoke-dev/aomp-issu376-a/aomp-issue376.cpp
similarity index 100%
rename from test/smoke/aomp-issue376/aomp-issue376.cpp
rename to test/smoke-dev/aomp-issu376-a/aomp-issue376.cpp
diff --git a/test/smoke-limbo/aomp-issue531/callbacks.h b/test/smoke-dev/aomp-issu376-a/callbacks.h
similarity index 100%
rename from test/smoke-limbo/aomp-issue531/callbacks.h
rename to test/smoke-dev/aomp-issu376-a/callbacks.h
diff --git a/test/smoke-limbo/aomp-issue531/Makefile b/test/smoke-dev/aomp-issue531/Makefile
similarity index 100%
rename from test/smoke-limbo/aomp-issue531/Makefile
rename to test/smoke-dev/aomp-issue531/Makefile
diff --git a/test/smoke-limbo/aomp-issue531/aomp-issue531.cpp b/test/smoke-dev/aomp-issue531/aomp-issue531.cpp
similarity index 100%
rename from test/smoke-limbo/aomp-issue531/aomp-issue531.cpp
rename to test/smoke-dev/aomp-issue531/aomp-issue531.cpp
diff --git a/test/smoke/aomp-issue376/callbacks.h b/test/smoke-dev/aomp-issue531/callbacks.h
similarity index 100%
rename from test/smoke/aomp-issue376/callbacks.h
rename to test/smoke-dev/aomp-issue531/callbacks.h
diff --git a/test/smoke-dev/check_smoke_dev.sh b/test/smoke-dev/check_smoke_dev.sh
deleted file mode 100755
index 1249428bb6..0000000000
--- a/test/smoke-dev/check_smoke_dev.sh
+++ /dev/null
@@ -1,314 +0,0 @@
-#!/bin/bash
-#
-# Checks all tests in smoke-dev using make check.
-# Programs return 0 for success or a number > 0 for failure.
-# Tests that need to be visually inspected: devices, pfspecify, pfspecify_str, stream
-#
-#
-
-#Text Colors
-RED="\033[0;31m"
-GRN="\033[0;32m"
-BLU="\033[0;34m"
-ORG="\033[0;33m"
-BLK="\033[0m"
-
-function gatherdata(){
- #Gather Test Data
- passing_tests=0
- if [ -e passing-tests.txt ]; then
- ((passing_tests=$(wc -l < passing-tests.txt)))
- total_tests=$passing_tests
- fi
- if [ -e make-fail.txt ]; then
- ((total_tests+=$(wc -l < make-fail.txt)))
- fi
- if [ -e failing-tests.txt ]; then
- ((total_tests+=$(wc -l < failing-tests.txt)))
- fi
-
- #Print Results
- echo -e "$BLU"-------------------- Results --------------------"$BLK"
- echo -e "$BLU"Number of tests: $total_tests"$BLK"
- echo ""
- echo -e "$GRN"Passing tests: $passing_tests/$total_tests""
-
- #Print passing tests, if any
- if [ -e passing-tests.txt ]; then
- echo "--------------------"
- cat passing-tests.txt
- fi
-
- #Print failed tests
- echo -e "$RED"
- echo ""
- if [ -e failing-tests.txt ]; then
- echo "Runtime Fails"
- echo "--------------------"
- cat failing-tests.txt
- echo ""
- fi
-
- if [ -e make-fail.txt ]; then
- echo "Compile Fails"
- echo "--------------------"
- cat make-fail.txt
- fi
- echo -e "$BLK"
-}
-
-if [ "$1" == "gatherdata" ]; then
- gatherdata
- exit 0
-fi
-
-cleanup(){
- rm -f passing-tests.txt
- rm -f failing-tests.txt
- rm -f check-smoke.txt
- rm -f make-fail.txt
-}
-
-script_dir=$(dirname "$0")
-pushd $script_dir
-path=$(pwd)
-
-#Clean all testing directories
-cleanup
-
-if [ "$1" == "-clean" ]; then
- for directory in ./*/; do
- pushd $directory > /dev/null
- make clean
- popd > /dev/null
- done
- exit 0
-fi
-
-export OMP_TARGET_OFFLOAD=${OMP_TARGET_OFFLOAD:-MANDATORY}
-echo OMP_TARGET_OFFLOAD=$OMP_TARGET_OFFLOAD
-
-echo ""
-echo -e "$ORG"RUNNING ALL TESTS IN: $path"$BLK"
-echo ""
-
-echo "************************************************************************************" > check-smoke.txt
-echo " A non-zero exit code means a failure occured." >> check-smoke.txt
-echo "***********************************************************************************" >> check-smoke.txt
-
-skip_tests=""
-if [ "$SKIP_FORTRAN" == 1 ] ; then
- skip_tests+="`find . -iname '*.f9[50]' | sed s^./^^ | awk -F/ '{print $1}'` "
- echo $skip_tests
-fi
-
-# ---------- Begin parallel logic ----------
-if [ "$AOMP_PARALLEL_SMOKE" == 1 ]; then
- sem --help > /dev/null
- if [ $? -eq 0 ]; then
- COMP_THREADS=1
- MAX_THREADS=16
- if [ ! -z `which "getconf"` ]; then
- COMP_THREADS=$(`which "getconf"` _NPROCESSORS_ONLN)
- if [ "$AOMP_PROC" == "ppc64le" ] ; then
- COMP_THREADS=$(( COMP_THREADS / 6))
- fi
- if [ "$AOMP_PROC" == "aarch64" ] ; then
- COMP_THREADS=$(( COMP_THREADS / 4))
- fi
- fi
- AOMP_JOB_THREADS=${AOMP_JOB_THREADS:-$COMP_THREADS}
- if [ $AOMP_JOB_THREADS -gt 16 ]; then
- AOMP_JOB_THREADS=16
- echo "Limiting job threads to $AOMP_JOB_THREADS."
- fi
- echo THREADS: $AOMP_JOB_THREADS
- # Parallel Make
- for directory in ./*/; do
- pushd $directory > /dev/null
- base=$(basename `pwd`)
- echo Make: $base
- if [ $base == "gpus" ]; then # Compile and link only test
- make clean > /dev/null
- make &> make-log.txt
- if [ $? -ne 0 ]; then
- flock -e lockfile -c "echo $base: Make Failed >> ../make-fail.txt"
- else
- flock -e lockfile -c "echo $base >> ../passing-tests.txt"
- fi
- else
- sem --jobs $AOMP_JOB_THREADS --id def_sem -u 'base=$(basename $(pwd)); make clean > /dev/null; make &> make-log.txt; if [ $? -ne 0 ]; then flock -e lockfile -c "echo $base: Make Failed >> ../make-fail.txt"; fi;'
- fi
- popd > /dev/null
- done
-
- # Wait for jobs to finish before execution
- sem --wait --id def_sem
-
- # Parallel execution, currently limited to 4 jobs
- for directory in ./*/; do
- pushd $directory > /dev/null
- base=$(basename `pwd`)
- echo RUN $base
- if [ $base == 'hip_rocblas' ] ; then
- ls $AOMPROCM/rocblas > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- echo -e "$RED"$base - needs rocblas installed at $AOMPROCM/rocblas:"$BLK"
- echo -e "$RED"$base - ROCBLAS NOT FOUND!!! SKIPPING TEST!"$BLK"
- popd > /dev/null
- continue
- fi
- elif [ $base == 'devices' ] || [ $base == 'stream' ] ; then
- sem --jobs 4 --id def_sem -u 'make run > /dev/null 2>&1'
- sem --jobs 4 --id def_sem -u 'make check > /dev/null 2>&1'
- elif [ $base == 'printf_parallel_for_target' ] || [ $base == 'omp_places' ] || [ $base == 'pfspecifier' ] || [ $base == 'pfspecifier_str' ] ; then
- sem --jobs 4 --id def_sem -u 'make verify-log > /dev/null'
- elif [ $base == 'flags' ] ; then
- make run
- elif [ $base == 'liba_bundled' ] || [ $base == 'liba_bundled_cmdline' ]; then
- sem --jobs 4 --id def_sem -u 'base=$(basename $(pwd)); make check > /dev/null; if [ $? -ne 0 ]; then flock -e lockfile -c "echo $base: Make Failed >> ../make-fail.txt"; fi;'
- elif [ $base == "gpus" ]; then # Compile and link only test
- echo gpus is compile only!
- else
- sem --jobs 4 --id def_sem -u 'make check > /dev/null 2>&1'
- fi
- popd > /dev/null
- done
-
- # Wait for jobs to finish executing
- sem --wait --id def_sem
- gatherdata
- exit
- else
- echo
- echo "Warning: Parallel smoke requested, but the parallel package needed is not installed. Continuing with sequential version..."
- echo
- fi
-fi
-# ---------- End parallel logic ----------
-
-
-#Loop over all directories and make run / make check depending on directory name
-for directory in ./*/; do
- (cd "$directory" && path=$(pwd) && base=$(basename $path)
- if [ "$NO_CLEAN" != 1 ] ; then
- make clean
- fi
- #Skip tests that are known failures
- skip=0
- for test in $skip_tests ; do
- if [ $test == $base ] ; then
- skip=1
- echo "$test $base"
- break
- fi
- done
- if [ $skip -ne 0 ] ; then
- echo "Skipping $base"
- echo ""
- else
- AOMPROCM=${AOMPROCM:-/opt/rocm}
- if [ $base == 'hip_rocblas' ] ; then
- ls $AOMPROCM/rocblas > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- echo -e "$RED"$base - needs rocblas installed at $AOMPROCM/rocblas:"$BLK"
- echo -e "$RED"$base - ROCBLAS NOT FOUND!!! SKIPPING TEST!"$BLK"
- continue
- fi
- fi
- if [ $base == 'devices' ] || [ $base == 'pfspecifier' ] || [ $base == 'pfspecifier_str' ] || [ $base == 'stream' ] ; then
- make
- if [ $? -ne 0 ]; then
- echo "$base: Make Failed" >> ../make-fail.txt
- fi
- make run > /dev/null 2>&1
- make check > /dev/null 2>&1
-
- #flags has multiple runs
- elif [ $base == 'flags' ] ; then
- make
- make run > /dev/null 2>&1
- elif [ $base == 'printf_parallel_for_target' ] ; then
- make verify-log
- else
- make
- if [ $? -ne 0 ]; then
- echo "$base: Make Failed" >> ../make-fail.txt
- fi
- make check > /dev/null 2>&1
- #liba_bundled has an additional Makefile, that may fail on the make check
- if [ $? -ne 0 ] && ( [ $base == 'liba_bundled' ] || [ $base == 'liba_bundled_cmdline' ] ) ; then
- echo "$base: Make Failed" >> ../make-fail.txt
- fi
- fi
- fi
- echo ""
- )
-
-done
-
-#Print run.log for all tests that need visual inspection
-for directory in ./*/; do
- (cd "$directory" && path=$(pwd) && base=$(basename $path)
- if [ $base == 'devices' ] || [ $base == 'pfspecifier' ] || [ $base == 'pfspecifier_str' ] || [ $base == 'stream' ] ; then
- echo ""
- echo -e "$ORG"$base - Run Log:"$BLK"
- echo "--------------------------"
- if [ -e run.log ]; then
- cat run.log
- fi
- echo ""
- echo ""
- fi
- )
-done
-
-#Replace false positive return codes with 'Check the run.log' so that user knows to visually inspect those.
-sed -i '/pfspecifier/ {s/0/Check the run.log above/}; /devices/ {s/0/Check the run.log above/}; /stream/ {s/0/Check the run.log above/}' check-smoke.txt
-echo ""
-if [ -e check-smoke.txt ]; then
- cat check-smoke.txt
-fi
-if [ -e make-fail.txt ]; then
- cat make-fail.txt
-fi
-echo ""
-
-gatherdata
-
-# Print run logs for runtime fails, EPSDB only
-# Disable printing of runtime fails for smoke-dev
-if [ "$EPSDB" == 2 ] ; then
- file='failing-tests.txt'
- flags_test_done=0
- if [ -e $file ]; then
- echo ----------Printing Runtime Fail Logs---------
- while read -r line; do
- # The flags test has multiple numbered runs. We cannot pushd flags 1 because only the flags dir exists.
- # We must re-run the entire flags test to get run.log. If more than one flags subtest fails only run once.
- if [[ "$line" =~ "flags" ]]; then
- if [[ "$flags_test_done" == 0 ]]; then
- echo
- pushd flags > /dev/null
- echo Test: flags run log:
- echo The flags test must run all iterations if one subtest fails.
- make run
- cat run.log
- flags_test_done=1
- popd > /dev/null
- fi
- else
- echo
- pushd $line > /dev/null
- echo
- make run > /dev/null
- echo Test: $line run log:
- cat run.log
- popd > /dev/null
- fi
- done < "$file"
- echo
- fi
-fi
-
-popd
diff --git a/test/smoke-dev/check_smoke_dev.sh b/test/smoke-dev/check_smoke_dev.sh
new file mode 120000
index 0000000000..9beff5fdbe
--- /dev/null
+++ b/test/smoke-dev/check_smoke_dev.sh
@@ -0,0 +1 @@
+../smoke/check_smoke.sh
\ No newline at end of file
diff --git a/test/smoke-dev/clang-325070/Makefile b/test/smoke-dev/clang-325070-1/Makefile
similarity index 100%
rename from test/smoke-dev/clang-325070/Makefile
rename to test/smoke-dev/clang-325070-1/Makefile
diff --git a/test/smoke-dev/clang-325070/clang-325070.cpp b/test/smoke-dev/clang-325070-1/clang-325070.cpp
similarity index 100%
rename from test/smoke-dev/clang-325070/clang-325070.cpp
rename to test/smoke-dev/clang-325070-1/clang-325070.cpp
diff --git a/test/smoke-dev/clang-325070/doit.gdb b/test/smoke-dev/clang-325070-1/doit.gdb
similarity index 100%
rename from test/smoke-dev/clang-325070/doit.gdb
rename to test/smoke-dev/clang-325070-1/doit.gdb
diff --git a/test/smoke-dev/gpurun-tests/Makefile b/test/smoke-dev/gpurun-tests/Makefile
new file mode 100644
index 0000000000..ab48baa517
--- /dev/null
+++ b/test/smoke-dev/gpurun-tests/Makefile
@@ -0,0 +1,13 @@
+include ../../Makefile.defs
+
+TESTNAME = gpurun-tests
+TESTSRC_MAIN = gpurun-tests.c
+TESTSRC_AUX =
+TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
+
+#-ccc-print-phases
+#"-\#\#\#"
+
+RUNCMD = ./chkit.sh ${TESTNAME}
+
+include ../Makefile.rules
diff --git a/test/smoke-dev/gpurun-tests/chkit.sh b/test/smoke-dev/gpurun-tests/chkit.sh
new file mode 100755
index 0000000000..39647ebacf
--- /dev/null
+++ b/test/smoke-dev/gpurun-tests/chkit.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+export EX=./$1
+export PATH=$AOMP/bin:$PATH
+which gpurun
+set -x
+gpurun -help
+gpurun -topo
+gpurun -rocmsmi $EX
+gpurun -nm $EX
+gpurun -nr $EX
+gpurun -l $EX
+gpurun -md 1 $EX
+gpurun -m $EX
+gpurun -dryrun $EX
+gpurun -nomask $EX
+gpurun -nomask $EX
+
+gpurun -v $EX
+gpurun -vv $EX
+gpurun -vvv $EX
diff --git a/test/smoke-dev/gpurun-tests/gpurun-tests.c b/test/smoke-dev/gpurun-tests/gpurun-tests.c
new file mode 100644
index 0000000000..76b8a015cd
--- /dev/null
+++ b/test/smoke-dev/gpurun-tests/gpurun-tests.c
@@ -0,0 +1,5 @@
+#include "stdio.h"
+int main() {
+ fprintf(stderr, "howdy from gpurun\n");
+ return 0;
+}
diff --git a/test/smoke-dev/mpi-allreduce/Makefile b/test/smoke-dev/mpi-allreduce/Makefile
index 676e82bede..a1be9c5850 100644
--- a/test/smoke-dev/mpi-allreduce/Makefile
+++ b/test/smoke-dev/mpi-allreduce/Makefile
@@ -1,8 +1,8 @@
+include ../../Makefile.defs
TESTNAME = mpi-allreduce
TESTSRC = mpi-allreduce.cpp
AOMP ?= $(HOME)/rocm/aomp
-_gpu = $(shell $(AOMP)/bin/rocm_agent_enumerator | grep -m 1 -E gfx[^0]{1}.{2})
-CFLAGS = -O3 -fopenmp --offload-arch=$(_gpu)
+CFLAGS = -O3 -fopenmp --offload-arch=$(AOMP_GPU)
AOMP_SUPP ?= $(HOME)/local
MPI ?= $(AOMP_SUPP)/openmpi
CC_MPI = $(MPI)/bin/mpic++
@@ -13,7 +13,7 @@ $(TESTNAME): $(TESTSRC)
OMPI_CC=$(CLANG_DIR)/clang++ $(CC_MPI) $(CFLAGS) $(LFLAGS) $^ -o $@
run: $(TESTNAME)
- $(MPI)/bin/mpirun -np 2 $(CLANG_DIR)/gpurun -v ./$(TESTNAME)
+ $(MPI)/bin/mpirun -np 2 $(AOMP)/bin/gpurun -v ./$(TESTNAME)
clean:
rm -f $(TESTNAME) obin *.i *.ii *.bc *.lk a.out-* *.ll *.s *.o *.cubin
diff --git a/test/smoke-dev/mpi-reduce/Makefile b/test/smoke-dev/mpi-reduce/Makefile
index b5b6fa7431..45fd9dec3a 100644
--- a/test/smoke-dev/mpi-reduce/Makefile
+++ b/test/smoke-dev/mpi-reduce/Makefile
@@ -1,8 +1,9 @@
+include ../../Makefile.defs
+
TESTNAME = mpi-reduce
TESTSRC = mpi-reduce.cpp
AOMP ?= $(HOME)/rocm/aomp
-_gpu = $(shell $(AOMP)/bin/rocm_agent_enumerator | grep -m 1 -E gfx[^0]{1}.{2})
-CFLAGS = -O3 -fopenmp --offload-arch=$(_gpu)
+CFLAGS = -O3 -fopenmp --offload-arch=$(AOMP_GPU)
AOMP_SUPP ?= $(HOME)/local
MPI ?= $(AOMP_SUPP)/openmpi
CC_MPI = $(MPI)/bin/mpic++
@@ -13,7 +14,7 @@ $(TESTNAME): $(TESTSRC)
OMPI_CC=$(CLANG_DIR)/clang++ $(CC_MPI) $(CFLAGS) $(LFLAGS) $^ -o $@
run: $(TESTNAME)
- $(MPI)/bin/mpirun -np 2 $(CLANG_DIR)/gpurun -v ./$(TESTNAME)
+ $(MPI)/bin/mpirun -np 2 $(AOMP)/bin/gpurun -v ./$(TESTNAME)
clean:
rm -f $(TESTNAME) obin *.i *.ii *.bc *.lk a.out-* *.ll *.s *.o *.cubin
diff --git a/test/smoke-dev/testmarch/test.cpp b/test/smoke-dev/testmarch/test.cpp
index 399bdfb9db..86663dbe40 100644
--- a/test/smoke-dev/testmarch/test.cpp
+++ b/test/smoke-dev/testmarch/test.cpp
@@ -1,7 +1,3 @@
-// Copyright © Advanced Micro Devices, Inc., or its affiliates.
-//
-// SPDX-License-Identifier: MIT
-
#include
#include
#include
diff --git a/test/smoke-fails/atomic-contended/performBuildRun.sh b/test/smoke-fails/atomic-contended/performBuildRun.sh
index 59624fdd12..34c8c9ca2e 100755
--- a/test/smoke-fails/atomic-contended/performBuildRun.sh
+++ b/test/smoke-fails/atomic-contended/performBuildRun.sh
@@ -92,11 +92,11 @@ if [[ -z ${LLVMIR} && -z ${ASSEMBLY} ]]; then
# Generate AMDGPU assembly files, format output and then filecheck for the
# expected instructions within the embedded object.
echo " > FileChecks"
- ${GEN_ASM_DPP} -o - | ${EXTRACT_EMBEDDED} | ${AOMP}/bin/FileCheck $TESTSRC \
+ ${GEN_ASM_DPP} -o - | ${EXTRACT_EMBEDDED} | $FILECHECK $TESTSRC \
--check-prefix=DPP || exit 1
- ${GEN_ASM_ITER} -o - | ${EXTRACT_EMBEDDED} | ${AOMP}/bin/FileCheck $TESTSRC \
+ ${GEN_ASM_ITER} -o - | ${EXTRACT_EMBEDDED} | $FILECHECK $TESTSRC \
--check-prefix=ITERATIVE || exit 1
- ${GEN_ASM_NONE} -o - | ${EXTRACT_EMBEDDED} | ${AOMP}/bin/FileCheck $TESTSRC \
+ ${GEN_ASM_NONE} -o - | ${EXTRACT_EMBEDDED} | $FILECHECK $TESTSRC \
--check-prefix=NONE || exit 1
# Compile and execute. Performing a simple check for an expected result.
diff --git a/test/smoke-fails/clang-298140/NPB_LU/MG/.buildit.swp b/test/smoke-fails/clang-298140/NPB_LU/MG/.buildit.swp
deleted file mode 100644
index 2f1fa8fe37..0000000000
Binary files a/test/smoke-fails/clang-298140/NPB_LU/MG/.buildit.swp and /dev/null differ
diff --git a/test/smoke-fort-dev/byref-reduction-scalar-allocatable/Makefile b/test/smoke-fort-dev/byref-reduction-scalar-allocatable/Makefile
new file mode 100644
index 0000000000..2e4faaeee8
--- /dev/null
+++ b/test/smoke-fort-dev/byref-reduction-scalar-allocatable/Makefile
@@ -0,0 +1,16 @@
+NOOPT = 1
+include ../../Makefile.defs
+
+TESTNAME = byref_reduction_scalar_allocatable
+TESTSRC_MAIN = byref_reduction_scalar_allocatable.f90
+TESTSRC_AUX =
+TESTSRC_ALL = $(TESTSRC_MAIN)
+
+FLANG ?= flang
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
+OMP_BIN = $(AOMP)/bin/$(FLANG)
+CC = $(OMP_BIN) $(VERBOSE)
+#-ccc-print-phases
+#"-\#\#\#"
+
+include ../Makefile.rules
diff --git a/test/smoke-fort-dev/byref-reduction-scalar-allocatable/byref_reduction_scalar_allocatable.f90 b/test/smoke-fort-dev/byref-reduction-scalar-allocatable/byref_reduction_scalar_allocatable.f90
new file mode 100644
index 0000000000..9178f3a435
--- /dev/null
+++ b/test/smoke-fort-dev/byref-reduction-scalar-allocatable/byref_reduction_scalar_allocatable.f90
@@ -0,0 +1,33 @@
+program main
+ implicit none
+
+ real, allocatable :: scalar_alloc
+ integer :: i
+ real, parameter :: num_iters = 1000000
+
+ allocate(scalar_alloc)
+ scalar_alloc = 0
+
+ !$omp target map(tofrom: scalar_alloc)
+ call foo(scalar_alloc)
+ !$omp end target
+
+ print *, "result: ", scalar_alloc
+
+ if (scalar_alloc /= num_iters) then
+ print *, "Incorrect result! (actual): ", scalar_alloc, " vs. (expected): ", num_iters
+ stop 1
+ end if
+
+contains
+ subroutine foo(scalar_alloc)
+ implicit none
+ integer :: i
+ real, allocatable, intent(inout) :: scalar_alloc
+
+ !$omp parallel do reduction(+: scalar_alloc)
+ do i = 1, num_iters
+ scalar_alloc = scalar_alloc + 1
+ end do
+ end subroutine
+end program
diff --git a/test/smoke-fort-dev/byref-reduction-static-array/Makefile b/test/smoke-fort-dev/byref-reduction-static-array/Makefile
new file mode 100644
index 0000000000..a00b82d9a0
--- /dev/null
+++ b/test/smoke-fort-dev/byref-reduction-static-array/Makefile
@@ -0,0 +1,16 @@
+NOOPT = 1
+include ../../Makefile.defs
+
+TESTNAME = byref_reduction_static_array
+TESTSRC_MAIN = byref_reduction_static_array.f90
+TESTSRC_AUX =
+TESTSRC_ALL = $(TESTSRC_MAIN)
+
+FLANG ?= flang
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
+OMP_BIN = $(AOMP)/bin/$(FLANG)
+CC = $(OMP_BIN) $(VERBOSE)
+#-ccc-print-phases
+#"-\#\#\#"
+
+include ../Makefile.rules
diff --git a/test/smoke-fort-dev/byref-reduction-static-array/byref_reduction_static_array.f90 b/test/smoke-fort-dev/byref-reduction-static-array/byref_reduction_static_array.f90
new file mode 100644
index 0000000000..4502c2ce40
--- /dev/null
+++ b/test/smoke-fort-dev/byref-reduction-static-array/byref_reduction_static_array.f90
@@ -0,0 +1,37 @@
+program main
+ implicit none
+
+ real, parameter :: num_iters = 1000000
+ integer, parameter :: arr_size = 10
+ real :: arr(arr_size)
+ real :: expected_arr(arr_size)
+ integer :: i
+
+ do i = 1, arr_size
+ arr(i) = i
+ expected_arr(i) = i + num_iters
+ end do
+
+ !$omp target map(tofrom: arr)
+ call foo(arr)
+ !$omp end target
+
+ print *, "result: ", arr
+
+ if (any(arr /= expected_arr)) then
+ print *, "Incorrect result! (actual): ", arr, " vs. (expected): ", expected_arr
+ stop 1
+ end if
+
+contains
+ subroutine foo(arr)
+ implicit none
+ integer :: i
+ real, intent(inout) :: arr(arr_size)
+
+ !$omp parallel do reduction(+: arr)
+ do i = 1, num_iters
+ arr = arr + 1
+ end do
+ end subroutine
+end program
diff --git a/test/smoke-fort-dev/chk-intdo-permutation/intdo-permutation.f90 b/test/smoke-fort-dev/chk-intdo-permutation/intdo-permutation.f90
index 29a2e91fd3..1326a1e931 100644
--- a/test/smoke-fort-dev/chk-intdo-permutation/intdo-permutation.f90
+++ b/test/smoke-fort-dev/chk-intdo-permutation/intdo-permutation.f90
@@ -4,7 +4,7 @@
!SPDX-License-Identifier: MIT
!
! RUN: %flang %flags %openmp_flags -fopenmp-version=60 %s -o %t.exe
-! RUN: %t.exe | FileCheck %s --match-full-lines
+! RUN: %t.exe | $FILECHECK %s --match-full-lines
program interchange_intdo
integer :: i, j
diff --git a/test/smoke-fort-dev/chk-intdo/intdo.f90 b/test/smoke-fort-dev/chk-intdo/intdo.f90
index 76703e9b46..e3f504a5c2 100644
--- a/test/smoke-fort-dev/chk-intdo/intdo.f90
+++ b/test/smoke-fort-dev/chk-intdo/intdo.f90
@@ -4,7 +4,7 @@
!SPDX-License-Identifier: MIT
!
! RUN: %flang %flags %openmp_flags -fopenmp-version=60 %s -o %t.exe
-! RUN: %t.exe | FileCheck %s --match-full-lines
+! RUN: %t.exe | $FILECHECK %s --match-full-lines
program interchange_intdo
integer :: i, j
diff --git a/test/smoke-fort-dev/device_aassign/Makefile b/test/smoke-fort-dev/device_aassign/Makefile
index 24c45470bd..737a4c7880 100644
--- a/test/smoke-fort-dev/device_aassign/Makefile
+++ b/test/smoke-fort-dev/device_aassign/Makefile
@@ -6,7 +6,7 @@ TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
FLANG ?= flang
-CFLAGS = -lflang_rt.hostdevice
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
#-ccc-print-phases
diff --git a/test/smoke-fort-dev/device_intrinsics/Makefile b/test/smoke-fort-dev/device_intrinsics/Makefile
index 69b8f2a0af..6bfa04f9da 100644
--- a/test/smoke-fort-dev/device_intrinsics/Makefile
+++ b/test/smoke-fort-dev/device_intrinsics/Makefile
@@ -11,7 +11,7 @@ TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
FLANG ?= flang
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
-CFLAGS = -lflang_rt.hostdevice
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
#-ccc-print-phases
#"-\#\#\#"
diff --git a/test/smoke-fort-dev/flang-464660-2/Makefile b/test/smoke-fort-dev/flang-464660-2/Makefile
index 7638190378..04b080e2ab 100644
--- a/test/smoke-fort-dev/flang-464660-2/Makefile
+++ b/test/smoke-fort-dev/flang-464660-2/Makefile
@@ -9,7 +9,7 @@ TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
FLANG ?= flang
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
-OMP_FLAGS += -lflang_rt.hostdevice
+OMP_FLAGS += $(FLANG_GPU_LINK_FLAGS)
#-ccc-print-phases
#"-\#\#\#"
diff --git a/test/smoke-fort-dev/flang-529628/Makefile b/test/smoke-fort-dev/flang-529628/Makefile
index cb15b12586..057d3d8d38 100644
--- a/test/smoke-fort-dev/flang-529628/Makefile
+++ b/test/smoke-fort-dev/flang-529628/Makefile
@@ -8,7 +8,7 @@ TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
FLANG ?= flang
-CFLAGS = -lflang_rt.hostdevice
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
#-ccc-print-phases
diff --git a/test/smoke-fort-dev/rocm-issue-201/Makefile b/test/smoke-fort-dev/rocm-issue-201/Makefile
index 614425a1bc..d9aa145946 100644
--- a/test/smoke-fort-dev/rocm-issue-201/Makefile
+++ b/test/smoke-fort-dev/rocm-issue-201/Makefile
@@ -9,7 +9,7 @@ TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
FLANG ?= flang
-CFLAGS = -lflang_rt.hostdevice
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
#-ccc-print-phases
diff --git a/test/smoke-fort-dev/swdev-566120/Makefile b/test/smoke-fort-dev/swdev-566120/Makefile
new file mode 100644
index 0000000000..afbdfc75ac
--- /dev/null
+++ b/test/smoke-fort-dev/swdev-566120/Makefile
@@ -0,0 +1,20 @@
+#NOOPT = 1
+#NOOMP = 1
+#OMP_FLAGS = -DNO_OMP
+include ../../Makefile.defs
+
+TESTNAME = gpu_kernel_latency
+TESTSRC_MAIN = gpu_kernel_latency.F90
+TESTSRC_AUX = gpu_kernel_latency_mod.F90
+TESTSRC_ALL = $(TESTSRC_AUX) $(TESTSRC_MAIN)
+
+FLANG = flang
+CFLAGS = $(FLANG_GPU_LINK_FLAGS) -O2 -g -fopenmp
+OMP_BIN = $(AOMP)/bin/$(FLANG)
+CC = $(OMP_BIN) $(VERBOSE)
+#-ccc-print-phases
+#"-\#\#\#"
+
+RUNCMD = ./doit.sh ${TESTNAME}
+
+include ../Makefile.rules
diff --git a/test/smoke-fort-dev/swdev-566120/doit.sh b/test/smoke-fort-dev/swdev-566120/doit.sh
new file mode 100755
index 0000000000..567c273950
--- /dev/null
+++ b/test/smoke-fort-dev/swdev-566120/doit.sh
@@ -0,0 +1,3 @@
+set -x
+./gpu_kernel_latency
+
diff --git a/test/smoke-fort-dev/swdev-566120/gpu_kernel_latency.F90 b/test/smoke-fort-dev/swdev-566120/gpu_kernel_latency.F90
new file mode 100644
index 0000000000..8fac07f038
--- /dev/null
+++ b/test/smoke-fort-dev/swdev-566120/gpu_kernel_latency.F90
@@ -0,0 +1,130 @@
+program gpu_kernel_latency
+ use gpu_kernel_latency_mod
+#ifdef _OPENMP
+ use omp_lib
+#endif
+ implicit none
+ integer, parameter :: nproma=10000, nlev=40, nb=100, niter=1000
+ ! integer, parameter :: nproma=5, nlev=4, nb=1, niter=1
+ integer :: i, j, k, map_id, ind_s, ind_e, it, nteams
+
+ real(kind=real64), allocatable :: arr(:,:,:), arr_out_ref(:,:,:)
+ real(kind=real64), allocatable :: arr_out(:,:,:)
+ real(kind=real64) :: t_tot, t_avg_launch
+ real(kind=real64) :: t_start, t_end
+#ifndef USE_NOWAIT
+ character(len=*), parameter :: nowait_str = ''
+#else
+ character(len=*), parameter :: nowait_str = 'nowait '
+#endif
+
+ allocate(arr(nproma, nlev, nb), &
+ arr_out_ref(nproma, nlev, nb))
+ arr_out_ref=0
+
+ allocate(arr_out(nproma, nlev, nb))
+ arr_out=0
+
+ ! Initialize data
+ do k=1,nb
+ do j=1,nlev
+ do i=1,nproma
+ arr(i,j,k)=((-1)**(mod(i,2)+1))*real(nproma*nb*(k-1)+nproma*(j-1)+i, real64) ! Use linear index as data
+ arr_out(i,j,k)=0
+ arr_out_ref(i,j,k)=0
+ end do
+ end do
+ end do
+
+ ind_s=1
+ ind_e=nproma
+
+ ! Compute reference result
+ call gpu_kernel_latency_ref(nproma, nlev, nb, ind_s, ind_e, arr, arr_out_ref)
+
+!$omp target data map(to: arr) map(tofrom: arr_out)
+
+ ! Warmup
+#ifndef USE_NOWAIT
+ call gpu_kernel_latency_basic(nproma, nlev, nb, ind_s, ind_e, arr, arr_out, .true.)
+#else
+ call gpu_kernel_latency_nowait(nproma, nlev, nb, ind_s, ind_e, arr, arr_out, .true.)
+#endif
+ ! Benchmark
+ t_start=ftimer()
+ do it=1,niter
+#ifndef USE_NOWAIT
+ call gpu_kernel_latency_basic(nproma, nlev, nb, ind_s, ind_e, arr, arr_out, .true.)
+#else
+ call gpu_kernel_latency_nowait(nproma, nlev, nb, ind_s, ind_e, arr, arr_out, .true.)
+#endif
+ end do
+ t_end=ftimer()
+ t_tot=t_end-t_start
+ t_avg_launch=t_tot/(niter*nb)
+
+!$omp end target data
+
+#if 0
+ do k=1,nb
+ write (*,*) 'k=', k
+ write (*,*) 'arr_out:'
+ call print_2d_array(arr_out(:,:,k))
+ write (*,*) 'arr_out_ref:'
+ call print_2d_array(arr_out_ref(:,:,k))
+#ifdef USE_NOWAIT
+ write (*,*) 'arr_out_nowait:'
+ call print_2d_array(arr_out_nowait(:,:,k))
+#endif
+ end do
+#endif
+
+ ! Output timing
+ write (*,'(A)') 'Parameters:'
+ write (*,'(X,A,I0)') 'nproma=', nproma
+ write (*,'(X,A,I0)') 'nlev=', nlev
+ write (*,'(X,A,I0)') 'nb=', nb
+ write (*,'(X,A,I0)') 'niter=', niter
+ write (*,'(A,A,A,F18.5)') 'Time ', nowait_str, '(s)=', t_tot
+ write (*,'(A,A,A,F18.5)') 'Time ', nowait_str, 'per kernel (us)=', t_avg_launch*1e6
+
+ ! Validate results
+ if (all(abs(arr_out_ref-arr_out)/abs(arr_out_ref) < epstol)) then
+ write (*,'(A)') 'arr_out validates'
+ else
+ write (*,'(A)') 'ERROR: arr_out does not validate'
+ end if
+ deallocate(arr, arr_out_ref)
+
+ deallocate(arr_out)
+
+contains
+
+ function ftimer() result(timerval)
+ use iso_fortran_env, only : real64, int64
+ implicit none
+ real(kind=real64) :: timerval
+
+#ifndef _OPENMP
+ integer(kind=int64) :: t, rate
+ call system_clock(t,count_rate=rate)
+ timerval = real(t,real64)/real(rate,real64)
+#else
+ timerval = omp_get_wtime()
+#endif
+ end function ftimer
+
+ subroutine print_2d_array(array)
+ real(kind=real64), intent(in) :: array(:,:)
+
+ integer :: i, j
+
+ do i=1,size(array,1)
+ do j=1,size(array,2)
+ write (*,'(F18.5,X)', ADVANCE='NO') array(i,j)
+ end do
+ write (*,'(A)')
+ end do
+ end subroutine print_2d_array
+
+end program gpu_kernel_latency
diff --git a/test/smoke-fort-dev/swdev-566120/gpu_kernel_latency_mod.F90 b/test/smoke-fort-dev/swdev-566120/gpu_kernel_latency_mod.F90
new file mode 100644
index 0000000000..0c47c9e311
--- /dev/null
+++ b/test/smoke-fort-dev/swdev-566120/gpu_kernel_latency_mod.F90
@@ -0,0 +1,137 @@
+module gpu_kernel_latency_mod
+ use iso_fortran_env, only : real64
+#ifdef _OPENMP
+ use omp_lib
+#endif
+ implicit none
+
+ real(kind=real64) :: epstol = 100*tiny(real(1,real64))
+
+#ifdef USE_ROCTX
+ interface
+ ! int roctxRangePushA(const char* message);
+ integer(kind=c_int) function roctxRangePushA(message) &
+ bind(C, name='roctxRangePushA')
+ use iso_c_binding, only: c_int, c_char
+ implicit none
+ character(kind=c_char) :: message(*)
+ end function roctxRangePushA
+
+ ! int roctxRangePop();
+ integer(kind=c_int) function roctxRangePop() &
+ bind(C, name='roctxRangePop')
+ use iso_c_binding, only: c_int
+ implicit none
+ end function roctxRangePop
+ end interface
+#endif
+#ifdef USE_NVTX
+ interface
+ ! int nvtxRangePushA(const char* message);
+ integer(kind=c_int) function nvtxRangePushA(message) &
+ bind(C, name='nvtxRangePushA')
+ use iso_c_binding, only: c_int, c_char
+ implicit none
+ character(kind=c_char) :: message(*)
+ end function nvtxRangePushA
+
+ ! int nvtxRangePop();
+ integer(kind=c_int) function nvtxRangePop() &
+ bind(C, name='nvtxRangePop')
+ use iso_c_binding, only: c_int
+ implicit none
+ end function nvtxRangePop
+ end interface
+#endif
+contains
+
+#ifndef USE_NOWAIT
+ subroutine gpu_kernel_latency_basic(nproma, nlev, nb, idx_s, idx_e, arr_in, arr_out, lzacc)
+ integer, intent(in) :: nproma, nlev, nb, idx_s, idx_e
+ real(kind=real64), intent(in) :: arr_in(nproma,nlev,nb)
+ real(kind=real64), intent(out) :: arr_out(nproma,nlev,nb)
+ logical :: lzacc
+
+ integer :: jec, jb, jk, ji, rocstat, nvstat
+ character(len=*), parameter :: kernel_name = 'gpu_kernel_latency_basic'
+
+#ifdef USE_ROCTX
+ rocstat = roctxRangePushA(kernel_name)
+#endif
+#ifdef USE_NVTX
+ nvstat = nvtxRangePushA(kernel_name)
+#endif
+ do jb=1,nb
+!$omp target teams loop collapse(2) &
+!$omp if(lzacc)&
+!$omp ! nowait
+ do jk = 1,nlev
+ do ji=idx_s,idx_e
+ arr_out(ji,jk,jb)=arr_in(ji,jk,jb)
+ end do
+ end do
+ end do
+#ifdef USE_ROCTX
+ rocstat = roctxRangePop()
+#endif
+#ifdef USE_NVTX
+ nvstat = nvtxRangePop()
+#endif
+
+!$omp taskwait
+ end subroutine gpu_kernel_latency_basic
+#else
+ subroutine gpu_kernel_latency_nowait(nproma, nlev, nb, idx_s, idx_e, arr_in, arr_out, lzacc)
+ integer, intent(in) :: nproma, nlev, nb, idx_s, idx_e
+ real(kind=real64), intent(in) :: arr_in(nproma,nlev,nb)
+ real(kind=real64), intent(out) :: arr_out(nproma,nlev,nb)
+ logical :: lzacc
+
+ integer :: jec, jb, jk, ji, rocstat, nvstat
+ character(len=*), parameter :: kernel_name = 'gpu_kernel_latency_nowait'
+
+#ifdef USE_ROCTX
+ rocstat = roctxRangePushA(kernel_name)
+#endif
+#ifdef USE_NVTX
+ nvstat = nvtxRangePushA(kernel_name)
+#endif
+ do jb=1,nb
+!$omp target teams loop collapse(2) &
+!$omp if(lzacc)&
+!$omp nowait
+ do jk = 1,nlev
+ do ji=idx_s,idx_e
+ arr_out(ji,jk,jb)=arr_in(ji,jk,jb)
+ end do
+ end do
+ end do
+#ifdef USE_ROCTX
+ rocstat = roctxRangePop()
+#endif
+#ifdef USE_NVTX
+ nvstat = nvtxRangePop()
+#endif
+
+!$omp taskwait
+ end subroutine gpu_kernel_latency_nowait
+#endif // USE_NOWAIT
+
+ subroutine gpu_kernel_latency_ref(nproma, nlev, nb, idx_s, idx_e, arr_in, arr_out)
+ integer, intent(in) :: nproma, nlev, nb, idx_s, idx_e
+ real(kind=real64), intent(in) :: arr_in(nproma, nlev, nb)
+ real(kind=real64), intent(out) :: arr_out(nproma, nlev, nb)
+
+ integer :: jec, jb, jk, ji
+
+ ! From ICON
+ do jb=1,nb
+ do jk = 1, nlev
+ do ji=idx_s,idx_e
+ arr_out(ji,jk,jb)=arr_in(ji,jk,jb)
+ end do
+ end do
+ end do
+ end subroutine gpu_kernel_latency_ref
+
+end module gpu_kernel_latency_mod
diff --git a/test/smoke-fort-dev/swdev-566120/orig.Makefile b/test/smoke-fort-dev/swdev-566120/orig.Makefile
new file mode 100644
index 0000000000..6a3ccf00b6
--- /dev/null
+++ b/test/smoke-fort-dev/swdev-566120/orig.Makefile
@@ -0,0 +1,56 @@
+COMP=amd
+
+ifeq ($(COMP),amd)
+FC=amdflang
+FCFLAGS=-g -O2 -fopenmp -fPIC --offload-arch=gfx90a,gfx942 -DUSE_ROCTX # -DUSE_NOWAIT
+LDFLAGS=-L$(ROCM_RUNTIME_PATH)/lib
+LDLIBS=-lrocprofiler-sdk -lroctracer64 -lroctx64
+
+PROFILE_CMD=rocprofv3 -o gpu_kernel_latency_trace --kernel-trace \
+ --memory-copy-trace --memory-allocation-trace \
+ --scratch-memory-trace --marker-trace --output-format pftrace --
+endif
+
+ifeq ($(COMP),nvidia)
+FC=nvfortran
+FCFLAGS=-g -O2 -mp=gpu -gpu=cc80 -fPIC -DUSE_NVTX # -DUSE_NOWAIT
+LDFLAGS=-L$(CUDA_HOME)/targets/x86_64-linux/lib
+LDLIBS=-lnvtx3interop
+
+PROFILE_CMD=nsys profile -o gpu_kernel_latency_trace_results -t cuda,nvtx,openmp,openacc
+endif
+
+ifeq ($(COMP),gnu)
+FC=gfortran
+FCFLAGS=-g -O2 -fPIC
+LDFLAGS=
+LDLIBS=
+endif
+
+EXE1=gpu_kernel_latency.x
+all: $(EXE1)
+
+OBJS1=gpu_kernel_latency.o gpu_kernel_latency_mod.o
+
+gpu_kernel_latency.o: gpu_kernel_latency.F90 gpu_kernel_latency_mod.o
+gpu_kernel_latency_mod.o: gpu_kernel_latency_mod.F90
+
+$(EXE1): $(OBJS1)
+ $(FC) $(FCFLAGS) $^ $(LDFLAGS) $(LDLIBS) -o $@
+
+%.o: %.F90
+ $(FC) $(FCFLAGS) -c $< -o $@
+
+%.o: %.c
+ $(CC) $(CCFLAGS) -c $< -o $@
+
+run: $(EXE1)
+ ./$(EXE1)
+
+prof: $(EXE1)
+ $(PROFILE_CMD) ./$(EXE1)
+
+.PHONY: clean
+
+clean:
+ -/bin/rm -f $(EXE1) a.out *.o *~ *.mod *.so *.pftrace *.nsys-rep
diff --git a/test/smoke-fort-dev/swdev-566304/Makefile b/test/smoke-fort-dev/swdev-566304/Makefile
new file mode 100644
index 0000000000..54147a6769
--- /dev/null
+++ b/test/smoke-fort-dev/swdev-566304/Makefile
@@ -0,0 +1,20 @@
+#NOOPT = 1
+#NOOMP = 1
+#OMP_FLAGS = -DNO_OMP
+include ../../Makefile.defs
+
+TESTNAME = rush_larsen_gpu_omp_fort
+TESTSRC_MAIN = rush_larsen_gpu_omp_fort.F90
+TESTSRC_AUX =
+TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
+
+FLANG = flang
+CFLAGS = $(FLANG_GPU_LINK_FLAGS) -O3 -g -fopenmp
+OMP_BIN = $(AOMP)/bin/$(FLANG)
+CC = $(OMP_BIN) $(VERBOSE)
+#-ccc-print-phases
+#"-\#\#\#"
+
+RUNCMD = ./doit.sh ${TESTNAME}
+
+include ../Makefile.rules
diff --git a/test/smoke-fort-dev/swdev-566304/doit.sh b/test/smoke-fort-dev/swdev-566304/doit.sh
new file mode 100755
index 0000000000..d5d4764f5a
--- /dev/null
+++ b/test/smoke-fort-dev/swdev-566304/doit.sh
@@ -0,0 +1,6 @@
+set -x
+HSA_XNACK=0 numactl -N0 ./rush_larsen_gpu_omp_fort 1000 20 2>&1 | tee out0
+HSA_XNACK=1 numactl -N0 ./rush_larsen_gpu_omp_fort 1000 20 2>&1 | tee out1
+grep STATS out0
+grep STATS out1
+
diff --git a/test/smoke-fort-dev/swdev-566304/rush_larsen_gpu_omp_fort.F90 b/test/smoke-fort-dev/swdev-566304/rush_larsen_gpu_omp_fort.F90
new file mode 100644
index 0000000000..29cf9e9b75
--- /dev/null
+++ b/test/smoke-fort-dev/swdev-566304/rush_larsen_gpu_omp_fort.F90
@@ -0,0 +1,795 @@
+! Copyright (c) 2019-21, Lawrence Livermore National Security, LLC. and other
+! Goulash project contributors LLNL-CODE-795383, All rights reserved.
+! For details about use and distribution, please read LICENSE and NOTICE from
+! the Goulash project repository: http://github.com/llnl/goulash
+! SPDX-License-Identifier: BSD-3-Clause
+!
+! Designed to allow direct performance comparisons between
+! naively written HIP/CUDA and OpenMP GPU offloading schemes
+! in a variety of coding styles and languages of a
+! parameterized embarrassingly parallel Rush Larsen kernel.
+! Also allows testing build systems (including SPACK) handling
+! of complicated build situations that LLNL cares about.
+!
+! Designed to create several single file test variants
+! where no -D options required to select the variant
+! and no include files are needed.
+! As of goulash 2.1, the finalize_source script
+! is used to generate customized source files
+! for each test, from a common source.
+!
+! The key computational kernel can be located by
+! searching for: KERNEL
+!
+! Designed to create trivial variants of the same
+! test to be compiled with different compilers for
+! the interoperability tests. This is why most
+! functions are static and the main kernel test
+! is called rush_larsen_gpu_omp_fort (preprocessor
+! defines this and VARIANT_DESC based on
+! variant configuration).
+!
+! The naming convention of the variant copies is
+! intended to indicate variant abilities:
+! _cpu_serial - single threaded, no OpenMP, on CPU
+! _cpu_omp - use OpenMP to spawn threads on CPU
+! _gpu_omp - uses OpenMP to offload to GPU
+! _gpu_hip - uses HIP to offload to AMD or Nvidia GPU
+! _gpu_lambda_hip - RAJA-like lambda HIP variant
+! _gpu_cuda - uses CUDA to offload to Nvidia GPU
+! _gpu_lambda_cuda - RAJA-like lambda CUDA variant
+! *_mpi - uses and exercises MPI e.g. _gpu_omp_mpi
+! *_fort - Fortran version e.g. _gpu_omp_mpi_fort
+!
+! For the interop tests, there is an additional suffix
+! to indicate different copies of the same configuration
+! that are intended to be compiled by different compilers:
+! _compiler1 - E.g., rush_larsen_gpu_omp_compiler1.cc
+!
+! VARIANT_DESC set by preprocessor directives to
+! the configuration of this file.
+!
+! Recommended that a -DCOMPILERID be set to the compiler used to compile each file:
+!
+! /opt/rocm-4.0.1/llvm/bin/clang++ -o rush_larsen_cpu_omp -O3 -g "-DCOMPILERID=rocm-4.0.1" -fopenmp rush_larsen_cpu_omp.cc
+!
+! Run with no arguments for suggested arguments, for example:
+! Usage: ./rush_larsen_cpu_omp Iterations Kernel_GBs_used
+!
+! Measure serial launch overhead: env OMP_NUM_THREADS=1 ./rush_larsen_cpu_omp 100000 .00000001
+! Measure launch overhead: ./rush_larsen_cpu_omp 100000 .00000001
+! Measure kernel performance: ./rush_larsen_cpu_omp 100 10
+!
+! The Goulash project conceived of and designed by David Richards,
+! Tom Scogland, and John Gyllenhaal at LLNL Oct 2019.
+! Please contact John Gyllenhaal (gyllenhaal1@llnl.gov) with questions.
+!
+! Rush Larsen core CUDA/OpenMP kernels written by Rob Blake (LLNL) Sept 2016.
+! The goulash Rush Larsen tests add benchmarking infrastructure
+! around this incredibly useful compact GPU test kernel. Thank you Rob!
+!
+! Inline performance measurements added (nvprof not needed)
+! by John Gyllenhaal at LLNL 11/10/20.
+!
+! Command line argument handling, performance difference printing in
+! form easily found with grep, OpenMP thread mapping and initial data
+! sanity checks on just the first array element calculated by kernel
+! by John Gyllenhaal at LLNL 03/22/21
+!
+! Pulled code from print_openmp_mapping.c by John Gyllenhaal at
+! LLNL written June 2020 which was based on mpibind tests
+! (https://github.com/LLNL/mpibind) by Edgar Leon at LLNL
+!
+! RAJA-perf-suite-like (https://github.com/LLNL/RAJAPerf)
+! C++ lambda versions created by Jason Burmark at LLNL 06/16/21
+!
+! C-like Fortran ports (by hand) of C++ version of
+! rush larsen variants by John Gyllenhaal at LLNL 06/28/21.
+!
+! MPI stat aggregation and MPI exercisers written
+! by John Gyllenhaal at LLNL based on previous user issue reproducers.
+! Pulled into rush larsen tests on 07/02/21 by John Gyllenhaal at LLNL.
+!
+! Enhanced data checks of all kernel generated array data, including
+! across MPI ranks by John Gyllenhaal at LLNL 07/03/21
+!
+! Interop versions create by John Gyllenhaal at LLNL 07/14/21
+! to test mixing all the Rush Larsen tests with multiple GPU compilers
+! all in one final executable.
+!
+! Initial test generator from template files, including Makefiles
+! created by John Gyllenhaal at LLNL 07/21/21 for V2.0RC1
+!
+! V2.0 RC1 07/21/21 Added MPI support, interop version, enhanced data checks.
+! V1.2 06/28/21 Fortran and C++ lambda versions added, consistent use of long type
+! V1.1 03/22/21 command line args, perf diffs, maps, checks return codes and answer
+! V1.0 11/10/20 initial release, hard coded inputs, no error checking
+
+! Allow version to be printed in output
+#define VERSION_STRING "Version 2.0 RC1 (7/21/21)"
+
+! Sets up and runs the doRushLarsen kernel 'iterations' times,
+! allocating CPU arrays and perhaps GPU arrays to consume
+! kernel_mem_used GBs of memory.
+!
+! This polynomial is a fit to the dynamics of a small part of a cardiac
+! myocyte, specifically the fast sodium m-gate described here:
+! https://www.ncbi.nlm.nih.gov/pubmed/16565318
+!
+! Does exactly the same work on every cell. Can scale from one cell
+! to filling entire memory. Does use cell's value as input
+! to calculations.
+!
+! Returns number of data check failures, returns 0 if all data checks out.
+function rush_larsen_gpu_omp_fort(iterations_, kernel_mem_used_)
+
+ ! Only include OpenMP for variants that need it
+ use omp_lib
+
+ ! Get mappings to stdout, etc. so can flush output
+ use, intrinsic :: iso_fortran_env, only : stdin=>input_unit, &
+ & stdout=>output_unit, &
+ & stderr=>error_unit
+
+ ! Catch misspelled variables
+ implicit none
+
+ ! Declare arguments
+ integer :: rush_larsen_gpu_omp_fort
+ integer(8), intent(IN) :: iterations_
+ integer(8) :: iterations
+ real(8), intent(IN) :: kernel_mem_used_
+ real(8) :: kernel_mem_used
+
+ ! Declare local variables
+ ! NOTE: All subroutines and functions called by this routine
+ ! can access these variables!
+ ! Used for variant_desc, kernel_mem_used_str, timestamp, sec_str, us_str, ierr
+ character(1024) :: variant_desc
+ character(50) :: timestamp
+ character(50) :: kernel_mem_used_str
+ character(50) :: sec_str, us_str, transfer_str
+ real(8) :: kernel_starttime, kernel_endtime, kernel_runtime, base_time, last_timestamp, cur_secs
+ real(8) :: transfer_starttime, transfer_endtime, transfer_runtime
+ integer(8) :: nCells, status_point
+ integer :: rank = 0 ! Rank will be 0 for the no MPI case
+ integer :: ierr
+ integer(8) :: fail_count = 0
+ real(8) :: sum1, sum2, x, mhu, tauR
+ integer(8) :: itime, ii
+ integer(4) :: j, k
+ real(8), allocatable :: m_gate(:), Vm(:)
+ integer(4), parameter :: Mhu_l = 10
+ integer(4), parameter :: Mhu_m = 5
+ integer(4), parameter :: Tau_m = 18
+ ! Must use 'd' in every constant in order to get full real*8 values and matching results
+ real(8) :: Mhu_a(0:14) = (/&
+ & 9.9632117206253790d-01, 4.0825738726469545d-02, 6.3401613233199589d-04,&
+ & 4.4158436861700431d-06, 1.1622058324043520d-08, 1.0000000000000000d+00,&
+ & 4.0568375699663400d-02, 6.4216825832642788d-04, 4.2661664422410096d-06,&
+ & 1.3559930396321903d-08, -1.3573468728873069d-11, -4.2594802366702580d-13,&
+ & 7.6779952208246166d-15, 1.4260675804433780d-16, -2.6656212072499249d-18/)
+ ! Must use 'd' in every constant in order to get full real*8 values and matching results
+ real(8) :: Tau_a(0:18) = (/&
+ & 1.7765862602413648d+01*0.02d+00, 5.0010202770602419d-02*0.02d+00, -7.8002064070783474d-04*0.02d+00,&
+ & -6.9399661775931530d-05*0.02d+00, 1.6936588308244311d-06*0.02d+00, 5.4629017090963798d-07*0.02d+00,&
+ & -1.3805420990037933d-08*0.02d+00, -8.0678945216155694d-10*0.02d+00, 1.6209833004622630d-11*0.02d+00,&
+ & 6.5130101230170358d-13*0.02d+00, -6.9931705949674988d-15*0.02d+00, -3.1161210504114690d-16*0.02d+00,&
+ & 5.0166191902609083d-19*0.02d+00, 7.8608831661430381d-20*0.02d+00, 4.3936315597226053d-22*0.02d+00,&
+ & -7.0535966258003289d-24*0.02d+00, -9.0473475495087118d-26*0.02d+00, -2.9878427692323621d-28*0.02d+00,&
+ & 1.0000000000000000d+00/)
+
+ ! Allow compiler to be passed in at compile time
+ ! Must pass in quoted string on command line, i.e., '-DCOMPILERID="CCE"'
+#if defined(COMPILERID)
+ write (variant_desc, 20) "gpu_omp_fort", ' [', COMPILERID , ']'
+20 format(a, a,a,a)
+#else
+ variant_desc="gpu_omp_fort"
+#endif
+
+ ! To make interop performance easier to compare,
+ ! start this file's timers over every time called.
+ !
+ ! Reset this file's secs_elapsed() counter to 0
+ cur_secs = get_raw_secs()
+ base_time = get_base_time(cur_secs)
+
+ ! Synchronize printf timestamps across MPI ranks
+ last_timestamp = get_last_timestamp(secs_elapsed())
+
+ if (rank == 0) then
+ ! Print separator before and after output with function name
+ call get_timestamp_string(timestamp)
+ print '(a,"--------------- Begin rush_larsen_",a," (timer zeroed) ---------------")', &
+ & trim(timestamp), trim(variant_desc)
+ flush(stdout)
+ end if
+
+ ! For print niceness, make .00000001 lower bound on GB memory
+ if (kernel_mem_used_ < .00000001) then
+ kernel_mem_used = .00000001
+ else
+ kernel_mem_used = kernel_mem_used_
+ end if
+
+ ! Calculate nCells from target memory target
+ nCells = ((kernel_mem_used * 1024.0 * 1024.0 * 1024.0) / (8 * 2))
+
+ ! Must have at least 1 cell
+ if (nCells < 1) then
+ nCells = 1
+ end if
+
+ ! Must have at least 1 iteration
+ if (iterations_ < 1) then
+ iterations=1
+ else
+ iterations=iterations_
+ end if
+
+ ! Give status every 10% of iterations
+ status_point=iterations/10
+ ! Must be at least 1 to make mod work
+ if (status_point < 1) then
+ status_point = 1
+ end if
+
+ ! Print what we are running
+ ! Convert kernel_mem_used to left justified string with leading 0
+ ! This str is used in other subroutines and functions
+ write (kernel_mem_used_str, 50) kernel_mem_used
+50 format(F16.8)
+ kernel_mem_used_str=adjustl(kernel_mem_used_str)
+ ! This kernel_mem_used_str used in several other messages as is
+
+ if (rank == 0) then
+ call get_timestamp_string(timestamp)
+ print '(a," START Rush Larsen ",i0," iters ",i0," cells ",a," GBs ",a)',&
+ & trim(timestamp),iterations, nCells, trim(kernel_mem_used_str), trim(variant_desc)
+
+ call get_timestamp_string(timestamp)
+ print '(a," ",a)', trim(timestamp), trim(VERSION_STRING)
+ flush(stdout)
+ end if
+
+ ! If using OpenMP offloading, make sure GPU works before doing test
+ call verify_gpu_openmp(0)
+
+ if (rank == 0) then
+ call get_timestamp_string(timestamp)
+ print '(a," ",a)', trim(timestamp), "Allocating and initializing kernel arrays"
+ flush(stdout)
+ end if
+
+ ! Porting from C, so make all arrays start at index 0 to make port easier
+ allocate(m_gate(0:nCells-1))
+ m_gate=0.0
+
+ ! Porting from C, so make all arrays start at index 0 to make port easier
+ allocate(Vm(0:nCells-1))
+ Vm=0.0
+
+ ! No data transfer time if not using GPU
+ transfer_starttime=0.0
+ transfer_endtime=0.0
+
+ if (rank == 0) then
+ call get_timestamp_string(timestamp)
+ print '(a," Starting omp data map of CPU arrays to GPU")', trim(timestamp)
+ flush(stdout)
+ end if
+
+ transfer_starttime=secs_elapsed()
+ !$omp target enter data map(to: m_gate(0:nCells-1))
+ !$omp target enter data map(to: Vm(0:nCells-1))
+ !$omp target enter data map(to: Mhu_a(0:14))
+ !$omp target enter data map(to: Tau_a(0:18))
+ transfer_endtime=secs_elapsed()
+
+ if (rank == 0) then
+ call get_timestamp_string(timestamp)
+ print '(a," Finished omp data map of CPU arrays to GPU")', trim(timestamp)
+ flush(stdout)
+ end if
+
+ transfer_runtime=transfer_endtime-transfer_starttime
+
+ ! Do the iterations asked for plus 1 for warmup
+ do itime=0,iterations
+ ! Print warmup message for 0th iteration
+ if (itime == 0) then
+ if (rank == 0) then
+ call get_timestamp_string(timestamp)
+ print '(a,a)', trim(timestamp), " Launching warmup iteration (not included in timings)"
+ flush(stdout)
+ end if
+ ! Print status every 10% of iterations
+ else if (modulo((itime-1), status_point) == 0) then
+ if (itime == 1) then
+ if (rank == 0) then
+ call get_timestamp_string(timestamp)
+ print '(a," Starting kernel timings for Rush Larsen ",i0," ",a)',&
+ & trim(timestamp),iterations, trim(kernel_mem_used_str)
+ flush(stdout)
+ end if
+ end if
+
+ if (rank == 0) then
+ call get_timestamp_string(timestamp)
+ print '(a,a,i6)', trim(timestamp), " Starting iteration ", itime
+ flush(stdout)
+ end if
+ end if
+
+ ! Start timer after warm-up iteration 0
+ if (itime == 1) then
+ kernel_starttime = secs_elapsed()
+ end if
+
+ !
+ ! RUSH LARSEN KERNEL BEING TIMED START
+ !
+ ! Target GPU with OpenMP, data already mapped to GPU
+ !$omp target teams distribute parallel do simd private(ii,x,sum1,j,sum2,k,mhu,tauR)
+ do ii=0,nCells-1
+ x = Vm(ii)
+ sum1 = 0.0
+ do j = Mhu_m-1, 0, -1
+ sum1 = Mhu_a(j) + x*sum1
+ end do
+ sum2 = 0.0
+ k = Mhu_m + Mhu_l - 1
+ do j = k, Mhu_m, -1
+ sum2 = Mhu_a(j) + x * sum2
+ end do
+ mhu = sum1/sum2
+
+ sum1 = 0.0
+ do j = Tau_m-1, 0, -1
+ sum1 = Tau_a(j) + x*sum1
+ end do
+ tauR = sum1
+
+ m_gate(ii) = m_gate(ii) + (mhu - m_gate(ii))*(1-exp(-tauR))
+ end do
+ ! End Target GPU with OpenMP, data already mapped to GPU
+ !$omp end target teams distribute parallel do simd
+
+ !
+ ! RUSH LARSEN KERNEL BEING TIMED END
+ !
+ end do
+
+ ! Get time after all iterations
+ kernel_endtime = secs_elapsed ()
+
+ ! Calculate kernel runtime
+ kernel_runtime = kernel_endtime-kernel_starttime
+
+ if (rank == 0) then
+ call get_timestamp_string(timestamp)
+ print '(a,a,i0,a,a)',&
+ & trim(timestamp)," Finished kernel timings for Rush Larsen ", iterations, " ", trim(kernel_mem_used_str)
+ flush(stdout)
+ end if
+
+ ! Print kernel runtime stats, syncs and aggregates MPI rank (if MPI mode)
+ call print_runtime_stats(iterations, kernel_mem_used, kernel_runtime, transfer_runtime)
+
+ if (rank == 0) then
+ call get_timestamp_string(timestamp)
+ print '(a, " Starting omp target update of GPU result array to CPU array")', trim(timestamp)
+ flush(stdout)
+ end if
+
+ ! Transfer GPU m_gate kernel memory to CPU kernel memory for data checks
+ !$omp target update from (m_gate(0:nCells-1))
+
+ if (rank == 0) then
+ call get_timestamp_string(timestamp)
+ print '(a, " Finished omp target update of GPU result array to CPU array")', trim(timestamp)
+ flush(stdout)
+ end if
+
+ ! Do sanity and consistency checks on all of m_gate. Including cross-rank if in MPI mode.
+ ! Prints PASS or FAIL based on data check results
+ ! Returns fail count so can be returned to caller.
+ fail_count = data_check (m_gate, iterations, kernel_mem_used, nCells)
+
+ ! Free kernel GPU memory
+ !$omp target exit data map(delete: m_gate(0:nCells-1))
+ !$omp target exit data map(delete: Vm(0:nCells-1))
+ !$omp target exit data map(delete: Mhu_a(0:14))
+ !$omp target exit data map(delete: Tau_a(0:18))
+
+ deallocate(Vm)
+ deallocate(m_gate)
+
+ if (rank == 0) then
+ call get_timestamp_string(timestamp)
+ print '(a," ",a,a)', trim(timestamp), "DONE Freed memory ", trim(variant_desc)
+ flush(stdout)
+ ! Print separator before and after output with function name
+ call get_timestamp_string(timestamp)
+ print '(a,"--------------- End rush_larsen_",a," ---------------")', &
+ & trim(timestamp), trim(variant_desc)
+ flush(stdout)
+ end if
+
+ ! Return number of data check failures
+ rush_larsen_gpu_omp_fort = fail_count
+
+contains
+
+ ! Ends program either with MPI_Abort or STOP 1
+ subroutine die()
+ stop 1
+ end subroutine die
+
+
+ ! Get raw time in seconds as double (a large number).
+ function get_raw_secs()
+ ! Catch misspelled variables
+ implicit none
+ real(8) :: get_raw_secs
+ integer(8) :: count, count_rate, count_max
+ real(8) :: dcount, dcount_rate
+
+ ! Get wall-clock time
+ call system_clock(count, count_rate, count_max)
+ dcount = count
+ dcount_rate = count_rate
+ ! Convert values to double (in seconds ) (a large number)
+ get_raw_secs = dcount/dcount_rate
+ end function get_raw_secs
+
+
+ ! Returns base time. If new_time > 0,
+ ! sets base_time to new_time before returning.
+ ! Using this as access method to static variable
+ ! in a way I can trivially emulate in fortran.
+ !
+ ! Note: Lock shouldn't be needed, since even if multiple
+ ! threads initialize this, it will be to basically
+ ! the same value.
+ !
+ function get_base_time(new_time)
+ ! Catch misspelled variables
+ implicit none
+ real(8), intent(IN):: new_time
+ real(8):: get_base_time
+ real(8), save :: base_time = -1.0
+
+ !If passed value > 0
+ if (new_time > 0.0) then
+ base_time = new_time
+ end if
+
+ get_base_time = base_time
+ end function get_base_time
+
+
+ ! Returns time in seconds (double) since the first call to secs_elapsed
+ ! (i.e., the first call returns 0.0).
+ function secs_elapsed ()
+ ! Catch misspelled variables
+ implicit none
+ real(8) :: secs_elapsed
+ real(8) :: new_time, base_time
+
+ ! Get current raw time (a big number)
+ new_time = get_raw_secs()
+
+ base_time = get_base_time(-1.0_8)
+
+ ! If base time not set (negative), set to current time (pass in positive secs)
+ if (base_time < 0.0) then
+ base_time=get_base_time(new_time)
+ end if
+
+ ! Returned offset from first time called
+ secs_elapsed = new_time - base_time
+ end function secs_elapsed
+
+
+ function get_last_timestamp(new_time)
+ ! Catch misspelled variables
+ implicit none
+ real(8), intent(IN):: new_time
+ real(8):: get_last_timestamp
+ real(8), save :: last_timestamp = -1.0
+
+ !If passed value > 0
+ if (new_time >= 0.0) then
+ last_timestamp = new_time
+ end if
+
+ get_last_timestamp = last_timestamp
+ end function get_last_timestamp
+
+
+ ! Cannot wrap print in fortran so create utility function
+ ! for creating timestamp prefix with diff from last timestamp.
+ ! Generate timestamp string of this form:
+ ! 0.095 (0.000s):
+ subroutine get_timestamp_string (timestamp_string)
+ ! Only include mpi for variants that need it
+ ! Catch misspelled variables
+ implicit none
+ character(len=*), intent(OUT) :: timestamp_string
+ real(8) :: last_timestamp
+ real(8) :: sec, diff
+ integer :: rank = -1
+
+ ! Get wall-clock time since first call to secs_elapsed
+ sec = secs_elapsed ()
+
+ ! Query last timestamp, set first time if needed
+ last_timestamp = get_last_timestamp(-1.0_8)
+ if (last_timestamp < 0.0) then
+ last_timestamp=get_last_timestamp(sec)
+ end if
+
+ diff = sec - last_timestamp
+
+ ! Set new last timestamp
+ last_timestamp=get_last_timestamp(sec)
+
+ ! No MPI case
+ if (rank < 0) then
+ ! Write out timestamp and diff seconds to buffer
+ write (timestamp_string, 10) sec, ' (', diff, 's): '
+10 format(f7.3,a,f5.3,a)
+
+ ! MPI case, add rank
+ else
+ ! Write out timestamp and diff seconds to buffer
+ write (timestamp_string, 11) rank, ": ", sec, ' (', diff, 's): '
+11 format(i3,a,f7.3,a,f5.3,a)
+ end if
+ end subroutine get_timestamp_string
+
+
+ ! If using OpenMP offloading, make sure GPU works before doing test
+ subroutine verify_gpu_openmp(gpu_id)
+ use omp_lib
+ integer, intent(in) :: gpu_id
+
+ character(50) :: mpi_desc=""
+
+ ! If using GPU, make sure GPU OpenMP gpu offloading works before doing test
+ integer:: runningOnGPU
+
+ if (rank == 0) then
+ call get_timestamp_string(timestamp)
+ print '(a," Selecting GPU ",i0, " as default device",a)', trim(timestamp), gpu_id, trim(mpi_desc)
+ flush(stdout)
+ end if
+
+ ! Pick GPU to use to exercise selection call
+ call omp_set_default_device(gpu_id)
+
+ if (rank == 0) then
+ call get_timestamp_string(timestamp)
+ print '(a," Launching OpenMP GPU test kernel",a)', trim(timestamp), trim(mpi_desc)
+ flush(stdout)
+ end if
+
+ ! Test if GPU is available using OpenMP4.5 legal code
+ runningOnGPU = 0
+ !$omp target map(from:runningOnGPU)
+ if (.not. omp_is_initial_device()) then
+ runningOnGPU = 1
+ else
+ runningOnGPU = 2
+ end if
+ !$omp end target
+
+ ! If still running on CPU, GPU must not be available, punt
+ if (runningOnGPU .ne. 1) then
+ call get_timestamp_string(timestamp)
+ print '(a," ", a, i0," ",a)', trim(timestamp), &
+ & "ERROR: OpenMP GPU test kernel did NOT run on GPU ", gpu_id, trim(variant_desc)
+ flush(stdout)
+ call die()
+ end if
+
+ if (rank == 0) then
+ call get_timestamp_string(timestamp)
+ print '(a," Verified OpenMP target test kernel ran on GPU",a)', trim(timestamp), trim(mpi_desc)
+ flush(stdout)
+ end if
+ end subroutine verify_gpu_openmp
+
+
+ !Print kernel runtime stats and aggregate across MPI processes if necessary.
+ !Prints one liner if not using MPI
+ subroutine print_runtime_stats(iterations, kernel_mem_used, kernel_runtime, transfer_runtime)
+ ! Catch misspelled variables
+ implicit none
+ integer(8), intent(in) :: iterations
+ real(8), intent(in) :: kernel_mem_used
+ real(8), intent(in) :: kernel_runtime, transfer_runtime
+
+ ! NO MPI CASE - print one line
+ ! Print time stats
+ ! Convert runtime into same format as C using string manipulation
+ write (sec_str, 63) kernel_runtime
+63 format(f18.4)
+ sec_str=adjustl(sec_str)
+ write (us_str, 64) kernel_runtime*1000000.0_8/(1.0d+0*iterations)
+64 format(f18.2)
+ us_str=adjustl(us_str)
+ call get_timestamp_string(timestamp)
+ print '(a,a,i0,a,a,a,a,a,a,a,a,a)', trim(timestamp), &
+ &" RUSHSTATS Rush Larsen ", iterations, " ", trim(kernel_mem_used_str), " ", &
+ & trim(sec_str), " s ", trim(us_str), " us/iter ", trim(variant_desc)
+ flush(stdout)
+ end subroutine print_runtime_stats
+
+
+ ! Do sanity and consistency checks on all of m_gate. Including cross-rank if MPI mode
+ ! Prints PASS or FAIL based on data check results
+ ! If bad data found, will print up to 5 lines of debug info per MPI rank.
+ ! Returns fail count so can be returned to caller.
+ function data_check (m_gate, iterations, kernel_mem_used, nCells)
+ ! Catch misspelled variables
+ implicit none
+ real(8), dimension(0:), intent(inout) :: m_gate
+ integer(8), intent(in) :: iterations
+ real(8), intent(in) :: kernel_mem_used
+ integer(8), intent(in) :: nCells
+ integer(8) :: data_check ! Return value
+
+ ! Local variables
+ integer(8) :: fail_count
+
+ ! In non-MPI mode, treat only process as rank 0
+ integer :: rank = 0
+
+ integer(8) :: i
+
+ ! Initialize variables on every entry
+ fail_count = 0
+
+ if (rank == 0) then
+ ! Print separator before and after output with function name
+ call get_timestamp_string(timestamp)
+ print '(a," Starting data check for sanity and consistency")', trim(timestamp)
+ flush(stdout)
+ end if
+
+ ! Sanity check that kernel not giving garbage
+ ! Found m_gate[0] to be ~.0.506796353074569 after 1 iteration (really 2 with warmup)
+ ! and converges to 0.996321172062538 after 100 iterations. Make sure in that bounds
+ ! for now. With a little slop (~.000001) for now (not sure rounding error expected)
+ if (m_gate(0) < 0.506796) then
+ call get_timestamp_string(timestamp)
+ print '(a," ",a,f17.15,a,a)', trim(timestamp), &
+ & "ERROR Data sanity check m_gate[0]=", m_gate(0), " < 0.506796 (0.506796353074569 min expected value) ", &
+ & trim(variant_desc)
+ flush(stdout)
+ fail_count = fail_count + 1
+
+ else if (m_gate(0) > 0.996322) then
+ call get_timestamp_string(timestamp)
+ print '(a," ",a,f17.15,a,a)', trim(timestamp), &
+ & "ERROR Data sanity check m_gate[0]=", m_gate(0), " > 0.996322 (0.996321172062538 max expected value) ", &
+ & trim(variant_desc)
+ flush(stdout)
+ fail_count = fail_count + 1
+ end if
+
+ ! Every array entry should have the same value as m_gate[0], make sure that is true
+ do i=1,nCells-1
+ if (m_gate(i) .ne. m_gate(0)) then
+ fail_count = fail_count + 1
+ ! Only print at most 5 warnings per rank
+ if (fail_count < 5) then
+ call get_timestamp_string(timestamp)
+ print '(a," ",a,i0,a,f17.15,a,f17.15,a)', trim(timestamp), &
+ & "ERROR Data sanity check m_gate[", i, "]=", m_gate(i), " != m_gate[0]=", m_gate(0), &
+ & trim(variant_desc)
+ flush(stdout)
+ end if
+ if (fail_count == 5) then
+ call get_timestamp_string(timestamp)
+ print '(a," ", a,a)', trim(timestamp), &
+ & "ERROR Data consistency check REMAINING ERROR MESSAGES SUPPRESSED! ", trim(variant_desc)
+ flush(stdout)
+ end if
+ end if
+ end do
+
+ ! Value looks ok, check all ranks match if using MPI
+
+ ! Print out summary PASSED or FAILED count from rank 0 only
+ if (rank == 0) then
+ if (fail_count == 0) then
+ call get_timestamp_string(timestamp)
+ print '(a,a,i0,a,a,a,f17.15,a,a)',&
+ & trim(timestamp)," PASSED Data check ", iterations, " ", trim(kernel_mem_used_str), &
+ & " m_gate[0]=", m_gate(0), " ", trim(variant_desc)
+
+ flush(stdout)
+ else
+ ! Convert kernel_mem_used to left justified string with leading 0
+ call get_timestamp_string(timestamp)
+ print '(a,a,i0,a,a,a,i0,a,f17.15,a,a)',&
+ & trim(timestamp)," FAILED Data check ", iterations, " ", trim(kernel_mem_used_str), &
+ & " with ", fail_count, " DATA CHECK ERRORS m_gate[0]=", m_gate(0), " ", trim(variant_desc)
+
+ flush(stdout)
+ end if
+ end if
+
+ data_check = fail_count
+ end function data_check
+end function rush_larsen_gpu_omp_fort
+
+
+program rush_larsen_fort
+ ! Only include mpi for variants that need it
+ ! Catch misspelled variables
+ implicit none
+ interface
+ function rush_larsen_gpu_omp_fort(iterations, kernel_mem_used)
+ integer(8), intent(IN) :: iterations
+ real(8), intent(IN) :: kernel_mem_used
+ integer :: rush_larsen_gpu_omp_fort
+ end function rush_larsen_gpu_omp_fort
+ end interface
+
+ ! For command line argument parsing
+ character(1000) :: progName
+ character(100) :: arg1char
+ character(100) :: arg2char
+ integer(8) :: max_iterations
+ real(8) :: kernel_mem_used
+ character(100) :: tag
+ integer :: rank = 0 !Rank will be 0 for the no MPI case
+ integer :: fail_count = 0
+
+ call get_command_argument(0,progName) !Get program name from arg 0
+
+ !First, make sure the right number of inputs have been provided
+ if(command_argument_count().ne.2) then
+ if (rank == 0) then
+ write(*,*) "Usage: ", trim(progName), " Iterations Kernel_GBs_used"
+ write(*,*) " "
+ write(*,*) "Measure serial baseline small: ", trim(progName), " 100000 .00000001"
+ write(*,*) "Measure serial baseline large: ", trim(progName), " 100 10"
+ write(*,*) " "
+ write(*,*) trim(VERSION_STRING)
+ write(*,*) " "
+#if defined(COMPILERID)
+ write(*,*) "VARIANT_DESC: ", "gpu_omp_fort", " [", COMPILERID, "]"
+#endif /* defined(COMPILERID) */
+#if !defined(COMPILERID)
+ write(*,*) "VARIANT_DESC: ", "gpu_omp_fort"
+#endif /* !defined(COMPILERID) */
+ write(*,*) " "
+ write(*,*) "Questions? Contact John Gyllenhaal (gyllenhaal1@llnl.gov)\n"
+ end if
+ stop 1
+ end if
+
+ call get_command_argument(1,arg1char) !read in the two values
+ call get_command_argument(2,arg2char)
+
+ read(arg1char,*)max_iterations !then, convert them to REALs
+ read(arg2char,*)kernel_mem_used
+
+ ! Don't print MPI_Init time for MPI version since the way I hid
+ ! functions to enable interop makes timer routines hard to get to.
+
+ ! Run the test
+ fail_count = rush_larsen_gpu_omp_fort (max_iterations, kernel_mem_used)
+
+ ! Return 1 if data checks failed, before MPI Finalize
+ if (fail_count .ne. 0) then
+ stop 1
+ end if
+
+end program rush_larsen_fort
diff --git a/test/smoke-fort-dev/target-cmplx4-div/Makefile b/test/smoke-fort-dev/target-cmplx4-div/Makefile
index 2be17a799c..993964ce16 100644
--- a/test/smoke-fort-dev/target-cmplx4-div/Makefile
+++ b/test/smoke-fort-dev/target-cmplx4-div/Makefile
@@ -9,7 +9,7 @@ TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
FLANG = flang
-CFLAGS = -lflang_rt.hostdevice
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
#-ccc-print-phases
diff --git a/test/smoke-fort-dev/target-cmplx8-div/Makefile b/test/smoke-fort-dev/target-cmplx8-div/Makefile
index ad8af00b0e..265cd1e583 100644
--- a/test/smoke-fort-dev/target-cmplx8-div/Makefile
+++ b/test/smoke-fort-dev/target-cmplx8-div/Makefile
@@ -9,10 +9,9 @@ TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
FLANG = flang
-CFLAGS = -lflang_rt.hostdevice
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
-CFLAGS = -lflang_rt.hostdevice
#-ccc-print-phases
#"-\#\#\#"
diff --git a/test/smoke-fort-dev/tgt-firstprivate/Makefile b/test/smoke-fort-dev/tgt-firstprivate/Makefile
index 2cc256e807..d4f708dc1f 100644
--- a/test/smoke-fort-dev/tgt-firstprivate/Makefile
+++ b/test/smoke-fort-dev/tgt-firstprivate/Makefile
@@ -7,7 +7,7 @@ TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN)
FLANG ?= flang
-CFLAGS = -lflang_rt.hostdevice
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
#-ccc-print-phases
diff --git a/test/smoke-fort-dev/tgt-write-lhostdev/Makefile b/test/smoke-fort-dev/tgt-write-lhostdev/Makefile
deleted file mode 100644
index 5012481a6e..0000000000
--- a/test/smoke-fort-dev/tgt-write-lhostdev/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-# For testing without openmp:
-# OMP_FLAGS = -DNO_OMP
-include ../../Makefile.defs
-
-TESTNAME = test
-TESTSRC_MAIN = test.f90
-TESTSRC_AUX =
-TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
-
-FLANG ?= flang
-CFLAGS = -lflang_rt.hostdevice
-OMP_BIN = $(AOMP)/bin/$(FLANG)
-CC = $(OMP_BIN) $(VERBOSE)
-#-ccc-print-phases
-#"-\#\#\#"
-
-#RUNENV += LIBOMPTARGET_INFO=-1
-RUNCMD = ./doit.sh ${TESTNAME} && ./chkit.sh ${TESTNAME}
-
-include ../Makefile.rules
diff --git a/test/smoke-fort-fails/flang-527182/Makefile b/test/smoke-fort-fails/flang-527182/Makefile
new file mode 100644
index 0000000000..048d3ea909
--- /dev/null
+++ b/test/smoke-fort-fails/flang-527182/Makefile
@@ -0,0 +1,21 @@
+include ../../Makefile.defs
+
+TESTNAME = buildrun
+TESTSRC_MAIN =
+TESTSRC_AUX =
+TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
+
+FLANG ?= flang
+OMP_BIN = $(AOMP)/bin/$(FLANG)
+FC = $(OMP_BIN) $(VERBOSE)
+#-ccc-print-phases
+#"-\#\#\#"
+
+include ../Makefile.rules
+
+buildrun:
+ ${FC} ${OMP_FLAGS} -fPIC -c foo.F90 -o foo.o
+ ${FC} ${OMP_FLAGS} -fPIC -c main.F90 -o main.o
+ ${FC} -Wl,--disable-new-dtags -shared -Wl,-soname,libfoo.so -o libfoo.so foo.o -Wl,-rpath,"$$ORIGIN/../lib64"
+ ${FC} ${OMP_FLAGS} -Wl,--disable-new-dtags main.o -o test -L . -lfoo $(FLANG_GPU_LINK_FLAGS)
+ LD_LIBRARY_PATH="." ./test
diff --git a/test/smoke-fort-fails/flang-527182/foo.F90 b/test/smoke-fort-fails/flang-527182/foo.F90
new file mode 100644
index 0000000000..eaaa590f09
--- /dev/null
+++ b/test/smoke-fort-fails/flang-527182/foo.F90
@@ -0,0 +1,44 @@
+module foo
+
+ implicit none
+ public
+
+ type foo_type
+ real(4), allocatable, dimension(:) :: x
+ contains
+ procedure :: allocate => allocate_foo
+ procedure :: deallocate => deallocate_foo
+ procedure, nopass :: create_device
+ procedure, nopass :: delete_device
+ end type foo_type
+
+ contains
+ subroutine create_device(this)
+ type(foo_type), intent(inout) :: this
+ integer i
+ !$omp target enter data map(alloc:this%x) if(allocated(this%x))
+
+ ! initialize with a kenrel to 0
+ !$omp target teams distribute parallel do
+ do i=1,size(this%x,1)
+ this%x(i)=0.0
+ enddo
+ !$omp end target teams distribute parallel do
+ end subroutine create_device
+
+ subroutine delete_device(this)
+ type(foo_type), intent(inout) :: this
+ !$omp target exit data map(delete:this%x) if(allocated(this%x))
+ end subroutine delete_device
+
+ subroutine allocate_foo(this, n)
+ class(foo_type), intent(inout) :: this
+ integer, intent(in) :: n
+ allocate(this%x(n))
+ end subroutine allocate_foo
+
+ subroutine deallocate_foo(this)
+ class(foo_type), intent(inout) :: this
+ deallocate(this%x)
+ end subroutine deallocate_foo
+end module foo
diff --git a/test/smoke-fort-fails/flang-527182/main.F90 b/test/smoke-fort-fails/flang-527182/main.F90
new file mode 100644
index 0000000000..d434902b08
--- /dev/null
+++ b/test/smoke-fort-fails/flang-527182/main.F90
@@ -0,0 +1,13 @@
+program main
+ use foo, only: foo_type
+ implicit none
+ type(foo_type) :: bar
+
+ call bar%allocate(10)
+ !$omp target enter data map(TO:bar)
+ call bar%create_device(bar)
+ call bar%delete_device(bar)
+ !$omp target exit data map(delete:bar)
+ call bar%deallocate()
+
+end program main
diff --git a/test/smoke-fort-fails/flang-535320/Makefile b/test/smoke-fort-fails/flang-535320/Makefile
index dcf29a670d..9310cb4256 100644
--- a/test/smoke-fort-fails/flang-535320/Makefile
+++ b/test/smoke-fort-fails/flang-535320/Makefile
@@ -9,7 +9,7 @@ TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
FLANG = flang
-CFLAGS = -lflang_rt.hostdevice
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
#-ccc-print-phases
diff --git a/test/smoke-fort-fails/flang-535416-O0/Makefile b/test/smoke-fort-fails/flang-535416-O0/Makefile
index 051d583d2e..733e7e54c5 100644
--- a/test/smoke-fort-fails/flang-535416-O0/Makefile
+++ b/test/smoke-fort-fails/flang-535416-O0/Makefile
@@ -9,7 +9,7 @@ TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
FLANG = flang
-CFLAGS = -O0 -lflang_rt.hostdevice
+CFLAGS = -O0 $(FLANG_GPU_LINK_FLAGS)
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
#-ccc-print-phases
diff --git a/test/smoke-fort-fails/flang-535416-O2/Makefile b/test/smoke-fort-fails/flang-535416-O2/Makefile
index 21683eca2f..9202dd5046 100644
--- a/test/smoke-fort-fails/flang-535416-O2/Makefile
+++ b/test/smoke-fort-fails/flang-535416-O2/Makefile
@@ -9,7 +9,7 @@ TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
FLANG = flang
-CFLAGS = -O2 -lflang_rt.hostdevice
+CFLAGS = -O2 $(FLANG_GPU_LINK_FLAGS)
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
#-ccc-print-phases
diff --git a/test/smoke-fort-fails/flang-535416-private/Makefile b/test/smoke-fort-fails/flang-535416-private/Makefile
new file mode 100644
index 0000000000..33bbf1f055
--- /dev/null
+++ b/test/smoke-fort-fails/flang-535416-private/Makefile
@@ -0,0 +1,20 @@
+#NOOPT = 1
+#NOOMP = 1
+#OMP_FLAGS = -DNO_OMP
+include ../../Makefile.defs
+
+TESTNAME = test
+TESTSRC_MAIN = test.f90
+TESTSRC_AUX =
+TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
+
+FLANG = flang
+CFLAGS = -O0
+OMP_BIN = $(AOMP)/bin/$(FLANG)
+CC = $(OMP_BIN) $(VERBOSE)
+#-ccc-print-phases
+#"-\#\#\#"
+
+RUNENV = HSA_XNACK=1
+
+include ../Makefile.rules
diff --git a/test/smoke-fort-fails/flang-535416-private/test.f90 b/test/smoke-fort-fails/flang-535416-private/test.f90
new file mode 100644
index 0000000000..794c2017b3
--- /dev/null
+++ b/test/smoke-fort-fails/flang-535416-private/test.f90
@@ -0,0 +1,34 @@
+MODULE rep2
+ implicit none
+ public :: nvars
+
+ INTEGER :: nvars = 5
+END MODULE
+
+MODULE rep
+
+ use rep2, ONLY:nvars
+ implicit none
+
+ public :: foo
+
+ contains
+
+ SUBROUTINE foo()
+ implicit none
+ INTEGER :: i
+ REAL(KIND=8) :: mm(5)
+ !$omp target teams distribute parallel do private(mm)
+ DO i =1,nvars
+ mm(i) = 2.0_8
+ END DO
+ WRITE(*,*) "success"
+ END SUBROUTINE
+END MODULE
+
+PROGRAM rep_arraysyntax
+ use :: rep, ONLY:foo
+ implicit none
+ CALL foo()
+
+END PROGRAM
diff --git a/test/smoke-fort-fails/flang-537499/Makefile b/test/smoke-fort-fails/flang-537499/Makefile
index c26c57de0b..8fc489a5d5 100644
--- a/test/smoke-fort-fails/flang-537499/Makefile
+++ b/test/smoke-fort-fails/flang-537499/Makefile
@@ -9,7 +9,7 @@ TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
FLANG = flang
-CFLAGS = -lflang_rt.hostdevice
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
#-ccc-print-phases
diff --git a/test/smoke-fort-fails/flang-577054/Makefile b/test/smoke-fort-fails/flang-577054/Makefile
new file mode 100644
index 0000000000..b7a258e8fd
--- /dev/null
+++ b/test/smoke-fort-fails/flang-577054/Makefile
@@ -0,0 +1,16 @@
+NOOPT = 1
+include ../../Makefile.defs
+
+TESTNAME = flang-577054
+TESTSRC_MAIN = flang-577054.f90
+TESTSRC_AUX =
+TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
+
+FLANG ?= flang
+CFLAGS =
+OMP_BIN = $(AOMP)/bin/$(FLANG)
+CC = $(OMP_BIN) $(VERBOSE)
+#-ccc-print-phases
+#"-\#\#\#"
+
+include ../Makefile.rules
diff --git a/test/smoke-fort-fails/flang-577054/flang-577054.f90 b/test/smoke-fort-fails/flang-577054/flang-577054.f90
new file mode 100644
index 0000000000..e1031393d0
--- /dev/null
+++ b/test/smoke-fort-fails/flang-577054/flang-577054.f90
@@ -0,0 +1,19 @@
+module reproducer
+ implicit none
+ type::inner
+ sequence
+ integer :: intgr
+ type(inner), pointer :: ptr
+ end type
+ type::outer
+ sequence
+ real, allocatable :: arr
+ type(inner), pointer :: ptr
+ end type
+contains
+ subroutine routine(arg)
+ implicit none
+ type(outer) :: arg
+ !$omp target enter data map(to:arg)
+ end subroutine routine
+end module reproducer
\ No newline at end of file
diff --git a/test/smoke-fort-dev/amdflang-test/Makefile b/test/smoke-fort-limbo/amdflang-test/Makefile
similarity index 100%
rename from test/smoke-fort-dev/amdflang-test/Makefile
rename to test/smoke-fort-limbo/amdflang-test/Makefile
diff --git a/test/smoke-fort-dev/amdflang-test/amdflang-test.f90 b/test/smoke-fort-limbo/amdflang-test/amdflang-test.f90
similarity index 100%
rename from test/smoke-fort-dev/amdflang-test/amdflang-test.f90
rename to test/smoke-fort-limbo/amdflang-test/amdflang-test.f90
diff --git a/test/smoke-fort-dev/chk-ffast-ama/Makefile b/test/smoke-fort-limbo/chk-ffast-ama/Makefile
similarity index 100%
rename from test/smoke-fort-dev/chk-ffast-ama/Makefile
rename to test/smoke-fort-limbo/chk-ffast-ama/Makefile
diff --git a/test/smoke-fort-dev/chk-ffast-ama/test.f90 b/test/smoke-fort-limbo/chk-ffast-ama/test.f90
similarity index 100%
rename from test/smoke-fort-dev/chk-ffast-ama/test.f90
rename to test/smoke-fort-limbo/chk-ffast-ama/test.f90
diff --git a/test/smoke-fort-dev/chk-ffast-fmod/Makefile b/test/smoke-fort-limbo/chk-ffast-fmod/Makefile
similarity index 100%
rename from test/smoke-fort-dev/chk-ffast-fmod/Makefile
rename to test/smoke-fort-limbo/chk-ffast-fmod/Makefile
diff --git a/test/smoke-fort-dev/chk-ffast-fmod/test.f90 b/test/smoke-fort-limbo/chk-ffast-fmod/test.f90
similarity index 100%
rename from test/smoke-fort-dev/chk-ffast-fmod/test.f90
rename to test/smoke-fort-limbo/chk-ffast-fmod/test.f90
diff --git a/test/smoke-fort-limbo/clause_task_detach/task_detach.f90 b/test/smoke-fort-limbo/clause_task_detach/task_detach.f90
index cb6943073d..6fe6e7895a 100644
--- a/test/smoke-fort-limbo/clause_task_detach/task_detach.f90
+++ b/test/smoke-fort-limbo/clause_task_detach/task_detach.f90
@@ -1,6 +1,6 @@
! REQUIRES: openmp_runtime
-! RUN: %not_todo_cmd bbc -emit-fir %openmp_flags -fopenmp -fopenmp-version=50 -o - %s 2>&1 | FileCheck %s
-! RUN: %not_todo_cmd %flang_fc1 -emit-fir %openmp_flags -fopenmp -fopenmp-version=50 -o - %s 2>&1 | FileCheck %s
+! RUN: %not_todo_cmd bbc -emit-fir %openmp_flags -fopenmp -fopenmp-version=50 -o - %s 2>&1 | $FILECHECK %s
+! RUN: %not_todo_cmd %flang_fc1 -emit-fir %openmp_flags -fopenmp -fopenmp-version=50 -o - %s 2>&1 | $FILECHECK %s
!===============================================================================
! `detach` clause
diff --git a/test/smoke-fort-dev/crayptr-default/Makefile b/test/smoke-fort-limbo/crayptr-default/Makefile
similarity index 100%
rename from test/smoke-fort-dev/crayptr-default/Makefile
rename to test/smoke-fort-limbo/crayptr-default/Makefile
diff --git a/test/smoke-fort-dev/crayptr-default/README.txt b/test/smoke-fort-limbo/crayptr-default/README.txt
similarity index 100%
rename from test/smoke-fort-dev/crayptr-default/README.txt
rename to test/smoke-fort-limbo/crayptr-default/README.txt
diff --git a/test/smoke-fort-dev/crayptr-default/crayptr-default.f90 b/test/smoke-fort-limbo/crayptr-default/crayptr-default.f90
similarity index 100%
rename from test/smoke-fort-dev/crayptr-default/crayptr-default.f90
rename to test/smoke-fort-limbo/crayptr-default/crayptr-default.f90
diff --git a/test/smoke-fort-dev/crayptr-dsa/Makefile b/test/smoke-fort-limbo/crayptr-dsa/Makefile
similarity index 100%
rename from test/smoke-fort-dev/crayptr-dsa/Makefile
rename to test/smoke-fort-limbo/crayptr-dsa/Makefile
diff --git a/test/smoke-fort-dev/crayptr-dsa/README.txt b/test/smoke-fort-limbo/crayptr-dsa/README.txt
similarity index 100%
rename from test/smoke-fort-dev/crayptr-dsa/README.txt
rename to test/smoke-fort-limbo/crayptr-dsa/README.txt
diff --git a/test/smoke-fort-dev/crayptr-dsa/crayptr_dsa.f90 b/test/smoke-fort-limbo/crayptr-dsa/crayptr_dsa.f90
similarity index 100%
rename from test/smoke-fort-dev/crayptr-dsa/crayptr_dsa.f90
rename to test/smoke-fort-limbo/crayptr-dsa/crayptr_dsa.f90
diff --git a/test/smoke-fort-dev/do-concurrent-device/Makefile b/test/smoke-fort-limbo/do-concurrent-device/Makefile
similarity index 100%
rename from test/smoke-fort-dev/do-concurrent-device/Makefile
rename to test/smoke-fort-limbo/do-concurrent-device/Makefile
diff --git a/test/smoke-fort-dev/do-concurrent-device/saxpy-2d-device.f90 b/test/smoke-fort-limbo/do-concurrent-device/saxpy-2d-device.f90
similarity index 100%
rename from test/smoke-fort-dev/do-concurrent-device/saxpy-2d-device.f90
rename to test/smoke-fort-limbo/do-concurrent-device/saxpy-2d-device.f90
diff --git a/test/smoke-fort-dev/do-concurrent-host/Makefile b/test/smoke-fort-limbo/do-concurrent-host/Makefile
similarity index 100%
rename from test/smoke-fort-dev/do-concurrent-host/Makefile
rename to test/smoke-fort-limbo/do-concurrent-host/Makefile
diff --git a/test/smoke-fort-dev/do-concurrent-host/saxpy-2d-host.f90 b/test/smoke-fort-limbo/do-concurrent-host/saxpy-2d-host.f90
similarity index 100%
rename from test/smoke-fort-dev/do-concurrent-host/saxpy-2d-host.f90
rename to test/smoke-fort-limbo/do-concurrent-host/saxpy-2d-host.f90
diff --git a/test/smoke-fort-dev/flang-315421/Makefile b/test/smoke-fort-limbo/flang-315421/Makefile
similarity index 88%
rename from test/smoke-fort-dev/flang-315421/Makefile
rename to test/smoke-fort-limbo/flang-315421/Makefile
index 728d6c58e5..afd87871c8 100644
--- a/test/smoke-fort-dev/flang-315421/Makefile
+++ b/test/smoke-fort-limbo/flang-315421/Makefile
@@ -8,7 +8,7 @@ TESTSRC_ALL = $(TESTSRC_AUX) $(TESTSRC_MAIN)
FLANG ?= flang
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
-CFLAGS = -lflang_rt.hostdevice
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
OMP_FLAGS += -DFAIL
include ../Makefile.rules
diff --git a/test/smoke-fort-dev/flang-315421/blk_par.h b/test/smoke-fort-limbo/flang-315421/blk_par.h
similarity index 100%
rename from test/smoke-fort-dev/flang-315421/blk_par.h
rename to test/smoke-fort-limbo/flang-315421/blk_par.h
diff --git a/test/smoke-fort-dev/flang-315421/ft.f90 b/test/smoke-fort-limbo/flang-315421/ft.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-315421/ft.f90
rename to test/smoke-fort-limbo/flang-315421/ft.f90
diff --git a/test/smoke-fort-dev/flang-315421/ft_data.f90 b/test/smoke-fort-limbo/flang-315421/ft_data.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-315421/ft_data.f90
rename to test/smoke-fort-limbo/flang-315421/ft_data.f90
diff --git a/test/smoke-fort-dev/flang-315421/npbparams.h b/test/smoke-fort-limbo/flang-315421/npbparams.h
similarity index 100%
rename from test/smoke-fort-dev/flang-315421/npbparams.h
rename to test/smoke-fort-limbo/flang-315421/npbparams.h
diff --git a/test/smoke-fort-dev/flang-315421/randdp.f90 b/test/smoke-fort-limbo/flang-315421/randdp.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-315421/randdp.f90
rename to test/smoke-fort-limbo/flang-315421/randdp.f90
diff --git a/test/smoke-fort-dev/flang-325095-2/Makefile b/test/smoke-fort-limbo/flang-325095-2/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-325095-2/Makefile
rename to test/smoke-fort-limbo/flang-325095-2/Makefile
diff --git a/test/smoke-fort-dev/flang-325095-2/use_dev_addr_fort.f90 b/test/smoke-fort-limbo/flang-325095-2/use_dev_addr_fort.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-325095-2/use_dev_addr_fort.f90
rename to test/smoke-fort-limbo/flang-325095-2/use_dev_addr_fort.f90
diff --git a/test/smoke-fort-dev/flang-463332/Makefile b/test/smoke-fort-limbo/flang-463332/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-463332/Makefile
rename to test/smoke-fort-limbo/flang-463332/Makefile
diff --git a/test/smoke-fort-dev/flang-463332/chk.stderr b/test/smoke-fort-limbo/flang-463332/chk.stderr
similarity index 100%
rename from test/smoke-fort-dev/flang-463332/chk.stderr
rename to test/smoke-fort-limbo/flang-463332/chk.stderr
diff --git a/test/smoke-fort-dev/flang-463332/chk.stdout b/test/smoke-fort-limbo/flang-463332/chk.stdout
similarity index 100%
rename from test/smoke-fort-dev/flang-463332/chk.stdout
rename to test/smoke-fort-limbo/flang-463332/chk.stdout
diff --git a/test/smoke-fort-dev/flang-463332/chkit.sh b/test/smoke-fort-limbo/flang-463332/chkit.sh
similarity index 100%
rename from test/smoke-fort-dev/flang-463332/chkit.sh
rename to test/smoke-fort-limbo/flang-463332/chkit.sh
diff --git a/test/smoke-fort-dev/flang-463332/doit.sh b/test/smoke-fort-limbo/flang-463332/doit.sh
similarity index 100%
rename from test/smoke-fort-dev/flang-463332/doit.sh
rename to test/smoke-fort-limbo/flang-463332/doit.sh
diff --git a/test/smoke-fort-dev/flang-463332/present.F90 b/test/smoke-fort-limbo/flang-463332/present.F90
similarity index 100%
rename from test/smoke-fort-dev/flang-463332/present.F90
rename to test/smoke-fort-limbo/flang-463332/present.F90
diff --git a/test/smoke-fort-dev/flang-463690/Makefile b/test/smoke-fort-limbo/flang-463690/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-463690/Makefile
rename to test/smoke-fort-limbo/flang-463690/Makefile
diff --git a/test/smoke-fort-dev/flang-463690/multired.f90 b/test/smoke-fort-limbo/flang-463690/multired.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-463690/multired.f90
rename to test/smoke-fort-limbo/flang-463690/multired.f90
diff --git a/test/smoke-fort-dev/flang-471469/M.orig b/test/smoke-fort-limbo/flang-471469/M.orig
similarity index 100%
rename from test/smoke-fort-dev/flang-471469/M.orig
rename to test/smoke-fort-limbo/flang-471469/M.orig
diff --git a/test/smoke-fort-dev/flang-471469/Makefile b/test/smoke-fort-limbo/flang-471469/Makefile
similarity index 92%
rename from test/smoke-fort-dev/flang-471469/Makefile
rename to test/smoke-fort-limbo/flang-471469/Makefile
index 5b1fd096cd..78f5db1803 100644
--- a/test/smoke-fort-dev/flang-471469/Makefile
+++ b/test/smoke-fort-limbo/flang-471469/Makefile
@@ -24,7 +24,7 @@ HIP_LIB_PATH ?= $(realpath $(realpath ${AOMP})/../../lib)
# Compiler flags
HIP_FLAGS = -O3 --offload-arch=${AOMP_GPU}
F_FLAGS = -O2 -fopenmp -fopenmp-version=50 --offload-arch=${AOMP_GPU}
-LD_FLAGS = -O3 -L${HIP_LIB_PATH} -lamdhip64 -lstdc++
+LD_FLAGS = -O3 -L${HIP_LIB_PATH} -lamdhip64 -lstdc++ -Wl,-rpath,${HIP_LIB_PATH}
# To verify HIP runs, use:
# AMD_LOG_LEVEL=1 ...
diff --git a/test/smoke-fort-dev/flang-471469/driver.f90 b/test/smoke-fort-limbo/flang-471469/driver.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-471469/driver.f90
rename to test/smoke-fort-limbo/flang-471469/driver.f90
diff --git a/test/smoke-fort-dev/flang-471469/kernel.cpp b/test/smoke-fort-limbo/flang-471469/kernel.cpp
similarity index 100%
rename from test/smoke-fort-dev/flang-471469/kernel.cpp
rename to test/smoke-fort-limbo/flang-471469/kernel.cpp
diff --git a/test/smoke-fort-dev/flang-491114/Makefile b/test/smoke-fort-limbo/flang-491114/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-491114/Makefile
rename to test/smoke-fort-limbo/flang-491114/Makefile
diff --git a/test/smoke-fort-dev/flang-491114/vmm.f90 b/test/smoke-fort-limbo/flang-491114/vmm.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-491114/vmm.f90
rename to test/smoke-fort-limbo/flang-491114/vmm.f90
diff --git a/test/smoke-fort-dev/flang-494405/Makefile b/test/smoke-fort-limbo/flang-494405/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-494405/Makefile
rename to test/smoke-fort-limbo/flang-494405/Makefile
diff --git a/test/smoke-fort-dev/flang-494405/flang-494405.py b/test/smoke-fort-limbo/flang-494405/flang-494405.py
similarity index 100%
rename from test/smoke-fort-dev/flang-494405/flang-494405.py
rename to test/smoke-fort-limbo/flang-494405/flang-494405.py
diff --git a/test/smoke-fort-dev/flang-494405/redprob.f90 b/test/smoke-fort-limbo/flang-494405/redprob.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-494405/redprob.f90
rename to test/smoke-fort-limbo/flang-494405/redprob.f90
diff --git a/test/smoke-fort-dev/flang-505726/Makefile b/test/smoke-fort-limbo/flang-505726/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-505726/Makefile
rename to test/smoke-fort-limbo/flang-505726/Makefile
diff --git a/test/smoke-fort-dev/flang-505726/README.txt b/test/smoke-fort-limbo/flang-505726/README.txt
similarity index 100%
rename from test/smoke-fort-dev/flang-505726/README.txt
rename to test/smoke-fort-limbo/flang-505726/README.txt
diff --git a/test/smoke-fort-dev/flang-505726/chkit.sh b/test/smoke-fort-limbo/flang-505726/chkit.sh
similarity index 100%
rename from test/smoke-fort-dev/flang-505726/chkit.sh
rename to test/smoke-fort-limbo/flang-505726/chkit.sh
diff --git a/test/smoke-fort-dev/flang-505726/doit.sh b/test/smoke-fort-limbo/flang-505726/doit.sh
similarity index 100%
rename from test/smoke-fort-dev/flang-505726/doit.sh
rename to test/smoke-fort-limbo/flang-505726/doit.sh
diff --git a/test/smoke-fort-dev/flang-505726/ttds.f90 b/test/smoke-fort-limbo/flang-505726/ttds.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-505726/ttds.f90
rename to test/smoke-fort-limbo/flang-505726/ttds.f90
diff --git a/test/smoke-fort-dev/flang-509074/Makefile b/test/smoke-fort-limbo/flang-509074/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-509074/Makefile
rename to test/smoke-fort-limbo/flang-509074/Makefile
diff --git a/test/smoke-fort-dev/flang-509074/nowait_reproducer.f90 b/test/smoke-fort-limbo/flang-509074/nowait_reproducer.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-509074/nowait_reproducer.f90
rename to test/smoke-fort-limbo/flang-509074/nowait_reproducer.f90
diff --git a/test/smoke-fort-dev/flang-519081/Makefile b/test/smoke-fort-limbo/flang-519081/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-519081/Makefile
rename to test/smoke-fort-limbo/flang-519081/Makefile
diff --git a/test/smoke-fort-dev/flang-519081/real10.f90 b/test/smoke-fort-limbo/flang-519081/real10.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-519081/real10.f90
rename to test/smoke-fort-limbo/flang-519081/real10.f90
diff --git a/test/smoke-fort-dev/flang-522365-loop-1-1/Makefile b/test/smoke-fort-limbo/flang-522365-loop-1-1/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-522365-loop-1-1/Makefile
rename to test/smoke-fort-limbo/flang-522365-loop-1-1/Makefile
diff --git a/test/smoke-fort-dev/flang-522365-loop-1-1/loop-red-1-1.f90 b/test/smoke-fort-limbo/flang-522365-loop-1-1/loop-red-1-1.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-522365-loop-1-1/loop-red-1-1.f90
rename to test/smoke-fort-limbo/flang-522365-loop-1-1/loop-red-1-1.f90
diff --git a/test/smoke-fort-dev/flang-522365-loop-2s/Makefile b/test/smoke-fort-limbo/flang-522365-loop-2s/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-522365-loop-2s/Makefile
rename to test/smoke-fort-limbo/flang-522365-loop-2s/Makefile
diff --git a/test/smoke-fort-dev/flang-522365-loop-2s/loop-red-2s.f90 b/test/smoke-fort-limbo/flang-522365-loop-2s/loop-red-2s.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-522365-loop-2s/loop-red-2s.f90
rename to test/smoke-fort-limbo/flang-522365-loop-2s/loop-red-2s.f90
diff --git a/test/smoke-fort-dev/flang-523213/Makefile b/test/smoke-fort-limbo/flang-523213/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-523213/Makefile
rename to test/smoke-fort-limbo/flang-523213/Makefile
diff --git a/test/smoke-fort-dev/flang-523213/repro_optional_shared.F90 b/test/smoke-fort-limbo/flang-523213/repro_optional_shared.F90
similarity index 100%
rename from test/smoke-fort-dev/flang-523213/repro_optional_shared.F90
rename to test/smoke-fort-limbo/flang-523213/repro_optional_shared.F90
diff --git a/test/smoke-fort-dev/flang-523344-device/Makefile b/test/smoke-fort-limbo/flang-523344-device/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-523344-device/Makefile
rename to test/smoke-fort-limbo/flang-523344-device/Makefile
diff --git a/test/smoke-fort-dev/flang-523344-device/saxpy_gpu_do_concurrent_device.F90 b/test/smoke-fort-limbo/flang-523344-device/saxpy_gpu_do_concurrent_device.F90
similarity index 100%
rename from test/smoke-fort-dev/flang-523344-device/saxpy_gpu_do_concurrent_device.F90
rename to test/smoke-fort-limbo/flang-523344-device/saxpy_gpu_do_concurrent_device.F90
diff --git a/test/smoke-fort-dev/flang-523344-host/Makefile b/test/smoke-fort-limbo/flang-523344-host/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-523344-host/Makefile
rename to test/smoke-fort-limbo/flang-523344-host/Makefile
diff --git a/test/smoke-fort-dev/flang-523344-host/saxpy_gpu_do_concurrent_host.F90 b/test/smoke-fort-limbo/flang-523344-host/saxpy_gpu_do_concurrent_host.F90
similarity index 100%
rename from test/smoke-fort-dev/flang-523344-host/saxpy_gpu_do_concurrent_host.F90
rename to test/smoke-fort-limbo/flang-523344-host/saxpy_gpu_do_concurrent_host.F90
diff --git a/test/smoke-fort-dev/flang-523587/Makefile b/test/smoke-fort-limbo/flang-523587/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-523587/Makefile
rename to test/smoke-fort-limbo/flang-523587/Makefile
diff --git a/test/smoke-fort-dev/flang-523587/test.f90 b/test/smoke-fort-limbo/flang-523587/test.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-523587/test.f90
rename to test/smoke-fort-limbo/flang-523587/test.f90
diff --git a/test/smoke-fort-dev/flang-523626/Makefile b/test/smoke-fort-limbo/flang-523626/Makefile
similarity index 89%
rename from test/smoke-fort-dev/flang-523626/Makefile
rename to test/smoke-fort-limbo/flang-523626/Makefile
index 917a141e31..858890d847 100644
--- a/test/smoke-fort-dev/flang-523626/Makefile
+++ b/test/smoke-fort-limbo/flang-523626/Makefile
@@ -8,7 +8,7 @@ TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
FLANG ?= flang
-CFLAGS = -lflang_rt.hostdevice
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
#-ccc-print-phases
diff --git a/test/smoke-fort-dev/flang-523626/spread.f90 b/test/smoke-fort-limbo/flang-523626/spread.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-523626/spread.f90
rename to test/smoke-fort-limbo/flang-523626/spread.f90
diff --git a/test/smoke-fort-dev/flang-524183/Makefile b/test/smoke-fort-limbo/flang-524183/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-524183/Makefile
rename to test/smoke-fort-limbo/flang-524183/Makefile
diff --git a/test/smoke-fort-dev/flang-524183/repro_derived_type_arr_map.f90 b/test/smoke-fort-limbo/flang-524183/repro_derived_type_arr_map.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-524183/repro_derived_type_arr_map.f90
rename to test/smoke-fort-limbo/flang-524183/repro_derived_type_arr_map.f90
diff --git a/test/smoke-fort-dev/flang-524638-aO0/Makefile b/test/smoke-fort-limbo/flang-524638-aO0/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-524638-aO0/Makefile
rename to test/smoke-fort-limbo/flang-524638-aO0/Makefile
diff --git a/test/smoke-fort-dev/flang-524638-aO0/map_alloc.f90 b/test/smoke-fort-limbo/flang-524638-aO0/map_alloc.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-524638-aO0/map_alloc.f90
rename to test/smoke-fort-limbo/flang-524638-aO0/map_alloc.f90
diff --git a/test/smoke-fort-dev/flang-524638-aO3/Makefile b/test/smoke-fort-limbo/flang-524638-aO3/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-524638-aO3/Makefile
rename to test/smoke-fort-limbo/flang-524638-aO3/Makefile
diff --git a/test/smoke-fort-dev/flang-524638-aO3/map_alloc.f90 b/test/smoke-fort-limbo/flang-524638-aO3/map_alloc.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-524638-aO3/map_alloc.f90
rename to test/smoke-fort-limbo/flang-524638-aO3/map_alloc.f90
diff --git a/test/smoke-fort-dev/flang-524638-sO0/Makefile b/test/smoke-fort-limbo/flang-524638-sO0/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-524638-sO0/Makefile
rename to test/smoke-fort-limbo/flang-524638-sO0/Makefile
diff --git a/test/smoke-fort-dev/flang-524638-sO0/map_static.f90 b/test/smoke-fort-limbo/flang-524638-sO0/map_static.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-524638-sO0/map_static.f90
rename to test/smoke-fort-limbo/flang-524638-sO0/map_static.f90
diff --git a/test/smoke-fort-dev/flang-524638-sO3/Makefile b/test/smoke-fort-limbo/flang-524638-sO3/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-524638-sO3/Makefile
rename to test/smoke-fort-limbo/flang-524638-sO3/Makefile
diff --git a/test/smoke-fort-dev/flang-524638-sO3/map_static.f90 b/test/smoke-fort-limbo/flang-524638-sO3/map_static.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-524638-sO3/map_static.f90
rename to test/smoke-fort-limbo/flang-524638-sO3/map_static.f90
diff --git a/test/smoke-fort-dev/flang-527219/Makefile b/test/smoke-fort-limbo/flang-527219/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-527219/Makefile
rename to test/smoke-fort-limbo/flang-527219/Makefile
diff --git a/test/smoke-fort-dev/flang-527219/cond.f b/test/smoke-fort-limbo/flang-527219/cond.f
similarity index 100%
rename from test/smoke-fort-dev/flang-527219/cond.f
rename to test/smoke-fort-limbo/flang-527219/cond.f
diff --git a/test/smoke-fort-dev/flang-529634/Makefile b/test/smoke-fort-limbo/flang-529634/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-529634/Makefile
rename to test/smoke-fort-limbo/flang-529634/Makefile
diff --git a/test/smoke-fort-dev/flang-529634/test_ns3d_stackarray.f90 b/test/smoke-fort-limbo/flang-529634/test_ns3d_stackarray.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-529634/test_ns3d_stackarray.f90
rename to test/smoke-fort-limbo/flang-529634/test_ns3d_stackarray.f90
diff --git a/test/smoke-fort-dev/flang-544421-2/Makefile b/test/smoke-fort-limbo/flang-544421-2/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-544421-2/Makefile
rename to test/smoke-fort-limbo/flang-544421-2/Makefile
diff --git a/test/smoke-fort-dev/flang-544421-2/repro_544421-2.f90 b/test/smoke-fort-limbo/flang-544421-2/repro_544421-2.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-544421-2/repro_544421-2.f90
rename to test/smoke-fort-limbo/flang-544421-2/repro_544421-2.f90
diff --git a/test/smoke-fort-dev/flang-544421/Makefile b/test/smoke-fort-limbo/flang-544421/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-544421/Makefile
rename to test/smoke-fort-limbo/flang-544421/Makefile
diff --git a/test/smoke-fort-dev/flang-544421/repro_544421.f90 b/test/smoke-fort-limbo/flang-544421/repro_544421.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-544421/repro_544421.f90
rename to test/smoke-fort-limbo/flang-544421/repro_544421.f90
diff --git a/test/smoke-fort-dev/flang-561059/Makefile b/test/smoke-fort-limbo/flang-561059/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-561059/Makefile
rename to test/smoke-fort-limbo/flang-561059/Makefile
diff --git a/test/smoke-fort-dev/flang-561059/array_slice_repro.f90 b/test/smoke-fort-limbo/flang-561059/array_slice_repro.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-561059/array_slice_repro.f90
rename to test/smoke-fort-limbo/flang-561059/array_slice_repro.f90
diff --git a/test/smoke-fort-dev/flang-561059/doit.sh b/test/smoke-fort-limbo/flang-561059/doit.sh
similarity index 100%
rename from test/smoke-fort-dev/flang-561059/doit.sh
rename to test/smoke-fort-limbo/flang-561059/doit.sh
diff --git a/test/smoke-fort-limbo/flang-568012/Makefile b/test/smoke-fort-limbo/flang-568012/Makefile
new file mode 100644
index 0000000000..e998c2660c
--- /dev/null
+++ b/test/smoke-fort-limbo/flang-568012/Makefile
@@ -0,0 +1,18 @@
+NOOPT = 1
+include ../../Makefile.defs
+
+TESTNAME = getDevNum
+TESTSRC_MAIN = getDevNum.f90
+TESTSRC_AUX =
+TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
+
+FLANG ?= flang
+CFLAGS =
+OMP_BIN = $(AOMP)/bin/$(FLANG)
+CC = $(OMP_BIN) $(VERBOSE)
+#-ccc-print-phases
+#"-\#\#\#"
+
+RUNCMD = ./doit.sh ${TESTNAME}
+
+include ../Makefile.rules
diff --git a/test/smoke-fort-limbo/flang-568012/doit.sh b/test/smoke-fort-limbo/flang-568012/doit.sh
new file mode 100755
index 0000000000..683515e75a
--- /dev/null
+++ b/test/smoke-fort-limbo/flang-568012/doit.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+export OMP_TARGET_OFFLOAD=DISABLED
+./$1
diff --git a/test/smoke-fort-limbo/flang-568012/getDevNum.f90 b/test/smoke-fort-limbo/flang-568012/getDevNum.f90
new file mode 100644
index 0000000000..1a56a522a9
--- /dev/null
+++ b/test/smoke-fort-limbo/flang-568012/getDevNum.f90
@@ -0,0 +1,53 @@
+PROGRAM DisableOffload
+ USE OMP_LIB
+ USE ISO_C_BINDING
+
+ IMPLICIT NONE
+
+ INTEGER, PARAMETER :: N = 10000000
+ REAL, ALLOCATABLE, target :: host_array(:)
+ TYPE(C_PTR) :: c_host_ptr
+ INTEGER :: device_num
+ LOGICAL :: is_present_on_device
+ integer i
+
+
+ ALLOCATE(host_array(N))
+ host_array = 1.0
+
+ call omp_set_default_device(2);
+
+
+ device_num = OMP_GET_DEFAULT_DEVICE()
+
+
+ c_host_ptr = C_LOC(host_array)
+
+
+ is_present_on_device = OMP_TARGET_IS_PRESENT(c_host_ptr, device_num)
+
+ print *, 'Data is on device ', is_present_on_device
+
+ !$OMP TARGET ENTER DATA MAP(TO: host_array)
+
+ is_present_on_device = OMP_TARGET_IS_PRESENT(c_host_ptr, device_num)
+
+ print *, 'Data is on device ', is_present_on_device
+
+ !$OMP TARGET TEAMS DISTRIBUTE PARALLEL DO &
+ !$OMP& map(present, alloc: host_array)
+ DO i = 1, N
+ host_array(i) = host_array(i) * 2.0
+ END DO
+
+ !$OMP TARGET EXIT DATA MAP(FROM: host_array)
+
+ is_present_on_device = OMP_TARGET_IS_PRESENT(c_host_ptr, device_num)
+
+ print *, 'Data is on device ', is_present_on_device
+
+ print *, host_array(55)
+
+ DEALLOCATE(host_array)
+
+END PROGRAM
diff --git a/test/smoke-fort-dev/flang-local-aa/Makefile b/test/smoke-fort-limbo/flang-local-aa/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-local-aa/Makefile
rename to test/smoke-fort-limbo/flang-local-aa/Makefile
diff --git a/test/smoke-fort-dev/flang-local-aa/flang-local-aa.f90 b/test/smoke-fort-limbo/flang-local-aa/flang-local-aa.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-local-aa/flang-local-aa.f90
rename to test/smoke-fort-limbo/flang-local-aa/flang-local-aa.f90
diff --git a/test/smoke-fort-dev/flang-nestRed/Makefile b/test/smoke-fort-limbo/flang-nestRed/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-nestRed/Makefile
rename to test/smoke-fort-limbo/flang-nestRed/Makefile
diff --git a/test/smoke-fort-dev/flang-nestRed/flang-nestRed.py b/test/smoke-fort-limbo/flang-nestRed/flang-nestRed.py
similarity index 100%
rename from test/smoke-fort-dev/flang-nestRed/flang-nestRed.py
rename to test/smoke-fort-limbo/flang-nestRed/flang-nestRed.py
diff --git a/test/smoke-fort-dev/flang-nestRed/redprob.f90 b/test/smoke-fort-limbo/flang-nestRed/redprob.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-nestRed/redprob.f90
rename to test/smoke-fort-limbo/flang-nestRed/redprob.f90
diff --git a/test/smoke-fort-limbo/flang-offload-disabled-env/Makefile b/test/smoke-fort-limbo/flang-offload-disabled-env/Makefile
new file mode 100644
index 0000000000..4984bd8be1
--- /dev/null
+++ b/test/smoke-fort-limbo/flang-offload-disabled-env/Makefile
@@ -0,0 +1,18 @@
+NOOPT = 1
+include ../../Makefile.defs
+
+TESTNAME = getInitDevice
+TESTSRC_MAIN = getInitDevice.f90
+TESTSRC_AUX =
+TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
+
+FLANG ?= flang
+CFLAGS =
+OMP_BIN = $(AOMP)/bin/$(FLANG)
+CC = $(OMP_BIN) $(VERBOSE)
+#-ccc-print-phases
+#"-\#\#\#"
+
+RUNCMD = ./doit.sh ${TESTNAME}
+
+include ../Makefile.rules
diff --git a/test/smoke-fort-limbo/flang-offload-disabled-env/doit.sh b/test/smoke-fort-limbo/flang-offload-disabled-env/doit.sh
new file mode 100755
index 0000000000..d8f80125a0
--- /dev/null
+++ b/test/smoke-fort-limbo/flang-offload-disabled-env/doit.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+# Test with OMP_DEFAULT_DEVICE=2 and OMP_TARGET_OFFLOAD=DISABLED
+# Before the fix, this would crash with "device number '2' out of range"
+# After the fix, omp_get_default_device() should return 0 (the initial device)
+export OMP_DEFAULT_DEVICE=2
+export OMP_TARGET_OFFLOAD=DISABLED
+./$1
+
+
diff --git a/test/smoke-fort-limbo/flang-offload-disabled-env/getInitDevice.f90 b/test/smoke-fort-limbo/flang-offload-disabled-env/getInitDevice.f90
new file mode 100644
index 0000000000..05893e7009
--- /dev/null
+++ b/test/smoke-fort-limbo/flang-offload-disabled-env/getInitDevice.f90
@@ -0,0 +1,30 @@
+ program test_offload_disabled_env
+ use omp_lib
+ integer num, initial_dev
+
+ ! Test that omp_get_default_device returns the initial device
+ ! when OMP_TARGET_OFFLOAD=DISABLED, even when OMP_DEFAULT_DEVICE=2
+
+ ! Get initial device (should be 0 when offload is disabled)
+ initial_dev = omp_get_initial_device()
+ print *, 'initial device =', initial_dev
+
+ ! Get default device (should also be 0, not 2, when offload is disabled)
+ num = omp_get_default_device()
+ print *, 'default device =', num
+
+ ! Call from within target region
+ !$OMP TARGET
+ num = omp_get_default_device()
+ !$OMP END TARGET
+ print *, 'default device from target =', num
+
+ ! Verify they match
+ if (num .eq. initial_dev) then
+ print *, 'PASS: default device equals initial device'
+ else
+ print *, 'FAIL: default device does not equal initial device'
+ call exit(1)
+ end if
+
+ end
diff --git a/test/smoke-fort-dev/flang-quadmath/Makefile b/test/smoke-fort-limbo/flang-quadmath/Makefile
similarity index 100%
rename from test/smoke-fort-dev/flang-quadmath/Makefile
rename to test/smoke-fort-limbo/flang-quadmath/Makefile
diff --git a/test/smoke-fort-dev/flang-quadmath/qmath.f90 b/test/smoke-fort-limbo/flang-quadmath/qmath.f90
similarity index 100%
rename from test/smoke-fort-dev/flang-quadmath/qmath.f90
rename to test/smoke-fort-limbo/flang-quadmath/qmath.f90
diff --git a/test/smoke-fort-dev/kernel-exec-modes-host/Makefile b/test/smoke-fort-limbo/kernel-exec-modes-host/Makefile
similarity index 100%
rename from test/smoke-fort-dev/kernel-exec-modes-host/Makefile
rename to test/smoke-fort-limbo/kernel-exec-modes-host/Makefile
diff --git a/test/smoke-fort-dev/kernel-exec-modes-host/kernel-exec-modes-host.f90 b/test/smoke-fort-limbo/kernel-exec-modes-host/kernel-exec-modes-host.f90
similarity index 100%
rename from test/smoke-fort-dev/kernel-exec-modes-host/kernel-exec-modes-host.f90
rename to test/smoke-fort-limbo/kernel-exec-modes-host/kernel-exec-modes-host.f90
diff --git a/test/smoke-fort-dev/kernel-exec-modes/Makefile b/test/smoke-fort-limbo/kernel-exec-modes/Makefile
similarity index 100%
rename from test/smoke-fort-dev/kernel-exec-modes/Makefile
rename to test/smoke-fort-limbo/kernel-exec-modes/Makefile
diff --git a/test/smoke-fort-dev/kernel-exec-modes/kernel-exec-modes.f90 b/test/smoke-fort-limbo/kernel-exec-modes/kernel-exec-modes.f90
similarity index 100%
rename from test/smoke-fort-dev/kernel-exec-modes/kernel-exec-modes.f90
rename to test/smoke-fort-limbo/kernel-exec-modes/kernel-exec-modes.f90
diff --git a/test/smoke-fort-dev/mathquad/Makefile b/test/smoke-fort-limbo/mathquad/Makefile
similarity index 100%
rename from test/smoke-fort-dev/mathquad/Makefile
rename to test/smoke-fort-limbo/mathquad/Makefile
diff --git a/test/smoke-fort-dev/mathquad/mathquad.f90 b/test/smoke-fort-limbo/mathquad/mathquad.f90
similarity index 100%
rename from test/smoke-fort-dev/mathquad/mathquad.f90
rename to test/smoke-fort-limbo/mathquad/mathquad.f90
diff --git a/test/smoke-fort-dev/multi-generic/Makefile b/test/smoke-fort-limbo/multi-generic/Makefile
similarity index 100%
rename from test/smoke-fort-dev/multi-generic/Makefile
rename to test/smoke-fort-limbo/multi-generic/Makefile
diff --git a/test/smoke-fort-dev/multi-generic/main.f90 b/test/smoke-fort-limbo/multi-generic/main.f90
similarity index 100%
rename from test/smoke-fort-dev/multi-generic/main.f90
rename to test/smoke-fort-limbo/multi-generic/main.f90
diff --git a/test/smoke-fort-dev/multi-generic/vadd.f90 b/test/smoke-fort-limbo/multi-generic/vadd.f90
similarity index 100%
rename from test/smoke-fort-dev/multi-generic/vadd.f90
rename to test/smoke-fort-limbo/multi-generic/vadd.f90
diff --git a/test/smoke-fort-dev/multi-generic/vmul.f90 b/test/smoke-fort-limbo/multi-generic/vmul.f90
similarity index 100%
rename from test/smoke-fort-dev/multi-generic/vmul.f90
rename to test/smoke-fort-limbo/multi-generic/vmul.f90
diff --git a/test/smoke-fort-dev/tgt-print-val-lhostdev/Makefile b/test/smoke-fort-limbo/tgt-abort-lhostdev/Makefile
similarity index 91%
rename from test/smoke-fort-dev/tgt-print-val-lhostdev/Makefile
rename to test/smoke-fort-limbo/tgt-abort-lhostdev/Makefile
index 5012481a6e..77511f0af9 100644
--- a/test/smoke-fort-dev/tgt-print-val-lhostdev/Makefile
+++ b/test/smoke-fort-limbo/tgt-abort-lhostdev/Makefile
@@ -8,7 +8,7 @@ TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
FLANG ?= flang
-CFLAGS = -lflang_rt.hostdevice
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
#-ccc-print-phases
diff --git a/test/smoke-fort-dev/tgt-abort-lhostdev/README.txt b/test/smoke-fort-limbo/tgt-abort-lhostdev/README.txt
similarity index 100%
rename from test/smoke-fort-dev/tgt-abort-lhostdev/README.txt
rename to test/smoke-fort-limbo/tgt-abort-lhostdev/README.txt
diff --git a/test/smoke-fort-dev/tgt-abort-lhostdev/chk.stderr b/test/smoke-fort-limbo/tgt-abort-lhostdev/chk.stderr
similarity index 100%
rename from test/smoke-fort-dev/tgt-abort-lhostdev/chk.stderr
rename to test/smoke-fort-limbo/tgt-abort-lhostdev/chk.stderr
diff --git a/test/smoke-fort-dev/tgt-abort-lhostdev/chk.stdout b/test/smoke-fort-limbo/tgt-abort-lhostdev/chk.stdout
similarity index 100%
rename from test/smoke-fort-dev/tgt-abort-lhostdev/chk.stdout
rename to test/smoke-fort-limbo/tgt-abort-lhostdev/chk.stdout
diff --git a/test/smoke-fort-dev/tgt-abort-lhostdev/chkit.sh b/test/smoke-fort-limbo/tgt-abort-lhostdev/chkit.sh
similarity index 100%
rename from test/smoke-fort-dev/tgt-abort-lhostdev/chkit.sh
rename to test/smoke-fort-limbo/tgt-abort-lhostdev/chkit.sh
diff --git a/test/smoke-fort-dev/tgt-abort-lhostdev/doit.sh b/test/smoke-fort-limbo/tgt-abort-lhostdev/doit.sh
similarity index 100%
rename from test/smoke-fort-dev/tgt-abort-lhostdev/doit.sh
rename to test/smoke-fort-limbo/tgt-abort-lhostdev/doit.sh
diff --git a/test/smoke-fort-dev/tgt-abort-lhostdev/test.f90 b/test/smoke-fort-limbo/tgt-abort-lhostdev/test.f90
similarity index 100%
rename from test/smoke-fort-dev/tgt-abort-lhostdev/test.f90
rename to test/smoke-fort-limbo/tgt-abort-lhostdev/test.f90
diff --git a/test/smoke-fort-dev/tgt-print-hello-lhostdev/Makefile b/test/smoke-fort-limbo/tgt-print-hello-lhostdev/Makefile
similarity index 91%
rename from test/smoke-fort-dev/tgt-print-hello-lhostdev/Makefile
rename to test/smoke-fort-limbo/tgt-print-hello-lhostdev/Makefile
index 5012481a6e..77511f0af9 100644
--- a/test/smoke-fort-dev/tgt-print-hello-lhostdev/Makefile
+++ b/test/smoke-fort-limbo/tgt-print-hello-lhostdev/Makefile
@@ -8,7 +8,7 @@ TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
FLANG ?= flang
-CFLAGS = -lflang_rt.hostdevice
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
#-ccc-print-phases
diff --git a/test/smoke-fort-dev/tgt-print-hello-lhostdev/README.txt b/test/smoke-fort-limbo/tgt-print-hello-lhostdev/README.txt
similarity index 100%
rename from test/smoke-fort-dev/tgt-print-hello-lhostdev/README.txt
rename to test/smoke-fort-limbo/tgt-print-hello-lhostdev/README.txt
diff --git a/test/smoke-fort-dev/tgt-print-hello-lhostdev/chk.stderr b/test/smoke-fort-limbo/tgt-print-hello-lhostdev/chk.stderr
similarity index 100%
rename from test/smoke-fort-dev/tgt-print-hello-lhostdev/chk.stderr
rename to test/smoke-fort-limbo/tgt-print-hello-lhostdev/chk.stderr
diff --git a/test/smoke-fort-dev/tgt-print-hello-lhostdev/chk.stdout b/test/smoke-fort-limbo/tgt-print-hello-lhostdev/chk.stdout
similarity index 100%
rename from test/smoke-fort-dev/tgt-print-hello-lhostdev/chk.stdout
rename to test/smoke-fort-limbo/tgt-print-hello-lhostdev/chk.stdout
diff --git a/test/smoke-fort-dev/tgt-print-hello-lhostdev/chkit.sh b/test/smoke-fort-limbo/tgt-print-hello-lhostdev/chkit.sh
similarity index 100%
rename from test/smoke-fort-dev/tgt-print-hello-lhostdev/chkit.sh
rename to test/smoke-fort-limbo/tgt-print-hello-lhostdev/chkit.sh
diff --git a/test/smoke-fort-dev/tgt-print-hello-lhostdev/doit.sh b/test/smoke-fort-limbo/tgt-print-hello-lhostdev/doit.sh
similarity index 100%
rename from test/smoke-fort-dev/tgt-print-hello-lhostdev/doit.sh
rename to test/smoke-fort-limbo/tgt-print-hello-lhostdev/doit.sh
diff --git a/test/smoke-fort-dev/tgt-print-hello-lhostdev/test.f90 b/test/smoke-fort-limbo/tgt-print-hello-lhostdev/test.f90
similarity index 100%
rename from test/smoke-fort-dev/tgt-print-hello-lhostdev/test.f90
rename to test/smoke-fort-limbo/tgt-print-hello-lhostdev/test.f90
diff --git a/test/smoke-fort-dev/tgt-stop-lhostdev/Makefile b/test/smoke-fort-limbo/tgt-print-val-lhostdev/Makefile
similarity index 91%
rename from test/smoke-fort-dev/tgt-stop-lhostdev/Makefile
rename to test/smoke-fort-limbo/tgt-print-val-lhostdev/Makefile
index 5012481a6e..77511f0af9 100644
--- a/test/smoke-fort-dev/tgt-stop-lhostdev/Makefile
+++ b/test/smoke-fort-limbo/tgt-print-val-lhostdev/Makefile
@@ -8,7 +8,7 @@ TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
FLANG ?= flang
-CFLAGS = -lflang_rt.hostdevice
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
#-ccc-print-phases
diff --git a/test/smoke-fort-dev/tgt-print-val-lhostdev/README.txt b/test/smoke-fort-limbo/tgt-print-val-lhostdev/README.txt
similarity index 100%
rename from test/smoke-fort-dev/tgt-print-val-lhostdev/README.txt
rename to test/smoke-fort-limbo/tgt-print-val-lhostdev/README.txt
diff --git a/test/smoke-fort-dev/tgt-print-val-lhostdev/chk.stderr b/test/smoke-fort-limbo/tgt-print-val-lhostdev/chk.stderr
similarity index 100%
rename from test/smoke-fort-dev/tgt-print-val-lhostdev/chk.stderr
rename to test/smoke-fort-limbo/tgt-print-val-lhostdev/chk.stderr
diff --git a/test/smoke-fort-dev/tgt-print-val-lhostdev/chk.stdout b/test/smoke-fort-limbo/tgt-print-val-lhostdev/chk.stdout
similarity index 100%
rename from test/smoke-fort-dev/tgt-print-val-lhostdev/chk.stdout
rename to test/smoke-fort-limbo/tgt-print-val-lhostdev/chk.stdout
diff --git a/test/smoke-fort-dev/tgt-print-val-lhostdev/chkit.sh b/test/smoke-fort-limbo/tgt-print-val-lhostdev/chkit.sh
similarity index 100%
rename from test/smoke-fort-dev/tgt-print-val-lhostdev/chkit.sh
rename to test/smoke-fort-limbo/tgt-print-val-lhostdev/chkit.sh
diff --git a/test/smoke-fort-dev/tgt-print-val-lhostdev/doit.sh b/test/smoke-fort-limbo/tgt-print-val-lhostdev/doit.sh
similarity index 100%
rename from test/smoke-fort-dev/tgt-print-val-lhostdev/doit.sh
rename to test/smoke-fort-limbo/tgt-print-val-lhostdev/doit.sh
diff --git a/test/smoke-fort-dev/tgt-print-val-lhostdev/test.f90 b/test/smoke-fort-limbo/tgt-print-val-lhostdev/test.f90
similarity index 100%
rename from test/smoke-fort-dev/tgt-print-val-lhostdev/test.f90
rename to test/smoke-fort-limbo/tgt-print-val-lhostdev/test.f90
diff --git a/test/smoke-fort-dev/tgt-abort-lhostdev/Makefile b/test/smoke-fort-limbo/tgt-stop-lhostdev/Makefile
similarity index 91%
rename from test/smoke-fort-dev/tgt-abort-lhostdev/Makefile
rename to test/smoke-fort-limbo/tgt-stop-lhostdev/Makefile
index 5012481a6e..77511f0af9 100644
--- a/test/smoke-fort-dev/tgt-abort-lhostdev/Makefile
+++ b/test/smoke-fort-limbo/tgt-stop-lhostdev/Makefile
@@ -8,7 +8,7 @@ TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
FLANG ?= flang
-CFLAGS = -lflang_rt.hostdevice
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
OMP_BIN = $(AOMP)/bin/$(FLANG)
CC = $(OMP_BIN) $(VERBOSE)
#-ccc-print-phases
diff --git a/test/smoke-fort-dev/tgt-stop-lhostdev/README.txt b/test/smoke-fort-limbo/tgt-stop-lhostdev/README.txt
similarity index 100%
rename from test/smoke-fort-dev/tgt-stop-lhostdev/README.txt
rename to test/smoke-fort-limbo/tgt-stop-lhostdev/README.txt
diff --git a/test/smoke-fort-dev/tgt-stop-lhostdev/chk.stderr b/test/smoke-fort-limbo/tgt-stop-lhostdev/chk.stderr
similarity index 100%
rename from test/smoke-fort-dev/tgt-stop-lhostdev/chk.stderr
rename to test/smoke-fort-limbo/tgt-stop-lhostdev/chk.stderr
diff --git a/test/smoke-fort-dev/tgt-stop-lhostdev/chk.stdout b/test/smoke-fort-limbo/tgt-stop-lhostdev/chk.stdout
similarity index 100%
rename from test/smoke-fort-dev/tgt-stop-lhostdev/chk.stdout
rename to test/smoke-fort-limbo/tgt-stop-lhostdev/chk.stdout
diff --git a/test/smoke-fort-dev/tgt-stop-lhostdev/chkit.sh b/test/smoke-fort-limbo/tgt-stop-lhostdev/chkit.sh
similarity index 100%
rename from test/smoke-fort-dev/tgt-stop-lhostdev/chkit.sh
rename to test/smoke-fort-limbo/tgt-stop-lhostdev/chkit.sh
diff --git a/test/smoke-fort-dev/tgt-stop-lhostdev/doit.sh b/test/smoke-fort-limbo/tgt-stop-lhostdev/doit.sh
similarity index 100%
rename from test/smoke-fort-dev/tgt-stop-lhostdev/doit.sh
rename to test/smoke-fort-limbo/tgt-stop-lhostdev/doit.sh
diff --git a/test/smoke-fort-dev/tgt-stop-lhostdev/test.f90 b/test/smoke-fort-limbo/tgt-stop-lhostdev/test.f90
similarity index 100%
rename from test/smoke-fort-dev/tgt-stop-lhostdev/test.f90
rename to test/smoke-fort-limbo/tgt-stop-lhostdev/test.f90
diff --git a/test/smoke-fort-dev/tgt-variable-array-dimension/Makefile b/test/smoke-fort-limbo/tgt-variable-array-dimension/Makefile
similarity index 100%
rename from test/smoke-fort-dev/tgt-variable-array-dimension/Makefile
rename to test/smoke-fort-limbo/tgt-variable-array-dimension/Makefile
diff --git a/test/smoke-fort-dev/tgt-variable-array-dimension/tgt-variable-array-dimension.f90 b/test/smoke-fort-limbo/tgt-variable-array-dimension/tgt-variable-array-dimension.f90
similarity index 100%
rename from test/smoke-fort-dev/tgt-variable-array-dimension/tgt-variable-array-dimension.f90
rename to test/smoke-fort-limbo/tgt-variable-array-dimension/tgt-variable-array-dimension.f90
diff --git a/test/smoke-fort-limbo/tgt-write-lhostdev/Makefile b/test/smoke-fort-limbo/tgt-write-lhostdev/Makefile
new file mode 100644
index 0000000000..77511f0af9
--- /dev/null
+++ b/test/smoke-fort-limbo/tgt-write-lhostdev/Makefile
@@ -0,0 +1,20 @@
+# For testing without openmp:
+# OMP_FLAGS = -DNO_OMP
+include ../../Makefile.defs
+
+TESTNAME = test
+TESTSRC_MAIN = test.f90
+TESTSRC_AUX =
+TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
+
+FLANG ?= flang
+CFLAGS = $(FLANG_GPU_LINK_FLAGS)
+OMP_BIN = $(AOMP)/bin/$(FLANG)
+CC = $(OMP_BIN) $(VERBOSE)
+#-ccc-print-phases
+#"-\#\#\#"
+
+#RUNENV += LIBOMPTARGET_INFO=-1
+RUNCMD = ./doit.sh ${TESTNAME} && ./chkit.sh ${TESTNAME}
+
+include ../Makefile.rules
diff --git a/test/smoke-fort-dev/tgt-write-lhostdev/README.txt b/test/smoke-fort-limbo/tgt-write-lhostdev/README.txt
similarity index 100%
rename from test/smoke-fort-dev/tgt-write-lhostdev/README.txt
rename to test/smoke-fort-limbo/tgt-write-lhostdev/README.txt
diff --git a/test/smoke-fort-dev/tgt-write-lhostdev/chk.stderr b/test/smoke-fort-limbo/tgt-write-lhostdev/chk.stderr
similarity index 100%
rename from test/smoke-fort-dev/tgt-write-lhostdev/chk.stderr
rename to test/smoke-fort-limbo/tgt-write-lhostdev/chk.stderr
diff --git a/test/smoke-fort-dev/tgt-write-lhostdev/chk.stdout b/test/smoke-fort-limbo/tgt-write-lhostdev/chk.stdout
similarity index 100%
rename from test/smoke-fort-dev/tgt-write-lhostdev/chk.stdout
rename to test/smoke-fort-limbo/tgt-write-lhostdev/chk.stdout
diff --git a/test/smoke-fort-dev/tgt-write-lhostdev/chkit.sh b/test/smoke-fort-limbo/tgt-write-lhostdev/chkit.sh
similarity index 100%
rename from test/smoke-fort-dev/tgt-write-lhostdev/chkit.sh
rename to test/smoke-fort-limbo/tgt-write-lhostdev/chkit.sh
diff --git a/test/smoke-fort-dev/tgt-write-lhostdev/doit.sh b/test/smoke-fort-limbo/tgt-write-lhostdev/doit.sh
similarity index 100%
rename from test/smoke-fort-dev/tgt-write-lhostdev/doit.sh
rename to test/smoke-fort-limbo/tgt-write-lhostdev/doit.sh
diff --git a/test/smoke-fort-dev/tgt-write-lhostdev/test.f90 b/test/smoke-fort-limbo/tgt-write-lhostdev/test.f90
similarity index 100%
rename from test/smoke-fort-dev/tgt-write-lhostdev/test.f90
rename to test/smoke-fort-limbo/tgt-write-lhostdev/test.f90
diff --git a/test/smoke-fort-dev/whole-archive-module/Makefile b/test/smoke-fort-limbo/whole-archive-module/Makefile
similarity index 100%
rename from test/smoke-fort-dev/whole-archive-module/Makefile
rename to test/smoke-fort-limbo/whole-archive-module/Makefile
diff --git a/test/smoke-fort-dev/whole-archive-module/main.f90 b/test/smoke-fort-limbo/whole-archive-module/main.f90
similarity index 100%
rename from test/smoke-fort-dev/whole-archive-module/main.f90
rename to test/smoke-fort-limbo/whole-archive-module/main.f90
diff --git a/test/smoke-fort-dev/whole-archive-module/mymod.f90 b/test/smoke-fort-limbo/whole-archive-module/mymod.f90
similarity index 100%
rename from test/smoke-fort-dev/whole-archive-module/mymod.f90
rename to test/smoke-fort-limbo/whole-archive-module/mymod.f90
diff --git a/test/smoke-fort-dev/whole-archive-module/mymod_impl.f90 b/test/smoke-fort-limbo/whole-archive-module/mymod_impl.f90
similarity index 100%
rename from test/smoke-fort-dev/whole-archive-module/mymod_impl.f90
rename to test/smoke-fort-limbo/whole-archive-module/mymod_impl.f90
diff --git a/test/smoke-fort-dev/whole-archive/Makefile b/test/smoke-fort-limbo/whole-archive/Makefile
similarity index 100%
rename from test/smoke-fort-dev/whole-archive/Makefile
rename to test/smoke-fort-limbo/whole-archive/Makefile
diff --git a/test/smoke-fort-dev/whole-archive/main.f90 b/test/smoke-fort-limbo/whole-archive/main.f90
similarity index 100%
rename from test/smoke-fort-dev/whole-archive/main.f90
rename to test/smoke-fort-limbo/whole-archive/main.f90
diff --git a/test/smoke-fort-dev/whole-archive/vadd.f90 b/test/smoke-fort-limbo/whole-archive/vadd.f90
similarity index 100%
rename from test/smoke-fort-dev/whole-archive/vadd.f90
rename to test/smoke-fort-limbo/whole-archive/vadd.f90
diff --git a/test/smoke-dev/Threads1xxx/Makefile b/test/smoke-limbo/Threads1xxx/Makefile
similarity index 100%
rename from test/smoke-dev/Threads1xxx/Makefile
rename to test/smoke-limbo/Threads1xxx/Makefile
diff --git a/test/smoke-dev/Threads1xxx/NRUN b/test/smoke-limbo/Threads1xxx/NRUN
similarity index 100%
rename from test/smoke-dev/Threads1xxx/NRUN
rename to test/smoke-limbo/Threads1xxx/NRUN
diff --git a/test/smoke-dev/Threads1xxx/Threads1xxx.c b/test/smoke-limbo/Threads1xxx/Threads1xxx.c
similarity index 100%
rename from test/smoke-dev/Threads1xxx/Threads1xxx.c
rename to test/smoke-limbo/Threads1xxx/Threads1xxx.c
diff --git a/test/smoke-dev/aomp_mappings_newrt/Makefile b/test/smoke-limbo/aomp_mappings_newrt/Makefile
similarity index 100%
rename from test/smoke-dev/aomp_mappings_newrt/Makefile
rename to test/smoke-limbo/aomp_mappings_newrt/Makefile
diff --git a/test/smoke-dev/aomp_mappings_newrt/aomp_mappings_newrt.c b/test/smoke-limbo/aomp_mappings_newrt/aomp_mappings_newrt.c
similarity index 95%
rename from test/smoke-dev/aomp_mappings_newrt/aomp_mappings_newrt.c
rename to test/smoke-limbo/aomp_mappings_newrt/aomp_mappings_newrt.c
index f84e60756f..174ebafb51 100644
--- a/test/smoke-dev/aomp_mappings_newrt/aomp_mappings_newrt.c
+++ b/test/smoke-limbo/aomp_mappings_newrt/aomp_mappings_newrt.c
@@ -314,17 +314,20 @@ int main()
#pragma omp target teams
{
int j = omp_get_team_num();
- thread_num[j] = omp_get_thread_num();
- num_threads[j] = omp_get_num_threads();
- team_num[j] = omp_get_team_num();
- num_teams[j] = omp_get_num_teams();
- default_dev[j] = omp_get_default_device();
- warp_id[j] = omp_ext_get_warp_id();
- lane_id[j] = omp_ext_get_lane_id();
- active_mask[j] = omp_ext_get_active_threads_mask();
- smid[j] = omp_ext_get_smid();
- master_thread_id[j] = omp_ext_get_master_thread_id();
- is_spmd_mode[j] = omp_ext_is_spmd_mode();
+ // Number of teams on a GPU might exceed array size, e.g., gfx942.
+ if (j < N) {
+ thread_num[j] = omp_get_thread_num();
+ num_threads[j] = omp_get_num_threads();
+ team_num[j] = omp_get_team_num();
+ num_teams[j] = omp_get_num_teams();
+ default_dev[j] = omp_get_default_device();
+ warp_id[j] = omp_ext_get_warp_id();
+ lane_id[j] = omp_ext_get_lane_id();
+ active_mask[j] = omp_ext_get_active_threads_mask();
+ smid[j] = omp_ext_get_smid();
+ master_thread_id[j] = omp_ext_get_master_thread_id();
+ is_spmd_mode[j] = omp_ext_is_spmd_mode();
+ }
}
diff --git a/test/smoke-dev/check-xnack/Makefile b/test/smoke-limbo/check-xnack/Makefile
similarity index 100%
rename from test/smoke-dev/check-xnack/Makefile
rename to test/smoke-limbo/check-xnack/Makefile
diff --git a/test/smoke-dev/check-xnack/check-xnack.cpp b/test/smoke-limbo/check-xnack/check-xnack.cpp
similarity index 100%
rename from test/smoke-dev/check-xnack/check-xnack.cpp
rename to test/smoke-limbo/check-xnack/check-xnack.cpp
diff --git a/test/smoke-dev/clang-ifaces/Makefile b/test/smoke-limbo/clang-ifaces/Makefile
similarity index 100%
rename from test/smoke-dev/clang-ifaces/Makefile
rename to test/smoke-limbo/clang-ifaces/Makefile
diff --git a/test/smoke-dev/clang-ifaces/clang-ifaces.c b/test/smoke-limbo/clang-ifaces/clang-ifaces.c
similarity index 100%
rename from test/smoke-dev/clang-ifaces/clang-ifaces.c
rename to test/smoke-limbo/clang-ifaces/clang-ifaces.c
diff --git a/test/smoke-dev/clang-nested-parallel-for/Makefile b/test/smoke-limbo/clang-nested-parallel-for/Makefile
similarity index 100%
rename from test/smoke-dev/clang-nested-parallel-for/Makefile
rename to test/smoke-limbo/clang-nested-parallel-for/Makefile
diff --git a/test/smoke-dev/clang-nested-parallel-for/clang-nested-parallel-for.c b/test/smoke-limbo/clang-nested-parallel-for/clang-nested-parallel-for.c
similarity index 100%
rename from test/smoke-dev/clang-nested-parallel-for/clang-nested-parallel-for.c
rename to test/smoke-limbo/clang-nested-parallel-for/clang-nested-parallel-for.c
diff --git a/test/smoke-dev/fast_fp_atomics_mi200_enable_corase_grain_usm_map/Makefile b/test/smoke-limbo/fast_fp_atomics_mi200_enable_corase_grain_usm_map/Makefile
similarity index 100%
rename from test/smoke-dev/fast_fp_atomics_mi200_enable_corase_grain_usm_map/Makefile
rename to test/smoke-limbo/fast_fp_atomics_mi200_enable_corase_grain_usm_map/Makefile
diff --git a/test/smoke-dev/fast_fp_atomics_mi200_enable_corase_grain_usm_map/fast_fp_atomics_mi200_enable_coarse_grain_usm_map.cpp b/test/smoke-limbo/fast_fp_atomics_mi200_enable_corase_grain_usm_map/fast_fp_atomics_mi200_enable_coarse_grain_usm_map.cpp
similarity index 100%
rename from test/smoke-dev/fast_fp_atomics_mi200_enable_corase_grain_usm_map/fast_fp_atomics_mi200_enable_coarse_grain_usm_map.cpp
rename to test/smoke-limbo/fast_fp_atomics_mi200_enable_corase_grain_usm_map/fast_fp_atomics_mi200_enable_coarse_grain_usm_map.cpp
diff --git a/test/smoke-dev/flang-280342/Makefile b/test/smoke-limbo/flang-280342/Makefile
similarity index 100%
rename from test/smoke-dev/flang-280342/Makefile
rename to test/smoke-limbo/flang-280342/Makefile
diff --git a/test/smoke-dev/flang-280342/flang-280342.f90 b/test/smoke-limbo/flang-280342/flang-280342.f90
similarity index 100%
rename from test/smoke-dev/flang-280342/flang-280342.f90
rename to test/smoke-limbo/flang-280342/flang-280342.f90
diff --git a/test/smoke-dev/flang-TL-0/Makefile b/test/smoke-limbo/flang-TL-0/Makefile
similarity index 100%
rename from test/smoke-dev/flang-TL-0/Makefile
rename to test/smoke-limbo/flang-TL-0/Makefile
diff --git a/test/smoke-dev/flang-TL-0/loopTest.f90 b/test/smoke-limbo/flang-TL-0/loopTest.f90
similarity index 100%
rename from test/smoke-dev/flang-TL-0/loopTest.f90
rename to test/smoke-limbo/flang-TL-0/loopTest.f90
diff --git a/test/smoke-dev/flang-TL-1/Makefile b/test/smoke-limbo/flang-TL-1/Makefile
similarity index 100%
rename from test/smoke-dev/flang-TL-1/Makefile
rename to test/smoke-limbo/flang-TL-1/Makefile
diff --git a/test/smoke-dev/flang-TL-1/loopTest.f90 b/test/smoke-limbo/flang-TL-1/loopTest.f90
similarity index 100%
rename from test/smoke-dev/flang-TL-1/loopTest.f90
rename to test/smoke-limbo/flang-TL-1/loopTest.f90
diff --git a/test/smoke-dev/flang-TP-0/Makefile b/test/smoke-limbo/flang-TP-0/Makefile
similarity index 100%
rename from test/smoke-dev/flang-TP-0/Makefile
rename to test/smoke-limbo/flang-TP-0/Makefile
diff --git a/test/smoke-dev/flang-TP-0/loopTest.f90 b/test/smoke-limbo/flang-TP-0/loopTest.f90
similarity index 100%
rename from test/smoke-dev/flang-TP-0/loopTest.f90
rename to test/smoke-limbo/flang-TP-0/loopTest.f90
diff --git a/test/smoke-dev/flang-TP-1/Makefile b/test/smoke-limbo/flang-TP-1/Makefile
similarity index 100%
rename from test/smoke-dev/flang-TP-1/Makefile
rename to test/smoke-limbo/flang-TP-1/Makefile
diff --git a/test/smoke-dev/flang-TP-1/loopTest.f90 b/test/smoke-limbo/flang-TP-1/loopTest.f90
similarity index 100%
rename from test/smoke-dev/flang-TP-1/loopTest.f90
rename to test/smoke-limbo/flang-TP-1/loopTest.f90
diff --git a/test/smoke-dev/flang-f90print/Makefile b/test/smoke-limbo/flang-f90print/Makefile
similarity index 100%
rename from test/smoke-dev/flang-f90print/Makefile
rename to test/smoke-limbo/flang-f90print/Makefile
diff --git a/test/smoke-dev/flang-f90print/flang-f90print.f90 b/test/smoke-limbo/flang-f90print/flang-f90print.f90
similarity index 100%
rename from test/smoke-dev/flang-f90print/flang-f90print.f90
rename to test/smoke-limbo/flang-f90print/flang-f90print.f90
diff --git a/test/smoke-dev/flang-loop0/Makefile b/test/smoke-limbo/flang-loop0/Makefile
similarity index 100%
rename from test/smoke-dev/flang-loop0/Makefile
rename to test/smoke-limbo/flang-loop0/Makefile
diff --git a/test/smoke-dev/flang-loop0/vmuln.f90 b/test/smoke-limbo/flang-loop0/vmuln.f90
similarity index 100%
rename from test/smoke-dev/flang-loop0/vmuln.f90
rename to test/smoke-limbo/flang-loop0/vmuln.f90
diff --git a/test/smoke-dev/flang_deviceio/Makefile b/test/smoke-limbo/flang_deviceio/Makefile
similarity index 100%
rename from test/smoke-dev/flang_deviceio/Makefile
rename to test/smoke-limbo/flang_deviceio/Makefile
diff --git a/test/smoke-dev/flang_deviceio/f90deviceio.example.f90 b/test/smoke-limbo/flang_deviceio/f90deviceio.example.f90
similarity index 100%
rename from test/smoke-dev/flang_deviceio/f90deviceio.example.f90
rename to test/smoke-limbo/flang_deviceio/f90deviceio.example.f90
diff --git a/test/smoke-dev/flang_deviceio/flang_deviceio.f90 b/test/smoke-limbo/flang_deviceio/flang_deviceio.f90
similarity index 100%
rename from test/smoke-dev/flang_deviceio/flang_deviceio.f90
rename to test/smoke-limbo/flang_deviceio/flang_deviceio.f90
diff --git a/test/smoke-dev/flang_real16_prob/Makefile b/test/smoke-limbo/flang_real16_prob/Makefile
similarity index 100%
rename from test/smoke-dev/flang_real16_prob/Makefile
rename to test/smoke-limbo/flang_real16_prob/Makefile
diff --git a/test/smoke-dev/flang_real16_prob/flang_real16_prob.f90 b/test/smoke-limbo/flang_real16_prob/flang_real16_prob.f90
similarity index 100%
rename from test/smoke-dev/flang_real16_prob/flang_real16_prob.f90
rename to test/smoke-limbo/flang_real16_prob/flang_real16_prob.f90
diff --git a/test/smoke-dev/hipreg_usm/Makefile b/test/smoke-limbo/hipreg_usm/Makefile
similarity index 100%
rename from test/smoke-dev/hipreg_usm/Makefile
rename to test/smoke-limbo/hipreg_usm/Makefile
diff --git a/test/smoke-dev/hipreg_usm/hip_hostreg.h b/test/smoke-limbo/hipreg_usm/hip_hostreg.h
similarity index 100%
rename from test/smoke-dev/hipreg_usm/hip_hostreg.h
rename to test/smoke-limbo/hipreg_usm/hip_hostreg.h
diff --git a/test/smoke-dev/hipreg_usm/hip_hostreg.hip b/test/smoke-limbo/hipreg_usm/hip_hostreg.hip
similarity index 100%
rename from test/smoke-dev/hipreg_usm/hip_hostreg.hip
rename to test/smoke-limbo/hipreg_usm/hip_hostreg.hip
diff --git a/test/smoke-dev/hipreg_usm/omp.cpp b/test/smoke-limbo/hipreg_usm/omp.cpp
similarity index 100%
rename from test/smoke-dev/hipreg_usm/omp.cpp
rename to test/smoke-limbo/hipreg_usm/omp.cpp
diff --git a/test/smoke-dev/launch_latency/Makefile b/test/smoke-limbo/launch_latency/Makefile
similarity index 100%
rename from test/smoke-dev/launch_latency/Makefile
rename to test/smoke-limbo/launch_latency/Makefile
diff --git a/test/smoke-dev/launch_latency/launch_latency.c b/test/smoke-limbo/launch_latency/launch_latency.c
similarity index 100%
rename from test/smoke-dev/launch_latency/launch_latency.c
rename to test/smoke-limbo/launch_latency/launch_latency.c
diff --git a/test/smoke-dev/launch_latency/printLatency.py b/test/smoke-limbo/launch_latency/printLatency.py
similarity index 100%
rename from test/smoke-dev/launch_latency/printLatency.py
rename to test/smoke-limbo/launch_latency/printLatency.py
diff --git a/test/smoke-dev/lib-debug/Makefile b/test/smoke-limbo/lib-debug/Makefile
similarity index 100%
rename from test/smoke-dev/lib-debug/Makefile
rename to test/smoke-limbo/lib-debug/Makefile
diff --git a/test/smoke-dev/lib-debug/lib-debug.c b/test/smoke-limbo/lib-debug/lib-debug.c
similarity index 100%
rename from test/smoke-dev/lib-debug/lib-debug.c
rename to test/smoke-limbo/lib-debug/lib-debug.c
diff --git a/test/smoke-limbo/link-missing-file/Makefile b/test/smoke-limbo/link-missing-file/Makefile
index 19d09a6589..d82ff2da99 100644
--- a/test/smoke-limbo/link-missing-file/Makefile
+++ b/test/smoke-limbo/link-missing-file/Makefile
@@ -12,6 +12,6 @@ TESTSRC_ALL = link-missing-file.c
# Since llvm-link would return a non-zero exit-code, use the dummy program to
# indicate 'success'.
RUNCMD = $(AOMP)/bin/llvm-link MissingFile.bc 2>&1 | \
- $(AOMP)/bin/FileCheck $(TESTSRC_ALL); ./$(TESTNAME)
+ $(FILECHECK) $(TESTSRC_ALL); ./$(TESTNAME)
include ../Makefile.rules
diff --git a/test/smoke-dev/mix_hipmemset_omp/Makefile b/test/smoke-limbo/mix_hipmemset_omp/Makefile
similarity index 100%
rename from test/smoke-dev/mix_hipmemset_omp/Makefile
rename to test/smoke-limbo/mix_hipmemset_omp/Makefile
diff --git a/test/smoke-dev/mix_hipmemset_omp/hip_memset.h b/test/smoke-limbo/mix_hipmemset_omp/hip_memset.h
similarity index 100%
rename from test/smoke-dev/mix_hipmemset_omp/hip_memset.h
rename to test/smoke-limbo/mix_hipmemset_omp/hip_memset.h
diff --git a/test/smoke-dev/mix_hipmemset_omp/hip_memset.hip b/test/smoke-limbo/mix_hipmemset_omp/hip_memset.hip
similarity index 100%
rename from test/smoke-dev/mix_hipmemset_omp/hip_memset.hip
rename to test/smoke-limbo/mix_hipmemset_omp/hip_memset.hip
diff --git a/test/smoke-dev/mix_hipmemset_omp/memset.cpp b/test/smoke-limbo/mix_hipmemset_omp/memset.cpp
similarity index 100%
rename from test/smoke-dev/mix_hipmemset_omp/memset.cpp
rename to test/smoke-limbo/mix_hipmemset_omp/memset.cpp
diff --git a/test/smoke-limbo/multi-sdma/Makefile b/test/smoke-limbo/multi-sdma/Makefile
index f6c7553b3a..dd67b69c0d 100644
--- a/test/smoke-limbo/multi-sdma/Makefile
+++ b/test/smoke-limbo/multi-sdma/Makefile
@@ -9,6 +9,8 @@ RUNENV = LIBOMPTARGET_AMDGPU_USE_MULTIPLE_SDMA_ENGINES=true
RUNENV += LIBOMPTARGET_DEBUG=1
RUNCMD = ./$(TESTNAME) 2>&1 | $(FILECHECK) $(TESTSRC_MAIN)
+UNSUPPORTED = gfx1151
+
CLANG ?= clang++
OMP_BIN = $(AOMP)/bin/$(CLANG)
CC = $(OMP_BIN) $(VERBOSE)
diff --git a/test/smoke-dev/no-loop-over-subscription/Makefile b/test/smoke-limbo/no-loop-over-subscription/Makefile
similarity index 100%
rename from test/smoke-dev/no-loop-over-subscription/Makefile
rename to test/smoke-limbo/no-loop-over-subscription/Makefile
diff --git a/test/smoke-dev/no-loop-over-subscription/no_loop_over_subscription.c b/test/smoke-limbo/no-loop-over-subscription/no_loop_over_subscription.c
similarity index 100%
rename from test/smoke-dev/no-loop-over-subscription/no_loop_over_subscription.c
rename to test/smoke-limbo/no-loop-over-subscription/no_loop_over_subscription.c
diff --git a/test/smoke-dev/occupancy-based-opt-big-jump-loop/Makefile b/test/smoke-limbo/occupancy-based-opt-big-jump-loop/Makefile
similarity index 100%
rename from test/smoke-dev/occupancy-based-opt-big-jump-loop/Makefile
rename to test/smoke-limbo/occupancy-based-opt-big-jump-loop/Makefile
diff --git a/test/smoke-dev/occupancy-based-opt-big-jump-loop/occupancy_based_opt_big_jump_loop.c b/test/smoke-limbo/occupancy-based-opt-big-jump-loop/occupancy_based_opt_big_jump_loop.c
similarity index 100%
rename from test/smoke-dev/occupancy-based-opt-big-jump-loop/occupancy_based_opt_big_jump_loop.c
rename to test/smoke-limbo/occupancy-based-opt-big-jump-loop/occupancy_based_opt_big_jump_loop.c
diff --git a/test/smoke-dev/occupancy-based-opt/Makefile b/test/smoke-limbo/occupancy-based-opt/Makefile
similarity index 100%
rename from test/smoke-dev/occupancy-based-opt/Makefile
rename to test/smoke-limbo/occupancy-based-opt/Makefile
diff --git a/test/smoke-dev/occupancy-based-opt/occupancy_based_opt.c b/test/smoke-limbo/occupancy-based-opt/occupancy_based_opt.c
similarity index 100%
rename from test/smoke-dev/occupancy-based-opt/occupancy_based_opt.c
rename to test/smoke-limbo/occupancy-based-opt/occupancy_based_opt.c
diff --git a/test/smoke-dev/omp_lock/Makefile b/test/smoke-limbo/omp_lock/Makefile
similarity index 100%
rename from test/smoke-dev/omp_lock/Makefile
rename to test/smoke-limbo/omp_lock/Makefile
diff --git a/test/smoke-dev/omp_lock/NRUN b/test/smoke-limbo/omp_lock/NRUN
similarity index 100%
rename from test/smoke-dev/omp_lock/NRUN
rename to test/smoke-limbo/omp_lock/NRUN
diff --git a/test/smoke-dev/omp_lock/omp_lock.c b/test/smoke-limbo/omp_lock/omp_lock.c
similarity index 100%
rename from test/smoke-dev/omp_lock/omp_lock.c
rename to test/smoke-limbo/omp_lock/omp_lock.c
diff --git a/test/smoke-dev/ompx-bare/Makefile b/test/smoke-limbo/ompx-bare/Makefile
similarity index 100%
rename from test/smoke-dev/ompx-bare/Makefile
rename to test/smoke-limbo/ompx-bare/Makefile
diff --git a/test/smoke-dev/ompx-bare/ompx_bare.c b/test/smoke-limbo/ompx-bare/ompx_bare.c
similarity index 88%
rename from test/smoke-dev/ompx-bare/ompx_bare.c
rename to test/smoke-limbo/ompx-bare/ompx_bare.c
index 2e7e070ebb..8beb60dc92 100644
--- a/test/smoke-dev/ompx-bare/ompx_bare.c
+++ b/test/smoke-limbo/ompx-bare/ompx_bare.c
@@ -1,8 +1,3 @@
-//
-// Copyright © Advanced Micro Devices, Inc., or its affiliates.
-//
-// SPDX-License-Identifier: MIT
-
// Check that the bare kernel has SGN 0, 64 teams, and 64 threads.
// Based on existing test offload/test/offloading/ompx_bare.c.
//
diff --git a/test/smoke-dev/red_bug_51/Makefile b/test/smoke-limbo/red_bug_51/Makefile
similarity index 100%
rename from test/smoke-dev/red_bug_51/Makefile
rename to test/smoke-limbo/red_bug_51/Makefile
diff --git a/test/smoke-dev/red_bug_51/red_bug_51.cpp b/test/smoke-limbo/red_bug_51/red_bug_51.cpp
similarity index 100%
rename from test/smoke-dev/red_bug_51/red_bug_51.cpp
rename to test/smoke-limbo/red_bug_51/red_bug_51.cpp
diff --git a/test/smoke-dev/reduction_team/Makefile b/test/smoke-limbo/reduction_team/Makefile
similarity index 100%
rename from test/smoke-dev/reduction_team/Makefile
rename to test/smoke-limbo/reduction_team/Makefile
diff --git a/test/smoke-dev/reduction_team/reduction_team.c b/test/smoke-limbo/reduction_team/reduction_team.c
similarity index 100%
rename from test/smoke-dev/reduction_team/reduction_team.c
rename to test/smoke-limbo/reduction_team/reduction_team.c
diff --git a/test/smoke-dev/reduction_teams/Makefile b/test/smoke-limbo/reduction_teams/Makefile
similarity index 100%
rename from test/smoke-dev/reduction_teams/Makefile
rename to test/smoke-limbo/reduction_teams/Makefile
diff --git a/test/smoke-dev/reduction_teams/NRUN b/test/smoke-limbo/reduction_teams/NRUN
similarity index 100%
rename from test/smoke-dev/reduction_teams/NRUN
rename to test/smoke-limbo/reduction_teams/NRUN
diff --git a/test/smoke-dev/reduction_teams/reduction_teams.c b/test/smoke-limbo/reduction_teams/reduction_teams.c
similarity index 100%
rename from test/smoke-dev/reduction_teams/reduction_teams.c
rename to test/smoke-limbo/reduction_teams/reduction_teams.c
diff --git a/test/smoke-dev/rt-memory-threshold-env/AMDGPUMemoryManager_threshold_env.c b/test/smoke-limbo/rt-memory-threshold-env/AMDGPUMemoryManager_threshold_env.c
similarity index 100%
rename from test/smoke-dev/rt-memory-threshold-env/AMDGPUMemoryManager_threshold_env.c
rename to test/smoke-limbo/rt-memory-threshold-env/AMDGPUMemoryManager_threshold_env.c
diff --git a/test/smoke-dev/rt-memory-threshold-env/Makefile b/test/smoke-limbo/rt-memory-threshold-env/Makefile
similarity index 100%
rename from test/smoke-dev/rt-memory-threshold-env/Makefile
rename to test/smoke-limbo/rt-memory-threshold-env/Makefile
diff --git a/test/smoke-dev/rt-tuning-envar/Makefile b/test/smoke-limbo/rt-tuning-envar/Makefile
similarity index 100%
rename from test/smoke-dev/rt-tuning-envar/Makefile
rename to test/smoke-limbo/rt-tuning-envar/Makefile
diff --git a/test/smoke-dev/rt-tuning-envar/rt_tuning_envar.c b/test/smoke-limbo/rt-tuning-envar/rt_tuning_envar.c
similarity index 100%
rename from test/smoke-dev/rt-tuning-envar/rt_tuning_envar.c
rename to test/smoke-limbo/rt-tuning-envar/rt_tuning_envar.c
diff --git a/test/smoke-dev/snap_red/Makefile b/test/smoke-limbo/snap_red/Makefile
similarity index 100%
rename from test/smoke-dev/snap_red/Makefile
rename to test/smoke-limbo/snap_red/Makefile
diff --git a/test/smoke-dev/snap_red/NRUN b/test/smoke-limbo/snap_red/NRUN
similarity index 100%
rename from test/smoke-dev/snap_red/NRUN
rename to test/smoke-limbo/snap_red/NRUN
diff --git a/test/smoke-dev/snap_red/snap_red.c b/test/smoke-limbo/snap_red/snap_red.c
similarity index 100%
rename from test/smoke-dev/snap_red/snap_red.c
rename to test/smoke-limbo/snap_red/snap_red.c
diff --git a/test/smoke-dev/swdev-461650/Makefile b/test/smoke-limbo/swdev-461650/Makefile
similarity index 100%
rename from test/smoke-dev/swdev-461650/Makefile
rename to test/smoke-limbo/swdev-461650/Makefile
diff --git a/test/smoke-dev/swdev-461650/swdev_461650.c b/test/smoke-limbo/swdev-461650/swdev_461650.c
similarity index 100%
rename from test/smoke-dev/swdev-461650/swdev_461650.c
rename to test/smoke-limbo/swdev-461650/swdev_461650.c
diff --git a/test/smoke-dev/test-offload-profile-envar/Makefile b/test/smoke-limbo/test-offload-profile-envar/Makefile
similarity index 100%
rename from test/smoke-dev/test-offload-profile-envar/Makefile
rename to test/smoke-limbo/test-offload-profile-envar/Makefile
diff --git a/test/smoke-dev/test-offload-profile-envar/veccopy.c b/test/smoke-limbo/test-offload-profile-envar/veccopy.c
similarity index 100%
rename from test/smoke-dev/test-offload-profile-envar/veccopy.c
rename to test/smoke-limbo/test-offload-profile-envar/veccopy.c
diff --git a/test/smoke-dev/usm-locals-pragma-xnack-disabled-xnack-any/Makefile b/test/smoke-limbo/usm-locals-pragma-xnack-disabled-xnack-any/Makefile
similarity index 100%
rename from test/smoke-dev/usm-locals-pragma-xnack-disabled-xnack-any/Makefile
rename to test/smoke-limbo/usm-locals-pragma-xnack-disabled-xnack-any/Makefile
diff --git a/test/smoke-dev/usm-locals-pragma-xnack-disabled-xnack-any/usm_locals.cpp b/test/smoke-limbo/usm-locals-pragma-xnack-disabled-xnack-any/usm_locals.cpp
similarity index 100%
rename from test/smoke-dev/usm-locals-pragma-xnack-disabled-xnack-any/usm_locals.cpp
rename to test/smoke-limbo/usm-locals-pragma-xnack-disabled-xnack-any/usm_locals.cpp
diff --git a/test/smoke-dev/usm-locals-pragma-xnack-disabled-xnack-minus/Makefile b/test/smoke-limbo/usm-locals-pragma-xnack-disabled-xnack-minus/Makefile
similarity index 100%
rename from test/smoke-dev/usm-locals-pragma-xnack-disabled-xnack-minus/Makefile
rename to test/smoke-limbo/usm-locals-pragma-xnack-disabled-xnack-minus/Makefile
diff --git a/test/smoke-dev/usm-locals-pragma-xnack-disabled-xnack-minus/usm_locals.cpp b/test/smoke-limbo/usm-locals-pragma-xnack-disabled-xnack-minus/usm_locals.cpp
similarity index 100%
rename from test/smoke-dev/usm-locals-pragma-xnack-disabled-xnack-minus/usm_locals.cpp
rename to test/smoke-limbo/usm-locals-pragma-xnack-disabled-xnack-minus/usm_locals.cpp
diff --git a/test/smoke-limbo/usm-locals-xnack-enabled-xnack-minus/Makefile b/test/smoke-limbo/usm-locals-xnack-enabled-xnack-minus/Makefile
index 16ffc4b251..720dcbeede 100644
--- a/test/smoke-limbo/usm-locals-xnack-enabled-xnack-minus/Makefile
+++ b/test/smoke-limbo/usm-locals-xnack-enabled-xnack-minus/Makefile
@@ -14,7 +14,7 @@ CLANG = clang++
OMP_BIN = $(AOMP)/bin/$(CLANG)
CC = $(OMP_BIN) $(VERBOSE)
-SUPPORTED = gfx90a,gfx940,gfx941,gfx942
+SUPPORTED = $(SUPPORTS_USM)
#-ccc-print-phases
#"-\#\#\#"
diff --git a/test/smoke-dev/veccopy-ompt-selective-tracing-dataop/Makefile b/test/smoke-limbo/veccopy-ompt-selective-tracing-dataop/Makefile
similarity index 100%
rename from test/smoke-dev/veccopy-ompt-selective-tracing-dataop/Makefile
rename to test/smoke-limbo/veccopy-ompt-selective-tracing-dataop/Makefile
diff --git a/test/smoke-dev/veccopy-ompt-selective-tracing-dataop/callbacks.h b/test/smoke-limbo/veccopy-ompt-selective-tracing-dataop/callbacks.h
similarity index 100%
rename from test/smoke-dev/veccopy-ompt-selective-tracing-dataop/callbacks.h
rename to test/smoke-limbo/veccopy-ompt-selective-tracing-dataop/callbacks.h
diff --git a/test/smoke-dev/veccopy-ompt-selective-tracing-dataop/veccopy_ompt_selective_tracing_dataop.cpp b/test/smoke-limbo/veccopy-ompt-selective-tracing-dataop/veccopy_ompt_selective_tracing_dataop.cpp
similarity index 100%
rename from test/smoke-dev/veccopy-ompt-selective-tracing-dataop/veccopy_ompt_selective_tracing_dataop.cpp
rename to test/smoke-limbo/veccopy-ompt-selective-tracing-dataop/veccopy_ompt_selective_tracing_dataop.cpp
diff --git a/test/smoke-dev/veccopy-ompt-selective-tracing-kernel/Makefile b/test/smoke-limbo/veccopy-ompt-selective-tracing-kernel/Makefile
similarity index 100%
rename from test/smoke-dev/veccopy-ompt-selective-tracing-kernel/Makefile
rename to test/smoke-limbo/veccopy-ompt-selective-tracing-kernel/Makefile
diff --git a/test/smoke-dev/veccopy-ompt-selective-tracing-kernel/callbacks.h b/test/smoke-limbo/veccopy-ompt-selective-tracing-kernel/callbacks.h
similarity index 100%
rename from test/smoke-dev/veccopy-ompt-selective-tracing-kernel/callbacks.h
rename to test/smoke-limbo/veccopy-ompt-selective-tracing-kernel/callbacks.h
diff --git a/test/smoke-dev/veccopy-ompt-selective-tracing-kernel/veccopy_ompt_selective_tracing_kernel.cpp b/test/smoke-limbo/veccopy-ompt-selective-tracing-kernel/veccopy_ompt_selective_tracing_kernel.cpp
similarity index 100%
rename from test/smoke-dev/veccopy-ompt-selective-tracing-kernel/veccopy_ompt_selective_tracing_kernel.cpp
rename to test/smoke-limbo/veccopy-ompt-selective-tracing-kernel/veccopy_ompt_selective_tracing_kernel.cpp
diff --git a/test/smoke-dev/veccopy-ompt-target-emi-tracing-dag/Makefile b/test/smoke-limbo/veccopy-ompt-target-emi-tracing-dag/Makefile
similarity index 100%
rename from test/smoke-dev/veccopy-ompt-target-emi-tracing-dag/Makefile
rename to test/smoke-limbo/veccopy-ompt-target-emi-tracing-dag/Makefile
diff --git a/test/smoke-dev/veccopy-ompt-target-emi-tracing-dag/callbacks.h b/test/smoke-limbo/veccopy-ompt-target-emi-tracing-dag/callbacks.h
similarity index 100%
rename from test/smoke-dev/veccopy-ompt-target-emi-tracing-dag/callbacks.h
rename to test/smoke-limbo/veccopy-ompt-target-emi-tracing-dag/callbacks.h
diff --git a/test/smoke-dev/veccopy-ompt-target-emi-tracing-dag/veccopy-ompt-target-emi-tracing-dag.cpp b/test/smoke-limbo/veccopy-ompt-target-emi-tracing-dag/veccopy-ompt-target-emi-tracing-dag.cpp
similarity index 100%
rename from test/smoke-dev/veccopy-ompt-target-emi-tracing-dag/veccopy-ompt-target-emi-tracing-dag.cpp
rename to test/smoke-limbo/veccopy-ompt-target-emi-tracing-dag/veccopy-ompt-target-emi-tracing-dag.cpp
diff --git a/test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-api-use/Makefile b/test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-api-use/Makefile
similarity index 100%
rename from test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-api-use/Makefile
rename to test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-api-use/Makefile
diff --git a/test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-api-use/callbacks.h b/test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-api-use/callbacks.h
similarity index 100%
rename from test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-api-use/callbacks.h
rename to test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-api-use/callbacks.h
diff --git a/test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-api-use/veccopy-ompt-target-emi-tracing.cpp b/test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-api-use/veccopy-ompt-target-emi-tracing.cpp
similarity index 98%
rename from test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-api-use/veccopy-ompt-target-emi-tracing.cpp
rename to test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-api-use/veccopy-ompt-target-emi-tracing.cpp
index 8c3d279206..4827b27eb7 100644
--- a/test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-api-use/veccopy-ompt-target-emi-tracing.cpp
+++ b/test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-api-use/veccopy-ompt-target-emi-tracing.cpp
@@ -86,6 +86,7 @@ int main() {
/// CHECK-DAG: rec=
/// CHECK-DAG: rec=
/// CHECK-DAG: rec=
+/// CHECK-DAG: rec=
/// CHECK-NOT: rec=
/// CHECK-DAG: Success
diff --git a/test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-buffer-full/Makefile b/test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-buffer-full/Makefile
similarity index 100%
rename from test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-buffer-full/Makefile
rename to test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-buffer-full/Makefile
diff --git a/test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-buffer-full/callbacks.h b/test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-buffer-full/callbacks.h
similarity index 100%
rename from test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-buffer-full/callbacks.h
rename to test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-buffer-full/callbacks.h
diff --git a/test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-buffer-full/veccopy-ompt-target-emi-tracing.cpp b/test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-buffer-full/veccopy-ompt-target-emi-tracing.cpp
similarity index 100%
rename from test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-buffer-full/veccopy-ompt-target-emi-tracing.cpp
rename to test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-buffer-full/veccopy-ompt-target-emi-tracing.cpp
diff --git a/test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-shutdown/Makefile b/test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-shutdown/Makefile
similarity index 100%
rename from test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-shutdown/Makefile
rename to test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-shutdown/Makefile
diff --git a/test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-shutdown/callbacks.h b/test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-shutdown/callbacks.h
similarity index 100%
rename from test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-shutdown/callbacks.h
rename to test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-shutdown/callbacks.h
diff --git a/test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-shutdown/veccopy-ompt-target-emi-tracing.cpp b/test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-shutdown/veccopy-ompt-target-emi-tracing.cpp
similarity index 98%
rename from test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-shutdown/veccopy-ompt-target-emi-tracing.cpp
rename to test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-shutdown/veccopy-ompt-target-emi-tracing.cpp
index 7c1a062f09..67e3fc7942 100644
--- a/test/smoke-dev/veccopy-ompt-target-tracing-flush-only-on-shutdown/veccopy-ompt-target-emi-tracing.cpp
+++ b/test/smoke-limbo/veccopy-ompt-target-tracing-flush-only-on-shutdown/veccopy-ompt-target-emi-tracing.cpp
@@ -79,6 +79,7 @@ int main() {
/// CHECK-DAG: rec=
/// CHECK-DAG: rec=
/// CHECK-DAG: rec=
+/// CHECK-DAG: rec=
/// CHECK-NOT: rec=
/// CHECK-NOT: host_op_id=0x0
diff --git a/test/smoke-dev/veccopy-shared-ctor-1/Makefile b/test/smoke-limbo/veccopy-shared-ctor-1/Makefile
similarity index 100%
rename from test/smoke-dev/veccopy-shared-ctor-1/Makefile
rename to test/smoke-limbo/veccopy-shared-ctor-1/Makefile
diff --git a/test/smoke-dev/veccopy-shared-ctor-1/veccopy-ctor-1.cpp b/test/smoke-limbo/veccopy-shared-ctor-1/veccopy-ctor-1.cpp
similarity index 100%
rename from test/smoke-dev/veccopy-shared-ctor-1/veccopy-ctor-1.cpp
rename to test/smoke-limbo/veccopy-shared-ctor-1/veccopy-ctor-1.cpp
diff --git a/test/smoke-dev/veccopy-shared-ctor-1/veccopy.cpp b/test/smoke-limbo/veccopy-shared-ctor-1/veccopy.cpp
similarity index 100%
rename from test/smoke-dev/veccopy-shared-ctor-1/veccopy.cpp
rename to test/smoke-limbo/veccopy-shared-ctor-1/veccopy.cpp
diff --git a/test/smoke-dev/veccopy-shared-ompt-ctor-1/Makefile b/test/smoke-limbo/veccopy-shared-ompt-ctor-1/Makefile
similarity index 100%
rename from test/smoke-dev/veccopy-shared-ompt-ctor-1/Makefile
rename to test/smoke-limbo/veccopy-shared-ompt-ctor-1/Makefile
diff --git a/test/smoke-dev/veccopy-shared-ompt-ctor-1/callbacks.h b/test/smoke-limbo/veccopy-shared-ompt-ctor-1/callbacks.h
similarity index 100%
rename from test/smoke-dev/veccopy-shared-ompt-ctor-1/callbacks.h
rename to test/smoke-limbo/veccopy-shared-ompt-ctor-1/callbacks.h
diff --git a/test/smoke-dev/veccopy-shared-ompt-ctor-1/veccopy-ctor-1.cpp b/test/smoke-limbo/veccopy-shared-ompt-ctor-1/veccopy-ctor-1.cpp
similarity index 100%
rename from test/smoke-dev/veccopy-shared-ompt-ctor-1/veccopy-ctor-1.cpp
rename to test/smoke-limbo/veccopy-shared-ompt-ctor-1/veccopy-ctor-1.cpp
diff --git a/test/smoke-dev/veccopy-shared-ompt-ctor-1/veccopy.cpp b/test/smoke-limbo/veccopy-shared-ompt-ctor-1/veccopy.cpp
similarity index 100%
rename from test/smoke-dev/veccopy-shared-ompt-ctor-1/veccopy.cpp
rename to test/smoke-limbo/veccopy-shared-ompt-ctor-1/veccopy.cpp
diff --git a/test/smoke-dev/vmulsum-hsa-stats/Makefile b/test/smoke-limbo/vmulsum-hsa-stats/Makefile
similarity index 100%
rename from test/smoke-dev/vmulsum-hsa-stats/Makefile
rename to test/smoke-limbo/vmulsum-hsa-stats/Makefile
diff --git a/test/smoke-dev/vmulsum-hsa-stats/README b/test/smoke-limbo/vmulsum-hsa-stats/README
similarity index 100%
rename from test/smoke-dev/vmulsum-hsa-stats/README
rename to test/smoke-limbo/vmulsum-hsa-stats/README
diff --git a/test/smoke-dev/vmulsum-hsa-stats/main.c b/test/smoke-limbo/vmulsum-hsa-stats/main.c
similarity index 100%
rename from test/smoke-dev/vmulsum-hsa-stats/main.c
rename to test/smoke-limbo/vmulsum-hsa-stats/main.c
diff --git a/test/smoke-dev/vmulsum-hsa-stats/onesrc.c b/test/smoke-limbo/vmulsum-hsa-stats/onesrc.c
similarity index 100%
rename from test/smoke-dev/vmulsum-hsa-stats/onesrc.c
rename to test/smoke-limbo/vmulsum-hsa-stats/onesrc.c
diff --git a/test/smoke-dev/vmulsum-hsa-stats/vmul.c b/test/smoke-limbo/vmulsum-hsa-stats/vmul.c
similarity index 100%
rename from test/smoke-dev/vmulsum-hsa-stats/vmul.c
rename to test/smoke-limbo/vmulsum-hsa-stats/vmul.c
diff --git a/test/smoke-dev/vmulsum-hsa-stats/vsum.c b/test/smoke-limbo/vmulsum-hsa-stats/vsum.c
similarity index 100%
rename from test/smoke-dev/vmulsum-hsa-stats/vsum.c
rename to test/smoke-limbo/vmulsum-hsa-stats/vsum.c
diff --git a/test/smoke-dev/xteam-red-4/Makefile b/test/smoke-limbo/xteam-red-4/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-4/Makefile
rename to test/smoke-limbo/xteam-red-4/Makefile
diff --git a/test/smoke-dev/xteam-red-4/xteam_red_4.c b/test/smoke-limbo/xteam-red-4/xteam_red_4.c
similarity index 100%
rename from test/smoke-dev/xteam-red-4/xteam_red_4.c
rename to test/smoke-limbo/xteam-red-4/xteam_red_4.c
diff --git a/test/smoke-dev/xteam-red-callee-default-option/Makefile b/test/smoke-limbo/xteam-red-callee-default-option/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-callee-default-option/Makefile
rename to test/smoke-limbo/xteam-red-callee-default-option/Makefile
diff --git a/test/smoke-dev/xteam-red-callee-default-option/xteam_red_callee.cpp b/test/smoke-limbo/xteam-red-callee-default-option/xteam_red_callee.cpp
similarity index 100%
rename from test/smoke-dev/xteam-red-callee-default-option/xteam_red_callee.cpp
rename to test/smoke-limbo/xteam-red-callee-default-option/xteam_red_callee.cpp
diff --git a/test/smoke-dev/xteam-red-callee-ptr/Makefile b/test/smoke-limbo/xteam-red-callee-ptr/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-callee-ptr/Makefile
rename to test/smoke-limbo/xteam-red-callee-ptr/Makefile
diff --git a/test/smoke-dev/xteam-red-callee-ptr/xteam_red_callee.cpp b/test/smoke-limbo/xteam-red-callee-ptr/xteam_red_callee.cpp
similarity index 100%
rename from test/smoke-dev/xteam-red-callee-ptr/xteam_red_callee.cpp
rename to test/smoke-limbo/xteam-red-callee-ptr/xteam_red_callee.cpp
diff --git a/test/smoke-dev/xteam-red-callee/Makefile b/test/smoke-limbo/xteam-red-callee/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-callee/Makefile
rename to test/smoke-limbo/xteam-red-callee/Makefile
diff --git a/test/smoke-dev/xteam-red-callee/xteam_red_callee.cpp b/test/smoke-limbo/xteam-red-callee/xteam_red_callee.cpp
similarity index 100%
rename from test/smoke-dev/xteam-red-callee/xteam_red_callee.cpp
rename to test/smoke-limbo/xteam-red-callee/xteam_red_callee.cpp
diff --git a/test/smoke-dev/xteam-red-cmdline-default-option/Makefile b/test/smoke-limbo/xteam-red-cmdline-default-option/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-cmdline-default-option/Makefile
rename to test/smoke-limbo/xteam-red-cmdline-default-option/Makefile
diff --git a/test/smoke-dev/xteam-red-cmdline-default-option/xteam_red_cmdline_option1.c b/test/smoke-limbo/xteam-red-cmdline-default-option/xteam_red_cmdline_option1.c
similarity index 100%
rename from test/smoke-dev/xteam-red-cmdline-default-option/xteam_red_cmdline_option1.c
rename to test/smoke-limbo/xteam-red-cmdline-default-option/xteam_red_cmdline_option1.c
diff --git a/test/smoke-dev/xteam-red-collapse-default-option/Makefile b/test/smoke-limbo/xteam-red-collapse-default-option/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-collapse-default-option/Makefile
rename to test/smoke-limbo/xteam-red-collapse-default-option/Makefile
diff --git a/test/smoke-dev/xteam-red-collapse-default-option/xteam_red_collapse.c b/test/smoke-limbo/xteam-red-collapse-default-option/xteam_red_collapse.c
similarity index 100%
rename from test/smoke-dev/xteam-red-collapse-default-option/xteam_red_collapse.c
rename to test/smoke-limbo/xteam-red-collapse-default-option/xteam_red_collapse.c
diff --git a/test/smoke-dev/xteam-red-collapse/Makefile b/test/smoke-limbo/xteam-red-collapse/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-collapse/Makefile
rename to test/smoke-limbo/xteam-red-collapse/Makefile
diff --git a/test/smoke-dev/xteam-red-collapse/xteam_red_collapse.c b/test/smoke-limbo/xteam-red-collapse/xteam_red_collapse.c
similarity index 100%
rename from test/smoke-dev/xteam-red-collapse/xteam_red_collapse.c
rename to test/smoke-limbo/xteam-red-collapse/xteam_red_collapse.c
diff --git a/test/smoke-dev/xteam-red-debug-info/Makefile b/test/smoke-limbo/xteam-red-debug-info/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-debug-info/Makefile
rename to test/smoke-limbo/xteam-red-debug-info/Makefile
diff --git a/test/smoke-dev/xteam-red-debug-info/xteam_red_debug_info.c b/test/smoke-limbo/xteam-red-debug-info/xteam_red_debug_info.c
similarity index 100%
rename from test/smoke-dev/xteam-red-debug-info/xteam_red_debug_info.c
rename to test/smoke-limbo/xteam-red-debug-info/xteam_red_debug_info.c
diff --git a/test/smoke-dev/xteam-red-default-option-1-g/Makefile b/test/smoke-limbo/xteam-red-default-option-1-g/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-default-option-1-g/Makefile
rename to test/smoke-limbo/xteam-red-default-option-1-g/Makefile
diff --git a/test/smoke-dev/xteam-red-default-option-1-g/xteam_red_1_g.c b/test/smoke-limbo/xteam-red-default-option-1-g/xteam_red_1_g.c
similarity index 100%
rename from test/smoke-dev/xteam-red-default-option-1-g/xteam_red_1_g.c
rename to test/smoke-limbo/xteam-red-default-option-1-g/xteam_red_1_g.c
diff --git a/test/smoke-dev/xteam-red-default-option-1/Makefile b/test/smoke-limbo/xteam-red-default-option-1/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-default-option-1/Makefile
rename to test/smoke-limbo/xteam-red-default-option-1/Makefile
diff --git a/test/smoke-dev/xteam-red-default-option-1/xteam_red_1.c b/test/smoke-limbo/xteam-red-default-option-1/xteam_red_1.c
similarity index 100%
rename from test/smoke-dev/xteam-red-default-option-1/xteam_red_1.c
rename to test/smoke-limbo/xteam-red-default-option-1/xteam_red_1.c
diff --git a/test/smoke-dev/xteam-red-fast-default-option/Makefile b/test/smoke-limbo/xteam-red-fast-default-option/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-fast-default-option/Makefile
rename to test/smoke-limbo/xteam-red-fast-default-option/Makefile
diff --git a/test/smoke-dev/xteam-red-fast-default-option/xteam_red_fast_1.c b/test/smoke-limbo/xteam-red-fast-default-option/xteam_red_fast_1.c
similarity index 100%
rename from test/smoke-dev/xteam-red-fast-default-option/xteam_red_fast_1.c
rename to test/smoke-limbo/xteam-red-fast-default-option/xteam_red_fast_1.c
diff --git a/test/smoke-dev/xteam-red-incr-default-option/Makefile b/test/smoke-limbo/xteam-red-incr-default-option/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-incr-default-option/Makefile
rename to test/smoke-limbo/xteam-red-incr-default-option/Makefile
diff --git a/test/smoke-dev/xteam-red-incr-default-option/xteam_red_incr.c b/test/smoke-limbo/xteam-red-incr-default-option/xteam_red_incr.c
similarity index 100%
rename from test/smoke-dev/xteam-red-incr-default-option/xteam_red_incr.c
rename to test/smoke-limbo/xteam-red-incr-default-option/xteam_red_incr.c
diff --git a/test/smoke-dev/xteam-red-incr/Makefile b/test/smoke-limbo/xteam-red-incr/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-incr/Makefile
rename to test/smoke-limbo/xteam-red-incr/Makefile
diff --git a/test/smoke-dev/xteam-red-incr/xteam_red_incr.c b/test/smoke-limbo/xteam-red-incr/xteam_red_incr.c
similarity index 100%
rename from test/smoke-dev/xteam-red-incr/xteam_red_incr.c
rename to test/smoke-limbo/xteam-red-incr/xteam_red_incr.c
diff --git a/test/smoke-dev/xteam-red-inner-simd-reduction/Makefile b/test/smoke-limbo/xteam-red-inner-simd-reduction/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-inner-simd-reduction/Makefile
rename to test/smoke-limbo/xteam-red-inner-simd-reduction/Makefile
diff --git a/test/smoke-dev/xteam-red-inner-simd-reduction/xteam_red_inner_simd_reduction.c b/test/smoke-limbo/xteam-red-inner-simd-reduction/xteam_red_inner_simd_reduction.c
similarity index 100%
rename from test/smoke-dev/xteam-red-inner-simd-reduction/xteam_red_inner_simd_reduction.c
rename to test/smoke-limbo/xteam-red-inner-simd-reduction/xteam_red_inner_simd_reduction.c
diff --git a/test/smoke-dev/xteam-red-min-max-builtin/Makefile b/test/smoke-limbo/xteam-red-min-max-builtin/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-min-max-builtin/Makefile
rename to test/smoke-limbo/xteam-red-min-max-builtin/Makefile
diff --git a/test/smoke-dev/xteam-red-min-max-builtin/xteam-red-min-max-builtin.cpp b/test/smoke-limbo/xteam-red-min-max-builtin/xteam-red-min-max-builtin.cpp
similarity index 100%
rename from test/smoke-dev/xteam-red-min-max-builtin/xteam-red-min-max-builtin.cpp
rename to test/smoke-limbo/xteam-red-min-max-builtin/xteam-red-min-max-builtin.cpp
diff --git a/test/smoke-dev/xteam-red-min-max-callee/Makefile b/test/smoke-limbo/xteam-red-min-max-callee/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-min-max-callee/Makefile
rename to test/smoke-limbo/xteam-red-min-max-callee/Makefile
diff --git a/test/smoke-dev/xteam-red-min-max-callee/xteam_red_min_max_callee.cpp b/test/smoke-limbo/xteam-red-min-max-callee/xteam_red_min_max_callee.cpp
similarity index 100%
rename from test/smoke-dev/xteam-red-min-max-callee/xteam_red_min_max_callee.cpp
rename to test/smoke-limbo/xteam-red-min-max-callee/xteam_red_min_max_callee.cpp
diff --git a/test/smoke-dev/xteam-red-min-max-calls-target-fast/Makefile b/test/smoke-limbo/xteam-red-min-max-calls-target-fast/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-min-max-calls-target-fast/Makefile
rename to test/smoke-limbo/xteam-red-min-max-calls-target-fast/Makefile
diff --git a/test/smoke-dev/xteam-red-min-max-calls-target-fast/xteam-red-min-max-calls.c b/test/smoke-limbo/xteam-red-min-max-calls-target-fast/xteam-red-min-max-calls.c
similarity index 94%
rename from test/smoke-dev/xteam-red-min-max-calls-target-fast/xteam-red-min-max-calls.c
rename to test/smoke-limbo/xteam-red-min-max-calls-target-fast/xteam-red-min-max-calls.c
index 267a15b0fa..d28d2b13db 100644
--- a/test/smoke-dev/xteam-red-min-max-calls-target-fast/xteam-red-min-max-calls.c
+++ b/test/smoke-limbo/xteam-red-min-max-calls-target-fast/xteam-red-min-max-calls.c
@@ -1,7 +1,4 @@
-/* Copyright © Advanced Micro Devices, Inc., or its affiliates.
- *
- * SPDX-License-Identifier: MIT
- *
+/*
* Test min/max reduction using fmin/fmax with unrelated calls in
* the kernels. Compile using -fopenmp-target-fast, that will enable
* Xteam reduction even with calls inside.
diff --git a/test/smoke-dev/xteam-red-min-max-calls/Makefile b/test/smoke-limbo/xteam-red-min-max-calls/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-min-max-calls/Makefile
rename to test/smoke-limbo/xteam-red-min-max-calls/Makefile
diff --git a/test/smoke-dev/xteam-red-min-max-calls/xteam-red-min-max-calls.c b/test/smoke-limbo/xteam-red-min-max-calls/xteam-red-min-max-calls.c
similarity index 95%
rename from test/smoke-dev/xteam-red-min-max-calls/xteam-red-min-max-calls.c
rename to test/smoke-limbo/xteam-red-min-max-calls/xteam-red-min-max-calls.c
index 47b867dcf8..7103bde291 100644
--- a/test/smoke-dev/xteam-red-min-max-calls/xteam-red-min-max-calls.c
+++ b/test/smoke-limbo/xteam-red-min-max-calls/xteam-red-min-max-calls.c
@@ -1,7 +1,4 @@
-/* Copyright © Advanced Micro Devices, Inc., or its affiliates.
- *
- * SPDX-License-Identifier: MIT
- *
+/*
* Test min/max reduction using fmin/fmax with unrelated calls in
* the kernels. Compile using -O3. fabs is not yet recognized as a
* math function by specialized kernel analysis in clang and
diff --git a/test/smoke-dev/xteam-red-min-max-fast-reduction/Makefile b/test/smoke-limbo/xteam-red-min-max-fast-reduction/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-min-max-fast-reduction/Makefile
rename to test/smoke-limbo/xteam-red-min-max-fast-reduction/Makefile
diff --git a/test/smoke-dev/xteam-red-min-max-fast-reduction/xteam-red-min-max-fast-reduction.c b/test/smoke-limbo/xteam-red-min-max-fast-reduction/xteam-red-min-max-fast-reduction.c
similarity index 100%
rename from test/smoke-dev/xteam-red-min-max-fast-reduction/xteam-red-min-max-fast-reduction.c
rename to test/smoke-limbo/xteam-red-min-max-fast-reduction/xteam-red-min-max-fast-reduction.c
diff --git a/test/smoke-dev/xteam-red-min-max-float/Makefile b/test/smoke-limbo/xteam-red-min-max-float/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-min-max-float/Makefile
rename to test/smoke-limbo/xteam-red-min-max-float/Makefile
diff --git a/test/smoke-dev/xteam-red-min-max-float/xteam-red-min-max-float.c b/test/smoke-limbo/xteam-red-min-max-float/xteam-red-min-max-float.c
similarity index 100%
rename from test/smoke-dev/xteam-red-min-max-float/xteam-red-min-max-float.c
rename to test/smoke-limbo/xteam-red-min-max-float/xteam-red-min-max-float.c
diff --git a/test/smoke-dev/xteam-red-min-max-nested/Makefile b/test/smoke-limbo/xteam-red-min-max-nested/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-min-max-nested/Makefile
rename to test/smoke-limbo/xteam-red-min-max-nested/Makefile
diff --git a/test/smoke-dev/xteam-red-min-max-nested/xteam-red-min-max-nested.c b/test/smoke-limbo/xteam-red-min-max-nested/xteam-red-min-max-nested.c
similarity index 100%
rename from test/smoke-dev/xteam-red-min-max-nested/xteam-red-min-max-nested.c
rename to test/smoke-limbo/xteam-red-min-max-nested/xteam-red-min-max-nested.c
diff --git a/test/smoke-dev/xteam-red-min-max-small-precision-builtin/Makefile b/test/smoke-limbo/xteam-red-min-max-small-precision-builtin/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-min-max-small-precision-builtin/Makefile
rename to test/smoke-limbo/xteam-red-min-max-small-precision-builtin/Makefile
diff --git a/test/smoke-dev/xteam-red-min-max-small-precision-builtin/xteam-red-min-max-small-precision-builtin.c b/test/smoke-limbo/xteam-red-min-max-small-precision-builtin/xteam-red-min-max-small-precision-builtin.c
similarity index 91%
rename from test/smoke-dev/xteam-red-min-max-small-precision-builtin/xteam-red-min-max-small-precision-builtin.c
rename to test/smoke-limbo/xteam-red-min-max-small-precision-builtin/xteam-red-min-max-small-precision-builtin.c
index 4ee0a52d35..fc752f8756 100644
--- a/test/smoke-dev/xteam-red-min-max-small-precision-builtin/xteam-red-min-max-small-precision-builtin.c
+++ b/test/smoke-limbo/xteam-red-min-max-small-precision-builtin/xteam-red-min-max-small-precision-builtin.c
@@ -1,7 +1,3 @@
-// Copyright © Advanced Micro Devices, Inc., or its affiliates.
-//
-// SPDX-License-Identifier: MIT
-
#include
#include
@@ -65,4 +61,4 @@ int main() {
/// CHECK: DEVID:[[S:[ ]*]][[DEVID:[0-9]+]] SGN:8
/// CHECK: DEVID:[[S:[ ]*]][[DEVID:[0-9]+]] SGN:8
/// CHECK: DEVID:[[S:[ ]*]][[DEVID:[0-9]+]] SGN:8
-/// CHECK: DEVID:[[S:[ ]*]][[DEVID:[0-9]+]] SGN:8
+/// CHECK: DEVID:[[S:[ ]*]][[DEVID:[0-9]+]] SGN:8
\ No newline at end of file
diff --git a/test/smoke-dev/xteam-red-min-max-small-precision/Makefile b/test/smoke-limbo/xteam-red-min-max-small-precision/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-min-max-small-precision/Makefile
rename to test/smoke-limbo/xteam-red-min-max-small-precision/Makefile
diff --git a/test/smoke-dev/xteam-red-min-max-small-precision/xteam-red-min-max-small-precision.c b/test/smoke-limbo/xteam-red-min-max-small-precision/xteam-red-min-max-small-precision.c
similarity index 91%
rename from test/smoke-dev/xteam-red-min-max-small-precision/xteam-red-min-max-small-precision.c
rename to test/smoke-limbo/xteam-red-min-max-small-precision/xteam-red-min-max-small-precision.c
index ce0cc8260e..96e03e02a8 100644
--- a/test/smoke-dev/xteam-red-min-max-small-precision/xteam-red-min-max-small-precision.c
+++ b/test/smoke-limbo/xteam-red-min-max-small-precision/xteam-red-min-max-small-precision.c
@@ -1,7 +1,3 @@
-// Copyright © Advanced Micro Devices, Inc., or its affiliates.
-//
-// SPDX-License-Identifier: MIT
-
#include
#include
#include
@@ -66,4 +62,4 @@ int main() {
/// CHECK: DEVID:[[S:[ ]*]][[DEVID:[0-9]+]] SGN:8
/// CHECK: DEVID:[[S:[ ]*]][[DEVID:[0-9]+]] SGN:8
/// CHECK: DEVID:[[S:[ ]*]][[DEVID:[0-9]+]] SGN:8
-/// CHECK: DEVID:[[S:[ ]*]][[DEVID:[0-9]+]] SGN:8
+/// CHECK: DEVID:[[S:[ ]*]][[DEVID:[0-9]+]] SGN:8
\ No newline at end of file
diff --git a/test/smoke-dev/xteam-red-min-max-std/Makefile b/test/smoke-limbo/xteam-red-min-max-std/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-min-max-std/Makefile
rename to test/smoke-limbo/xteam-red-min-max-std/Makefile
diff --git a/test/smoke-dev/xteam-red-min-max-std/xteam-red-min-max-std.cpp b/test/smoke-limbo/xteam-red-min-max-std/xteam-red-min-max-std.cpp
similarity index 95%
rename from test/smoke-dev/xteam-red-min-max-std/xteam-red-min-max-std.cpp
rename to test/smoke-limbo/xteam-red-min-max-std/xteam-red-min-max-std.cpp
index 2f7204b4ad..b7531038f1 100644
--- a/test/smoke-dev/xteam-red-min-max-std/xteam-red-min-max-std.cpp
+++ b/test/smoke-limbo/xteam-red-min-max-std/xteam-red-min-max-std.cpp
@@ -1,7 +1,3 @@
-// Copyright © Advanced Micro Devices, Inc., or its affiliates.
-//
-// SPDX-License-Identifier: MIT
-
#include
#include
#include
diff --git a/test/smoke-dev/xteam-red-min-max/Makefile b/test/smoke-limbo/xteam-red-min-max/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-min-max/Makefile
rename to test/smoke-limbo/xteam-red-min-max/Makefile
diff --git a/test/smoke-dev/xteam-red-min-max/xteam-red-min-max.cpp b/test/smoke-limbo/xteam-red-min-max/xteam-red-min-max.cpp
similarity index 100%
rename from test/smoke-dev/xteam-red-min-max/xteam-red-min-max.cpp
rename to test/smoke-limbo/xteam-red-min-max/xteam-red-min-max.cpp
diff --git a/test/smoke-dev/xteam-red-ptr/Makefile b/test/smoke-limbo/xteam-red-ptr/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-ptr/Makefile
rename to test/smoke-limbo/xteam-red-ptr/Makefile
diff --git a/test/smoke-dev/xteam-red-ptr/xteam-red-ptr.cpp b/test/smoke-limbo/xteam-red-ptr/xteam-red-ptr.cpp
similarity index 100%
rename from test/smoke-dev/xteam-red-ptr/xteam-red-ptr.cpp
rename to test/smoke-limbo/xteam-red-ptr/xteam-red-ptr.cpp
diff --git a/test/smoke-dev/xteam-red-reference/Makefile b/test/smoke-limbo/xteam-red-reference/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-reference/Makefile
rename to test/smoke-limbo/xteam-red-reference/Makefile
diff --git a/test/smoke-dev/xteam-red-reference/xteam-red-reference.cpp b/test/smoke-limbo/xteam-red-reference/xteam-red-reference.cpp
similarity index 100%
rename from test/smoke-dev/xteam-red-reference/xteam-red-reference.cpp
rename to test/smoke-limbo/xteam-red-reference/xteam-red-reference.cpp
diff --git a/test/smoke-dev/xteam-red-sched-default-option/Makefile b/test/smoke-limbo/xteam-red-sched-default-option/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-sched-default-option/Makefile
rename to test/smoke-limbo/xteam-red-sched-default-option/Makefile
diff --git a/test/smoke-dev/xteam-red-sched-default-option/xteam_red_sched.c b/test/smoke-limbo/xteam-red-sched-default-option/xteam_red_sched.c
similarity index 100%
rename from test/smoke-dev/xteam-red-sched-default-option/xteam_red_sched.c
rename to test/smoke-limbo/xteam-red-sched-default-option/xteam_red_sched.c
diff --git a/test/smoke-dev/xteam-red-small-precision/Makefile b/test/smoke-limbo/xteam-red-small-precision/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-small-precision/Makefile
rename to test/smoke-limbo/xteam-red-small-precision/Makefile
diff --git a/test/smoke-dev/xteam-red-small-precision/xteam_red_small_precision.c b/test/smoke-limbo/xteam-red-small-precision/xteam_red_small_precision.c
similarity index 100%
rename from test/smoke-dev/xteam-red-small-precision/xteam_red_small_precision.c
rename to test/smoke-limbo/xteam-red-small-precision/xteam_red_small_precision.c
diff --git a/test/smoke-dev/xteam-red-split-1/Makefile b/test/smoke-limbo/xteam-red-split-1/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-split-1/Makefile
rename to test/smoke-limbo/xteam-red-split-1/Makefile
diff --git a/test/smoke-dev/xteam-red-split-1/xteam_red_split_1.c b/test/smoke-limbo/xteam-red-split-1/xteam_red_split_1.c
similarity index 100%
rename from test/smoke-dev/xteam-red-split-1/xteam_red_split_1.c
rename to test/smoke-limbo/xteam-red-split-1/xteam_red_split_1.c
diff --git a/test/smoke-dev/xteam-red-split-collapse-default-option/Makefile b/test/smoke-limbo/xteam-red-split-collapse-default-option/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-split-collapse-default-option/Makefile
rename to test/smoke-limbo/xteam-red-split-collapse-default-option/Makefile
diff --git a/test/smoke-dev/xteam-red-split-collapse-default-option/xteam_red_split_collapse.c b/test/smoke-limbo/xteam-red-split-collapse-default-option/xteam_red_split_collapse.c
similarity index 100%
rename from test/smoke-dev/xteam-red-split-collapse-default-option/xteam_red_split_collapse.c
rename to test/smoke-limbo/xteam-red-split-collapse-default-option/xteam_red_split_collapse.c
diff --git a/test/smoke-dev/xteam-red-split-default-option-1/Makefile b/test/smoke-limbo/xteam-red-split-default-option-1/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-split-default-option-1/Makefile
rename to test/smoke-limbo/xteam-red-split-default-option-1/Makefile
diff --git a/test/smoke-dev/xteam-red-split-default-option-1/xteam_red_split_1.c b/test/smoke-limbo/xteam-red-split-default-option-1/xteam_red_split_1.c
similarity index 100%
rename from test/smoke-dev/xteam-red-split-default-option-1/xteam_red_split_1.c
rename to test/smoke-limbo/xteam-red-split-default-option-1/xteam_red_split_1.c
diff --git a/test/smoke-dev/xteam-red-split-default-option-2/Makefile b/test/smoke-limbo/xteam-red-split-default-option-2/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-split-default-option-2/Makefile
rename to test/smoke-limbo/xteam-red-split-default-option-2/Makefile
diff --git a/test/smoke-dev/xteam-red-split-default-option-2/xteam_red_split_2.c b/test/smoke-limbo/xteam-red-split-default-option-2/xteam_red_split_2.c
similarity index 100%
rename from test/smoke-dev/xteam-red-split-default-option-2/xteam_red_split_2.c
rename to test/smoke-limbo/xteam-red-split-default-option-2/xteam_red_split_2.c
diff --git a/test/smoke-dev/xteam-red-teams-default-option/Makefile b/test/smoke-limbo/xteam-red-teams-default-option/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-teams-default-option/Makefile
rename to test/smoke-limbo/xteam-red-teams-default-option/Makefile
diff --git a/test/smoke-dev/xteam-red-teams-default-option/xteam_red_teams.c b/test/smoke-limbo/xteam-red-teams-default-option/xteam_red_teams.c
similarity index 100%
rename from test/smoke-dev/xteam-red-teams-default-option/xteam_red_teams.c
rename to test/smoke-limbo/xteam-red-teams-default-option/xteam_red_teams.c
diff --git a/test/smoke-dev/xteam-red-teams/Makefile b/test/smoke-limbo/xteam-red-teams/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-teams/Makefile
rename to test/smoke-limbo/xteam-red-teams/Makefile
diff --git a/test/smoke-dev/xteam-red-teams/xteam_red_teams.c b/test/smoke-limbo/xteam-red-teams/xteam_red_teams.c
similarity index 100%
rename from test/smoke-dev/xteam-red-teams/xteam_red_teams.c
rename to test/smoke-limbo/xteam-red-teams/xteam_red_teams.c
diff --git a/test/smoke-dev/xteam-red-threads-default-option/Makefile b/test/smoke-limbo/xteam-red-threads-default-option/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-threads-default-option/Makefile
rename to test/smoke-limbo/xteam-red-threads-default-option/Makefile
diff --git a/test/smoke-dev/xteam-red-threads-default-option/xteam_red_threads.c b/test/smoke-limbo/xteam-red-threads-default-option/xteam_red_threads.c
similarity index 100%
rename from test/smoke-dev/xteam-red-threads-default-option/xteam_red_threads.c
rename to test/smoke-limbo/xteam-red-threads-default-option/xteam_red_threads.c
diff --git a/test/smoke-dev/xteam-red-unsupported/Makefile b/test/smoke-limbo/xteam-red-unsupported/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-red-unsupported/Makefile
rename to test/smoke-limbo/xteam-red-unsupported/Makefile
diff --git a/test/smoke-dev/xteam-red-unsupported/NRUN b/test/smoke-limbo/xteam-red-unsupported/NRUN
similarity index 100%
rename from test/smoke-dev/xteam-red-unsupported/NRUN
rename to test/smoke-limbo/xteam-red-unsupported/NRUN
diff --git a/test/smoke-dev/xteam-red-unsupported/xteam_red_unsupported.c b/test/smoke-limbo/xteam-red-unsupported/xteam_red_unsupported.c
similarity index 100%
rename from test/smoke-dev/xteam-red-unsupported/xteam_red_unsupported.c
rename to test/smoke-limbo/xteam-red-unsupported/xteam_red_unsupported.c
diff --git a/test/smoke-dev/xteam-scan-no-loop/Makefile b/test/smoke-limbo/xteam-scan-no-loop/Makefile
similarity index 100%
rename from test/smoke-dev/xteam-scan-no-loop/Makefile
rename to test/smoke-limbo/xteam-scan-no-loop/Makefile
diff --git a/test/smoke-dev/xteam-scan-no-loop/xteam_scan_no_loop.cpp b/test/smoke-limbo/xteam-scan-no-loop/xteam_scan_no_loop.cpp
similarity index 100%
rename from test/smoke-dev/xteam-scan-no-loop/xteam_scan_no_loop.cpp
rename to test/smoke-limbo/xteam-scan-no-loop/xteam_scan_no_loop.cpp
diff --git a/test/smoke-dev/xteamr/Makefile b/test/smoke-limbo/xteamr/Makefile
similarity index 100%
rename from test/smoke-dev/xteamr/Makefile
rename to test/smoke-limbo/xteamr/Makefile
diff --git a/test/smoke-dev/xteamr/NRUN b/test/smoke-limbo/xteamr/NRUN
similarity index 100%
rename from test/smoke-dev/xteamr/NRUN
rename to test/smoke-limbo/xteamr/NRUN
diff --git a/test/smoke-dev/xteamr/README b/test/smoke-limbo/xteamr/README
similarity index 100%
rename from test/smoke-dev/xteamr/README
rename to test/smoke-limbo/xteamr/README
diff --git a/test/smoke-dev/xteamr/test_xteamr.cpp b/test/smoke-limbo/xteamr/test_xteamr.cpp
similarity index 100%
rename from test/smoke-dev/xteamr/test_xteamr.cpp
rename to test/smoke-limbo/xteamr/test_xteamr.cpp
diff --git a/test/smoke-dev/xteamr/test_xteamr.h b/test/smoke-limbo/xteamr/test_xteamr.h
similarity index 100%
rename from test/smoke-dev/xteamr/test_xteamr.h
rename to test/smoke-limbo/xteamr/test_xteamr.h
diff --git a/test/smoke-dev/xteamr_builtins/Makefile b/test/smoke-limbo/xteamr_builtins/Makefile
similarity index 100%
rename from test/smoke-dev/xteamr_builtins/Makefile
rename to test/smoke-limbo/xteamr_builtins/Makefile
diff --git a/test/smoke-dev/xteamr_builtins/README b/test/smoke-limbo/xteamr_builtins/README
similarity index 100%
rename from test/smoke-dev/xteamr_builtins/README
rename to test/smoke-limbo/xteamr_builtins/README
diff --git a/test/smoke-dev/xteamr_builtins/test_xteamr.cpp b/test/smoke-limbo/xteamr_builtins/test_xteamr.cpp
similarity index 100%
rename from test/smoke-dev/xteamr_builtins/test_xteamr.cpp
rename to test/smoke-limbo/xteamr_builtins/test_xteamr.cpp
diff --git a/test/smoke-dev/xteamr_builtins/test_xteamr.h b/test/smoke-limbo/xteamr_builtins/test_xteamr.h
similarity index 100%
rename from test/smoke-dev/xteamr_builtins/test_xteamr.h
rename to test/smoke-limbo/xteamr_builtins/test_xteamr.h
diff --git a/test/smoke-dev/xteamr_extended/Makefile b/test/smoke-limbo/xteamr_extended/Makefile
similarity index 100%
rename from test/smoke-dev/xteamr_extended/Makefile
rename to test/smoke-limbo/xteamr_extended/Makefile
diff --git a/test/smoke-dev/xteamr_extended/README b/test/smoke-limbo/xteamr_extended/README
similarity index 100%
rename from test/smoke-dev/xteamr_extended/README
rename to test/smoke-limbo/xteamr_extended/README
diff --git a/test/smoke-dev/xteamr_extended/test_xteamr.cpp b/test/smoke-limbo/xteamr_extended/test_xteamr.cpp
similarity index 100%
rename from test/smoke-dev/xteamr_extended/test_xteamr.cpp
rename to test/smoke-limbo/xteamr_extended/test_xteamr.cpp
diff --git a/test/smoke-dev/xteamr_extended/test_xteamr.h b/test/smoke-limbo/xteamr_extended/test_xteamr.h
similarity index 100%
rename from test/smoke-dev/xteamr_extended/test_xteamr.h
rename to test/smoke-limbo/xteamr_extended/test_xteamr.h
diff --git a/test/smoke/c-heatx/Makefile b/test/smoke/c-heatx/Makefile
index b75b8a6f9a..36813ae697 100644
--- a/test/smoke/c-heatx/Makefile
+++ b/test/smoke/c-heatx/Makefile
@@ -13,6 +13,6 @@ CC = $(OMP_BIN) $(VERBOSE)
UNSUPPORTED = ASAN_COMPILE
-export TIMEOUT = 180s
+export TIMEOUT = 240s
include ../Makefile.rules
diff --git a/test/smoke/check_smoke.sh b/test/smoke/check_smoke.sh
index 5a01b3fc78..e08b9b3a1e 100755
--- a/test/smoke/check_smoke.sh
+++ b/test/smoke/check_smoke.sh
@@ -13,7 +13,7 @@ ORG="\033[0;33m"
BLK="\033[0m"
# Limit any step to 6 minutes
-ulimit -t 360
+ulimit -t 600
function printfails(){
# Print run logs for runtime fails, EPSDB only
@@ -357,6 +357,10 @@ while [ $lrun -lt $SMOKE_LRUN ]; do
#---
for directory in $SMOKE_DIRS; do
if [ ! -r $directory/Makefile ]; then continue; fi
+ if [ "$SKIP_OMPT" == "1" ]; then
+ if [[ $directory =~ "ompt" ]]; then continue; fi
+ if [[ $directory =~ "lib-debug" ]]; then continue; fi
+ fi
pushd $directory > /dev/null
if [ $? -ne 0 ]; then continue; fi
if [ $lrun -eq 0 ]; then
diff --git a/test/smoke/clang-392854/Makefile b/test/smoke/clang-392854/Makefile
index e7f5ae2021..02bb983810 100644
--- a/test/smoke/clang-392854/Makefile
+++ b/test/smoke/clang-392854/Makefile
@@ -4,9 +4,10 @@ TESTNAME = clang-392854
TESTSRC_MAIN = clang-392854.cpp
TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
+RPTH = -Wl,-rpath,$(AOMPHIP)/lib
CLANG = amdclang++
-OMP_FLAGS = -fopenmp -x hip
+OMP_FLAGS = -fopenmp -x hip $(RPTH)
OMP_BIN = $(AOMP)/bin/$(CLANG)
CC = HIPCC_VERBOSE=1 $(OMP_BIN) $(VERBOSE)
#-ccc-print-phases
diff --git a/test/smoke/libgomp-292348/Makefile b/test/smoke/libgomp-292348/Makefile
index 0d1e6c8c25..556e51a03e 100644
--- a/test/smoke/libgomp-292348/Makefile
+++ b/test/smoke/libgomp-292348/Makefile
@@ -4,9 +4,10 @@ TESTNAME = libgomp-292348
TESTSRC_MAIN = libgomp-292348.c
TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
+RPTH = -Wl,-rpath,$(AOMPHIP)/lib
CLANG ?= hipcc
-OMP_FLAGS = -lgomp
+OMP_FLAGS = -lgomp $(RPTH)
CFLAGS = -g -O0 -m64 -fopenmp -lgomp -lstdc++
ifeq ($(EPSDB),1)
diff --git a/test/smoke/team_prob/team_prob.cpp b/test/smoke/team_prob/team_prob.cpp
index c3d926afb7..ef2a4e04ee 100644
--- a/test/smoke/team_prob/team_prob.cpp
+++ b/test/smoke/team_prob/team_prob.cpp
@@ -4,7 +4,7 @@
/// REQUIRES: amdgpu-registered-target
// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm-bc %s -o %t-ppc-host.bc
-// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | $FILECHECK %s
#ifndef HEADER
#define HEADER
diff --git a/test/smoke/usm-globals/Makefile b/test/smoke/usm-globals/Makefile
index ca5ea015cf..1c29441066 100644
--- a/test/smoke/usm-globals/Makefile
+++ b/test/smoke/usm-globals/Makefile
@@ -13,7 +13,7 @@ CLANG = clang++
OMP_BIN = $(AOMP)/bin/$(CLANG)
CC = $(OMP_BIN) $(VERBOSE)
-SUPPORTED = gfx90a,gfx940,gfx941,gfx942
+SUPPORTED = $(SUPPORTS_USM)
#-ccc-print-phases
#"-\#\#\#"
diff --git a/test/smoke/vasp1/.vasp1.cpp.swp b/test/smoke/vasp1/.vasp1.cpp.swp
deleted file mode 100644
index 71ccdb5f37..0000000000
Binary files a/test/smoke/vasp1/.vasp1.cpp.swp and /dev/null differ
diff --git a/test/smoke/veccopy-ompt-target-emi-tracing/Makefile b/test/smoke/veccopy-ompt-target-emi-tracing/Makefile
deleted file mode 100644
index e41ae16f3f..0000000000
--- a/test/smoke/veccopy-ompt-target-emi-tracing/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-include ../../Makefile.defs
-
-TESTNAME = veccopy-ompt-target-emi-tracing
-TESTSRC_MAIN = veccopy-ompt-target-emi-tracing.cpp
-TESTSRC_AUX =
-TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
-
-RUNCMD = ./$(TESTNAME) | $(FILECHECK) $(TESTSRC_MAIN)
-
-CLANG ?= clang++
-OMP_BIN = $(AOMP)/bin/$(CLANG)
-CC = $(OMP_BIN) $(VERBOSE)
-#-ccc-print-phases
-#"-\#\#\#"
-
-include ../Makefile.rules
diff --git a/test/smoke/veccopy-ompt-target-emi-tracing/callbacks.h b/test/smoke/veccopy-ompt-target-emi-tracing/callbacks.h
deleted file mode 100644
index d05f05a4a4..0000000000
--- a/test/smoke/veccopy-ompt-target-emi-tracing/callbacks.h
+++ /dev/null
@@ -1,332 +0,0 @@
-#include
-#include
-#include
-
-#define EMI 1
-
-// Tool related code below
-#include
-
-// From openmp/runtime/test/ompt/callback.h
-#define register_ompt_callback_t(name, type) \
- do { \
- type f_##name = &on_##name; \
- if (ompt_set_callback(name, (ompt_callback_t)f_##name) == ompt_set_never) \
- printf("0: Could not register callback '" #name "'\n"); \
- } while (0)
-
-#define register_ompt_callback(name) register_ompt_callback_t(name, name##_t)
-
-#define OMPT_BUFFER_REQUEST_SIZE 256
-
-ompt_id_t next_op_id = 0x8000000000000001;
-
-// OMPT entry point handles
-static ompt_set_callback_t ompt_set_callback = 0;
-static ompt_set_trace_ompt_t ompt_set_trace_ompt = 0;
-static ompt_start_trace_t ompt_start_trace = 0;
-static ompt_flush_trace_t ompt_flush_trace = 0;
-static ompt_stop_trace_t ompt_stop_trace = 0;
-static ompt_get_record_ompt_t ompt_get_record_ompt = 0;
-static ompt_advance_buffer_cursor_t ompt_advance_buffer_cursor = 0;
-
-// Map of devices traced
-typedef std::unordered_set DeviceMap_t;
-typedef std::unique_ptr DeviceMapPtr_t;
-extern DeviceMapPtr_t DeviceMapPtr;
-
-// Utilities
-static void print_record_ompt(ompt_record_ompt_t *rec) {
- if (rec == NULL)
- return;
-
- switch (rec->type) {
- case ompt_callback_target:
- case ompt_callback_target_emi: {
- ompt_record_target_t target_rec = rec->record.target;
- printf("rec=%p type=%d (Target task) time=%lu thread_id=%lu "
- "target_id=0x%lx kind=%d endpoint=%d device=%d task_id=%lu "
- "codeptr=%p\n",
- rec, rec->type, rec->time, rec->thread_id, rec->target_id,
- target_rec.kind, target_rec.endpoint, target_rec.device_num,
- target_rec.task_id, target_rec.codeptr_ra);
- break;
- }
- case ompt_callback_target_data_op:
- case ompt_callback_target_data_op_emi: {
- ompt_record_target_data_op_t target_data_op_rec =
- rec->record.target_data_op;
- printf("rec=%p type=%d (Target data op) time=%lu thread_id=%lu "
- "target_id=0x%lx host_op_id=0x%lx optype=%d "
- "src_addr=%p src_device=%d dest_addr=%p dest_device=%d bytes=%lu "
- "end_time=%lu duration=%lu ns codeptr=%p\n",
- rec, rec->type, rec->time, rec->thread_id, rec->target_id,
- target_data_op_rec.host_op_id, target_data_op_rec.optype,
- target_data_op_rec.src_addr, target_data_op_rec.src_device_num,
- target_data_op_rec.dest_addr, target_data_op_rec.dest_device_num,
- target_data_op_rec.bytes, target_data_op_rec.end_time,
- target_data_op_rec.end_time - rec->time,
- target_data_op_rec.codeptr_ra);
- break;
- }
- case ompt_callback_target_submit:
- case ompt_callback_target_submit_emi: {
- ompt_record_target_kernel_t target_kernel_rec = rec->record.target_kernel;
- printf("rec=%p type=%d (Target kernel) time=%lu thread_id=%lu "
- "target_id=0x%lx host_op_id=0x%lx requested_num_teams=%u "
- "granted_num_teams=%u end_time=%lu duration=%lu ns\n",
- rec, rec->type, rec->time, rec->thread_id, rec->target_id,
- target_kernel_rec.host_op_id, target_kernel_rec.requested_num_teams,
- target_kernel_rec.granted_num_teams, target_kernel_rec.end_time,
- target_kernel_rec.end_time - rec->time);
- break;
- }
- default:
- assert(0);
- break;
- }
-}
-
-static void delete_buffer_ompt(ompt_buffer_t *buffer) {
- free(buffer);
- printf("Deallocated %p\n", buffer);
-}
-
-// OMPT callbacks
-
-// Trace record callbacks
-static void on_ompt_callback_buffer_request(int device_num,
- ompt_buffer_t **buffer,
- size_t *bytes) {
- *bytes = OMPT_BUFFER_REQUEST_SIZE;
- *buffer = malloc(*bytes);
- printf("Allocated %lu bytes at %p in buffer request callback\n", *bytes,
- *buffer);
-}
-
-static void on_ompt_callback_buffer_complete(
- int device_num, ompt_buffer_t *buffer,
- size_t bytes, /* bytes returned in this callback */
- ompt_buffer_cursor_t begin, int buffer_owned) {
- printf("Executing buffer complete callback: %d %p %lu %p %d\n", device_num,
- buffer, bytes, (void *)begin, buffer_owned);
-
- int status = 1;
- ompt_buffer_cursor_t current = begin;
- while (status) {
- ompt_record_ompt_t *rec = ompt_get_record_ompt(buffer, current);
- print_record_ompt(rec);
- status = ompt_advance_buffer_cursor(NULL, /* TODO device */
- buffer, bytes, current, ¤t);
- }
- if (buffer_owned)
- delete_buffer_ompt(buffer);
-}
-
-static ompt_set_result_t set_trace_ompt(ompt_device_t *Device) {
- if (!ompt_set_trace_ompt)
- return ompt_set_error;
-
-#if EMI
- ompt_set_trace_ompt(Device, 1, ompt_callback_target_emi);
- ompt_set_trace_ompt(Device, 1, ompt_callback_target_data_op_emi);
- ompt_set_trace_ompt(Device, 1, ompt_callback_target_submit_emi);
-#else
- ompt_set_trace_ompt(Device, 1, ompt_callback_target);
- ompt_set_trace_ompt(Device, 1, ompt_callback_target_data_op);
- ompt_set_trace_ompt(Device, 1, ompt_callback_target_submit);
-#endif
-
- return ompt_set_always;
-}
-
-static int start_trace(int device_num, ompt_device_t *Device) {
- if (!ompt_start_trace)
- return 0;
-
- // This device will be traced.
- assert(DeviceMapPtr->find(Device) == DeviceMapPtr->end() &&
- "Device already present in the map");
- DeviceMapPtr->insert(Device);
-
- return ompt_start_trace(Device, &on_ompt_callback_buffer_request,
- &on_ompt_callback_buffer_complete);
-}
-
-static int flush_trace(ompt_device_t *Device) {
- if (!ompt_flush_trace)
- return 0;
- return ompt_flush_trace(Device);
-}
-
-static int stop_trace(ompt_device_t *Device) {
- if (!ompt_stop_trace)
- return 0;
- return ompt_stop_trace(Device);
-}
-
-// Synchronous callbacks
-static void on_ompt_callback_device_initialize(int device_num, const char *type,
- ompt_device_t *device,
- ompt_function_lookup_t lookup,
- const char *documentation) {
- printf("Callback Init: device_num=%d type=%s device=%p lookup=%p doc=%p\n",
- device_num, type, device, lookup, documentation);
- if (!lookup) {
- printf("Trace collection disabled on device %d\n", device_num);
- return;
- }
-
- ompt_set_trace_ompt = (ompt_set_trace_ompt_t)lookup("ompt_set_trace_ompt");
- ompt_start_trace = (ompt_start_trace_t)lookup("ompt_start_trace");
- ompt_flush_trace = (ompt_flush_trace_t)lookup("ompt_flush_trace");
- ompt_stop_trace = (ompt_stop_trace_t)lookup("ompt_stop_trace");
- ompt_get_record_ompt = (ompt_get_record_ompt_t)lookup("ompt_get_record_ompt");
- ompt_advance_buffer_cursor =
- (ompt_advance_buffer_cursor_t)lookup("ompt_advance_buffer_cursor");
-
- // DeviceMap must be initialized only once. Ensure this logic does not
- // depend on external data structures because this init function may be
- // called before main.
- static bool IsDeviceMapInitialized = false;
- if (!IsDeviceMapInitialized) {
- DeviceMapPtr = std::make_unique();
- IsDeviceMapInitialized = true;
- }
-
- set_trace_ompt(device);
-
- // In many scenarios, this will be a good place to start the
- // trace. If start_trace is called from the main program before this
- // callback is dispatched, the start_trace handle will be null. This
- // is because this device_init callback is invoked during the first
- // target construct implementation.
-
- start_trace(device_num, device);
-}
-
-static void on_ompt_callback_device_finalize(int device_num) {
- printf("Callback Fini: device_num=%d\n", device_num);
-}
-
-static void on_ompt_callback_device_load(int device_num, const char *filename,
- int64_t offset_in_file,
- void *vma_in_file, size_t bytes,
- void *host_addr, void *device_addr,
- uint64_t module_id) {
- printf("Callback Load: device_num:%d filename:%s host_adddr:%p device_addr:%p"
- " bytes:%lu\n",
- device_num, filename, host_addr, device_addr, bytes);
-}
-
-static void on_ompt_callback_target_data_op(
- ompt_id_t target_id, ompt_id_t host_op_id, ompt_target_data_op_t optype,
- void *src_addr, int src_device_num, void *dest_addr, int dest_device_num,
- size_t bytes, const void *codeptr_ra) {
- printf(" Callback DataOp: host_op_id=%lu optype=%d src=%p src_device_num=%d "
- "dest=%p dest_device_num=%d bytes=%lu code=%p\n",
- host_op_id, optype, src_addr, src_device_num, dest_addr,
- dest_device_num, bytes, codeptr_ra);
-}
-
-static void on_ompt_callback_target_data_op_emi(
- ompt_scope_endpoint_t endpoint, ompt_data_t *target_task_data,
- ompt_data_t *target_data, ompt_id_t *host_op_id,
- ompt_target_data_op_t optype, void *src_addr, int src_device_num,
- void *dest_addr, int dest_device_num, size_t bytes,
- const void *codeptr_ra) {
- if (endpoint == ompt_scope_begin)
- *host_op_id = next_op_id++;
- // target_task_data may be null, avoid dereferencing it
- uint64_t target_task_data_value =
- (target_task_data) ? target_task_data->value : 0;
- printf(" Callback DataOp EMI: endpoint=%d optype=%d target_task_data=%p "
- "(0x%lx) target_data=%p (0x%lx) host_op_id=%p (0x%lx) src=%p "
- "src_device_num=%d dest=%p dest_device_num=%d bytes=%lu code=%p\n",
- endpoint, optype, target_task_data, target_task_data_value,
- target_data, target_data->value, host_op_id, *host_op_id, src_addr,
- src_device_num, dest_addr, dest_device_num, bytes, codeptr_ra);
-}
-
-static void on_ompt_callback_target(ompt_target_t kind,
- ompt_scope_endpoint_t endpoint,
- int device_num, ompt_data_t *task_data,
- ompt_id_t target_id,
- const void *codeptr_ra) {
- printf("Callback Target: kind=%d endpoint=%d device_num=%d target_id=%lu "
- "code=%p\n",
- kind, endpoint, device_num, target_id, codeptr_ra);
-}
-
-static void on_ompt_callback_target_emi(ompt_target_t kind,
- ompt_scope_endpoint_t endpoint,
- int device_num, ompt_data_t *task_data,
- ompt_data_t *target_task_data,
- ompt_data_t *target_data,
- const void *codeptr_ra) {
- if (endpoint == ompt_scope_begin)
- target_data->value = next_op_id++;
- // target_task_data may be null, avoid dereferencing it
- uint64_t target_task_data_value =
- (target_task_data) ? target_task_data->value : 0;
- printf("Callback Target EMI: kind=%d endpoint=%d device_num=%d task_data=%p "
- "(0x%lx) target_task_data=%p (0x%lx) target_data=%p (0x%lx) code=%p\n",
- kind, endpoint, device_num, task_data, task_data->value,
- target_task_data, target_task_data_value, target_data,
- target_data->value, codeptr_ra);
-}
-
-static void on_ompt_callback_target_submit(ompt_id_t target_id,
- ompt_id_t host_op_id,
- unsigned int requested_num_teams) {
- printf(" Callback Submit: target_id=%lu host_op_id=%lu req_num_teams=%d\n",
- target_id, host_op_id, requested_num_teams);
-}
-
-static void on_ompt_callback_target_submit_emi(
- ompt_scope_endpoint_t endpoint, ompt_data_t *target_data,
- ompt_id_t *host_op_id, unsigned int requested_num_teams) {
- printf(" Callback Submit EMI: endpoint=%d req_num_teams=%d target_data=%p "
- "(0x%lx) host_op_id=%p (0x%lx)\n",
- endpoint, requested_num_teams, target_data, target_data->value,
- host_op_id, *host_op_id);
-}
-
-// Init functions
-int ompt_initialize(ompt_function_lookup_t lookup, int initial_device_num,
- ompt_data_t *tool_data) {
- ompt_set_callback = (ompt_set_callback_t)lookup("ompt_set_callback");
-
- if (!ompt_set_callback)
- return 0; // failed
-
- register_ompt_callback(ompt_callback_device_initialize);
- register_ompt_callback(ompt_callback_device_finalize);
- register_ompt_callback(ompt_callback_device_load);
-#if EMI
- register_ompt_callback(ompt_callback_target_data_op_emi);
- register_ompt_callback(ompt_callback_target_emi);
- register_ompt_callback(ompt_callback_target_submit_emi);
-#else
- register_ompt_callback(ompt_callback_target_data_op);
- register_ompt_callback(ompt_callback_target);
- register_ompt_callback(ompt_callback_target_submit);
-#endif
-
- return 1; // success
-}
-
-void ompt_finalize(ompt_data_t *tool_data) {}
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-ompt_start_tool_result_t *ompt_start_tool(unsigned int omp_version,
- const char *runtime_version) {
- static ompt_start_tool_result_t ompt_start_tool_result = {&ompt_initialize,
- &ompt_finalize, 0};
- return &ompt_start_tool_result;
-}
-#ifdef __cplusplus
-}
-#endif
diff --git a/test/smoke/veccopy-ompt-target-emi-tracing/veccopy-ompt-target-emi-tracing.cpp b/test/smoke/veccopy-ompt-target-emi-tracing/veccopy-ompt-target-emi-tracing.cpp
deleted file mode 100644
index 4f4255b986..0000000000
--- a/test/smoke/veccopy-ompt-target-emi-tracing/veccopy-ompt-target-emi-tracing.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-#include
-#include
-#include
-
-#include "callbacks.h"
-
-// Map of devices traced
-DeviceMapPtr_t DeviceMapPtr;
-
-int main() {
- int N = 100000;
-
- int a[N];
- int b[N];
-
- int i;
-
- for (i = 0; i < N; i++)
- a[i] = 0;
-
- for (i = 0; i < N; i++)
- b[i] = i;
-
-#pragma omp target parallel for
- {
- for (int j = 0; j < N; j++)
- a[j] = b[j];
- }
-
- for (auto Dev : *DeviceMapPtr)
- flush_trace(Dev);
-
-#pragma omp target teams distribute parallel for
- {
- for (int j = 0; j < N; j++)
- a[j] = b[j];
- }
-
- int rc = 0;
- for (i = 0; i < N; i++)
- if (a[i] != b[i]) {
- rc++;
- printf("Wrong value: a[%d]=%d\n", i, a[i]);
- }
-
- if (!rc)
- printf("Success\n");
-
- return rc;
-}
-
-// clang-format off
-
-/// CHECK-NOT: host_op_id=0x0
-
-/// CHECK-DAG: Allocated {{[0-9]+}} bytes at [[ADDRX_01:0x[0-f]+]] in buffer request callback
-/// CHECK-DAG: Allocated {{[0-9]+}} bytes at [[ADDRX_02:0x[0-f]+]] in buffer request callback
-/// CHECK-DAG: Allocated {{[0-9]+}} bytes at [[ADDRX_03:0x[0-f]+]] in buffer request callback
-/// CHECK-DAG: Allocated {{[0-9]+}} bytes at [[ADDRX_04:0x[0-f]+]] in buffer request callback
-/// CHECK-DAG: Allocated {{[0-9]+}} bytes at [[ADDRX_05:0x[0-f]+]] in buffer request callback
-/// CHECK-DAG: Allocated {{[0-9]+}} bytes at [[ADDRX_06:0x[0-f]+]] in buffer request callback
-/// CHECK-DAG: Allocated {{[0-9]+}} bytes at [[ADDRX_07:0x[0-f]+]] in buffer request callback
-/// CHECK-DAG: Allocated {{[0-9]+}} bytes at [[ADDRX_08:0x[0-f]+]] in buffer request callback
-/// CHECK-DAG: Allocated {{[0-9]+}} bytes at [[ADDRX_09:0x[0-f]+]] in buffer request callback
-/// CHECK-DAG: Allocated {{[0-9]+}} bytes at [[ADDRX_10:0x[0-f]+]] in buffer request callback
-/// CHECK-DAG: Allocated {{[0-9]+}} bytes at [[ADDRX_11:0x[0-f]+]] in buffer request callback
-
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_01]] {{[0-9]+}} [[ADDRX_01]] {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_02]] {{[0-9]+}} [[ADDRX_02]] {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_03]] {{[0-9]+}} [[ADDRX_03]] {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_04]] {{[0-9]+}} [[ADDRX_04]] {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_05]] {{[0-9]+}} [[ADDRX_05]] {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_06]] {{[0-9]+}} [[ADDRX_06]] {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_07]] {{[0-9]+}} [[ADDRX_07]] {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_08]] {{[0-9]+}} [[ADDRX_08]] {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_09]] {{[0-9]+}} [[ADDRX_09]] {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_10]] {{[0-9]+}} [[ADDRX_10]] {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_11]] {{[0-9]+}} [[ADDRX_11]] {{[0-9]+}}
-
-// Note: Split checks for record address and content. That way we do not imply
-// any order. Records 01-06 and 12-17 occur interleaved and belong to the
-// first target region. 07-11 occur interleaved with 18-22 and belong to
-// the second target region.
-/// CHECK-DAG: rec=[[ADDRX_01]]
-/// CHECK-DAG: rec=[[ADDRX_02]]
-/// CHECK-DAG: rec=[[ADDRX_03]]
-/// CHECK-DAG: rec=[[ADDRX_04]]
-/// CHECK-DAG: rec=[[ADDRX_05]]
-/// CHECK-DAG: rec=[[ADDRX_06]]
-/// CHECK-DAG: rec=[[ADDRX_07]]
-/// CHECK-DAG: rec=[[ADDRX_08]]
-/// CHECK-DAG: rec=[[ADDRX_09]]
-/// CHECK-DAG: rec=[[ADDRX_10]]
-/// CHECK-DAG: rec=[[ADDRX_11]]
-
-/// CHECK-DAG: type=8 (Target task) {{.+}} kind=1 endpoint=1
-/// CHECK-DAG: type=9 (Target data op) {{.+}} optype=1
-/// CHECK-DAG: type=9 (Target data op) {{.+}} optype=2
-/// CHECK-DAG: type=9 (Target data op) {{.+}} optype=1
-/// CHECK-DAG: type=9 (Target data op) {{.+}} optype=2
-/// CHECK-DAG: type=10 (Target kernel) {{.+}} requested_num_teams=1
-/// CHECK-DAG: type=9 (Target data op) {{.+}} optype=3
-/// CHECK-DAG: type=9 (Target data op) {{.+}} optype=3
-/// CHECK-DAG: type=9 (Target data op) {{.+}} optype=4
-/// CHECK-DAG: type=9 (Target data op) {{.+}} optype=4
-/// CHECK-DAG: type=8 (Target task) {{.+}} kind=1 endpoint=2
-
-// Note: These addresses will only occur once. They are only captured to
-// indicate their existence.
-/// CHECK-DAG: rec=[[ADDRX_12:0x[0-f]+]]
-/// CHECK-DAG: rec=[[ADDRX_13:0x[0-f]+]]
-/// CHECK-DAG: rec=[[ADDRX_14:0x[0-f]+]]
-/// CHECK-DAG: rec=[[ADDRX_15:0x[0-f]+]]
-/// CHECK-DAG: rec=[[ADDRX_16:0x[0-f]+]]
-/// CHECK-DAG: rec=[[ADDRX_17:0x[0-f]+]]
-/// CHECK-DAG: rec=[[ADDRX_18:0x[0-f]+]]
-/// CHECK-DAG: rec=[[ADDRX_19:0x[0-f]+]]
-/// CHECK-DAG: rec=[[ADDRX_20:0x[0-f]+]]
-/// CHECK-DAG: rec=[[ADDRX_21:0x[0-f]+]]
-/// CHECK-DAG: rec=[[ADDRX_22:0x[0-f]+]]
-
-/// CHECK-DAG: type=8 (Target task) {{.+}} kind=1 endpoint=1
-/// CHECK-DAG: type=9 (Target data op) {{.+}} optype=1
-/// CHECK-DAG: type=9 (Target data op) {{.+}} optype=2
-/// CHECK-DAG: type=9 (Target data op) {{.+}} optype=1
-/// CHECK-DAG: type=9 (Target data op) {{.+}} optype=2
-/// CHECK-DAG: type=10 (Target kernel) {{.+}} requested_num_teams=0
-/// CHECK-DAG: type=9 (Target data op) {{.+}} optype=3
-/// CHECK-DAG: type=9 (Target data op) {{.+}} optype=3
-/// CHECK-DAG: type=9 (Target data op) {{.+}} optype=4
-/// CHECK-DAG: type=9 (Target data op) {{.+}} optype=4
-/// CHECK-DAG: type=8 (Target task) {{.+}} kind=1 endpoint=2
-
-// Note: ADDRX_11 may not trigger a final callback.
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_01]] {{[0-9]+}} (nil) {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_02]] {{[0-9]+}} (nil) {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_03]] {{[0-9]+}} (nil) {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_04]] {{[0-9]+}} (nil) {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_05]] {{[0-9]+}} (nil) {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_06]] {{[0-9]+}} (nil) {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_07]] {{[0-9]+}} (nil) {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_08]] {{[0-9]+}} (nil) {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_09]] {{[0-9]+}} (nil) {{[0-9]+}}
-/// CHECK-DAG: Executing buffer complete callback: {{[0-9]+}} [[ADDRX_10]] {{[0-9]+}} (nil) {{[0-9]+}}
-
-// Note: ADDRX_11 may not be deallocated.
-/// CHECK-DAG: Deallocated [[ADDRX_01]]
-/// CHECK-DAG: Deallocated [[ADDRX_02]]
-/// CHECK-DAG: Deallocated [[ADDRX_03]]
-/// CHECK-DAG: Deallocated [[ADDRX_04]]
-/// CHECK-DAG: Deallocated [[ADDRX_05]]
-/// CHECK-DAG: Deallocated [[ADDRX_06]]
-/// CHECK-DAG: Deallocated [[ADDRX_07]]
-/// CHECK-DAG: Deallocated [[ADDRX_08]]
-/// CHECK-DAG: Deallocated [[ADDRX_09]]
-/// CHECK-DAG: Deallocated [[ADDRX_10]]
-
-/// CHECK-DAG: Success
-
-/// CHECK-NOT: rec=
-/// CHECK-NOT: host_op_id=0x0
diff --git a/trunk/README.md b/trunk/README.md
index 9caffb80c5..f2c72d10f6 100644
--- a/trunk/README.md
+++ b/trunk/README.md
@@ -1,9 +1,9 @@
-# How to Build the _trunk22_ Compiler
+# How to Build the _trunk23_ Compiler
Add the following to your environment in either `.bash_profile` or `.bashrc`:
``` bash
-export TRUNK_REPOS=$HOME/git/trunk22.0
+export TRUNK_REPOS=$HOME/git/trunk23.0
```
Or set `TRUNK_REPOS` to a location with a fast file system. Then log in again
@@ -32,17 +32,17 @@ override.
## TRUNK_REPOS
-See the discussion above for building _trunk22_ on the use of `TRUNK_REPOS`.
+See the discussion above for building _trunk23_ on the use of `TRUNK_REPOS`.
## TRUNK_LINK
The default value for `TRUNK_LINK` is `"$HOME/rocm/trunk"`. The `build_trunk.sh`
-script will install into directory `${TRUNK_LINK}_22.0-0`.
+script will install into directory `${TRUNK_LINK}_23.0-0`.
Furthermore, it creates a symbolic link from `$TRUNK_LINK` to the install dir.
So `$TRUNK_LINK` **MUST NOT** be a physical directory. This symbolic link makes
-it easy to switch between future qualifed releases of _trunk22_. If you are on a
+it easy to switch between future qualifed releases of _trunk23_. If you are on a
system where `$HOME` is in a slow filesystem, set `TRUNK_LINK` to where you want
the install directory to be. For example set the following in your
`.bash_profile` or `.bashrc` then relogin:
@@ -51,7 +51,7 @@ the install directory to be. For example set the following in your
export TRUNK_LINK=/work/$USER/rocm/trunk
```
-Then the install scripts will install into `/work/$USER/rocm/trunk_22.0-0` and
+Then the install scripts will install into `/work/$USER/rocm/trunk_23.0-0` and
a symlink will be created from `$TRUNK_LINK`.
@@ -160,16 +160,16 @@ The default for `BUILD_TYPE` is "Release". This sets the value for
`CMAKE_BUILD_TYPE`. See CMake documentation for different possible values.
-# Releases of _trunk22_
+# Releases of _trunk23_
-At various development check points we will qualify releases of _trunk22_ and
+At various development check points we will qualify releases of _trunk23_ and
increment the development version in `trunk_common_vars`. For example, after the
-release of `trunk_22.0-0`, development will move to `trunk_22.0-1`. The build
-scripts will then install into directory `$HOME/rocm/trunk_22.0-1`. The symbolic
+release of `trunk_23.0-0`, development will move to `trunk_23.0-1`. The build
+scripts will then install into directory `$HOME/rocm/trunk_23.0-1`. The symbolic
link from `$HOME/rocm/trunk` will also change to the new install directory.
-After a _trunk22_ release, a static release branch will be created. such as
-`trunk_22.0-0`. This branch will be created by interactive rebasing all the
+After a _trunk23_ release, a static release branch will be created. such as
+`trunk_23.0-0`. This branch will be created by interactive rebasing all the
local commits in `amd-trunk-dev`. Development will continue in the branch
`amd-trunk-dev`.
@@ -183,7 +183,7 @@ similar to the `clone_aomp.sh` script used for AOMP. For now, simply run
merges from main.
-# Testing _trunk22_
+# Testing _trunk23_
To use the various AOMP testing infrastructure in `$TRUNK_REPOS/aomp/test`:
diff --git a/trunk/trunk_common_vars b/trunk/trunk_common_vars
index 4d2f356eea..6e83ef9199 100644
--- a/trunk/trunk_common_vars
+++ b/trunk/trunk_common_vars
@@ -8,7 +8,7 @@
# set environment variables defined in this file.
#
# Set the TRUNK VERSION STRING and TRUNK_PROJECT_REPO_BRANCH.
-TRUNK_VERSION=${TRUNK_VERSION:-"22.0"}
+TRUNK_VERSION=${TRUNK_VERSION:-"23.0"}
TRUNK_VERSION_MOD=${TRUNK_VERSION_MOD:-"0"}
TRUNK_VERSION_STRING=${TRUNK_VERSION_STRING:-"$TRUNK_VERSION-$TRUNK_VERSION_MOD"}
export TRUNK_VERSION_STRING TRUNK_VERSION TRUNK_VERSION_MOD