From 2952f220bc51de1e8c2ec78df14d350a68df0cdb Mon Sep 17 00:00:00 2001 From: Catherine Moore Date: Wed, 3 Sep 2025 10:12:20 -0500 Subject: [PATCH 1/6] Add AMD Copyright and MIT license designation. --- bin/build_flang-classic.sh | 4 ++++ bin/build_llvm-classic.sh | 4 ++++ bin/build_rocprofiler-register.sh | 4 ++++ bin/diff_driver.sh | 4 ++++ bin/rocmlibs/build_hipBLAS.sh | 4 ++++ bin/rocmlibs/build_powerinfer.sh | 4 ++++ bin/rocmlibs/build_rocBLAS.sh | 5 +++++ bin/rocmlibs/build_rocPRIM.sh | 5 +++++ bin/rocmlibs/build_rocSOLVER.sh | 5 +++++ bin/rocmlibs/build_rocSPARSE.sh | 5 +++++ bin/rocmlibs/build_rocmlibs.sh | 5 +++++ bin/rocmlibs/clone_rocmlibs.sh | 5 +++++ bin/rocmlibs/test_powerinfer.sh | 5 +++++ bin/run_OpenMP_VV.sh | 5 +++++ bin/run_accel2023.sh | 5 +++++ bin/run_hpc2021.sh | 5 +++++ test/smoke-asan/hip-gbo/hip-gbo.cpp | 4 ++++ test/smoke-asan/hip-hbo/hip-hbo.cpp | 4 ++++ test/smoke-asan/hip-uaf/hip-uaf.cpp | 4 ++++ test/smoke-asan/omp-device-free-uaf/omp-device-free-uaf.cpp | 4 ++++ .../omp-device-malloc-hbo/omp-device-malloc-hbo.cpp | 4 ++++ .../omp-dynamic-direct-lbo/omp-dynamic-direct-lbo.cpp | 4 ++++ .../omp-dynamic-indirect-lbo/omp-dynamic-indirect-lbo.cpp | 4 ++++ .../omp-function-parameters-lbo.cpp | 4 ++++ test/smoke-asan/omp-gbo/omp-gbo.cpp | 4 ++++ test/smoke-asan/omp-hbo/omp-hbo.cpp | 4 ++++ .../omp-static-direct-lbo/omp-static-direct-lbo.cpp | 4 ++++ .../omp-static-indirect-lbo/omp-static-indirect-lbo.cpp | 4 ++++ test/smoke-asan/omp-uaf/omp-uaf.cpp | 4 ++++ test/smoke-dev/clang-ifaces/clang-ifaces.c | 4 ++++ .../fast_fp_atomics_mi200_default_usm_map.cpp | 4 ++++ .../fast_fp_atomics_mi200_enable_coarse_grain_usm_map.cpp | 4 ++++ ...fast_fp_atomics_mi200_not_enable_coarse_grain_usm_map.cpp | 4 ++++ test/smoke-dev/gpurun-l-m/gpurun-l-m.c | 4 ++++ test/smoke-dev/gpurun-l-m/gpurun-l-m.py | 4 ++++ test/smoke-dev/lib-debug/lib-debug.c | 4 ++++ .../occupancy_based_opt_big_jump_loop.c | 4 ++++ .../occupancy_based_opt_xteam_reduction.c | 4 ++++ test/smoke-dev/occupancy-based-opt/occupancy_based_opt.c | 4 ++++ test/smoke-dev/red_bug_51/red_bug_51.cpp | 4 ++++ test/smoke-dev/reduction_team/reduction_team.c | 4 ++++ test/smoke-dev/reduction_teams/reduction_teams.c | 4 ++++ test/smoke-dev/rt-tuning-envar/rt_tuning_envar.c | 4 ++++ test/smoke-dev/snap_red/snap_red.c | 4 ++++ test/smoke-dev/swdev-461650/swdev_461650.c | 4 ++++ test/smoke-dev/test-offload-profile-envar/veccopy.c | 4 ++++ test/smoke-dev/xteam-red-collapse/xteam_red_collapse.c | 4 ++++ test/smoke-dev/xteamr/test_xteamr.h | 3 +++ .../zero_copy.cpp | 4 ++++ .../zero-copy-xnack-enable-dgpu-map-enable-apu/zero_copy.cpp | 4 ++++ .../FNew-use_device_ptr/fortran_callable_init.hip | 4 ++++ .../big_jump_loop_nonrect_collapse.cpp | 4 ++++ test/smoke-fails/clang-506539/clang-506539.cpp | 4 ++++ test/smoke-fails/cuda_arch/cuda_arch.c | 4 ++++ .../noloop-nonrect-collapse/noloop_nonrect_collapse.cpp | 4 ++++ test/smoke-fails/omp_lock/omp_lock.c | 5 +++++ test/smoke-fails/swdev-507161/clang-507161.cpp | 3 +++ .../veccopy-ompt-target-emi-flush-trace/callbacks.h | 4 ++++ .../veccopy-ompt-target-emi-tracing.cpp | 4 ++++ test/smoke-fort/flang-target-associate-ptr/device-omp.c | 5 +++++ test/smoke-limbo/veccopy-ompt-target-tracing/callbacks.h | 4 ++++ .../veccopy-ompt-target-tracing.cpp | 4 ++++ test/smoke-limbo/xteam-red-split-2/xteam_red_split_2.c | 5 +++++ test/smoke/clang-337336/clang-337336.cpp | 4 ++++ .../hipmalloc-omptarget-multifile/hipMallocOmpTarget1.cpp | 4 ++++ .../hipmalloc-omptarget-multifile/hipMallocOmpTarget2.cpp | 4 ++++ test/smoke/hipmalloc-omptarget-multifile/main.cpp | 4 ++++ test/smoke/hipmalloc-omptarget-multifile/support.cpp | 4 ++++ test/smoke/hipmalloc-omptarget-multifile/support.h | 4 ++++ 69 files changed, 287 insertions(+) diff --git a/bin/build_flang-classic.sh b/bin/build_flang-classic.sh index 4ad0a1d2f9..b61228f56c 100755 --- a/bin/build_flang-classic.sh +++ b/bin/build_flang-classic.sh @@ -1,5 +1,9 @@ #!/bin/bash # +#Copyright © Advanced Micro Devices, Inc., or its affiliates. +# +#SPDX-License-Identifier: MIT +# # build_flang-classic.sh: Script to build the flang-classic binary driver # This driver will never call flang -fc1, it only calls binaries # clang, flang1, flang2, build elsewhere diff --git a/bin/build_llvm-classic.sh b/bin/build_llvm-classic.sh index b4fa8a6dc4..9c456233dc 100755 --- a/bin/build_llvm-classic.sh +++ b/bin/build_llvm-classic.sh @@ -1,5 +1,9 @@ #!/bin/bash # +#Copyright © Advanced Micro Devices, Inc., or its affiliates. +# +#SPDX-License-Identifier: MIT +# # build_llvm-classic.sh: Script to build the classic LLVM used by flang-classic. binary driver # This driver will never call flang -fc1, it only calls binaries # clang, flang1, flang2, built elsewhere diff --git a/bin/build_rocprofiler-register.sh b/bin/build_rocprofiler-register.sh index 489a9136ec..e3f66634c6 100755 --- a/bin/build_rocprofiler-register.sh +++ b/bin/build_rocprofiler-register.sh @@ -1,5 +1,9 @@ #!/bin/bash # +#Copyright © Advanced Micro Devices, Inc., or its affiliates. +# +#SPDX-License-Identifier: MIT +# # build_rocprofiler-register.sh: Script to build rocprofiler-register for AOMP standalone build # diff --git a/bin/diff_driver.sh b/bin/diff_driver.sh index d70ef82f59..7f1d0a3f38 100755 --- a/bin/diff_driver.sh +++ b/bin/diff_driver.sh @@ -1,4 +1,8 @@ #!/bin/bash +# +#Copyright © Advanced Micro Devices, Inc., or its affiliates. +# +#SPDX-License-Identifier: MIT # # diff_driver.sh : show the diff between llvm driver code in trunk vs amd-staging # This checks both llvm-project/clang/lib/Driver and llvm-project/clang/include/clang/Driver diff --git a/bin/rocmlibs/build_hipBLAS.sh b/bin/rocmlibs/build_hipBLAS.sh index 6483123e42..76849c6ca2 100755 --- a/bin/rocmlibs/build_hipBLAS.sh +++ b/bin/rocmlibs/build_hipBLAS.sh @@ -1,5 +1,9 @@ #!/bin/bash # +#Copyright © Advanced Micro Devices, Inc., or its affiliates. +# +#SPDX-License-Identifier: MIT +# # build_hipblas.sh: Script to build and install hipblas library # # diff --git a/bin/rocmlibs/build_powerinfer.sh b/bin/rocmlibs/build_powerinfer.sh index c23ce6bd07..a6143a920d 100755 --- a/bin/rocmlibs/build_powerinfer.sh +++ b/bin/rocmlibs/build_powerinfer.sh @@ -1,5 +1,9 @@ #!/bin/bash # +#Copyright © Advanced Micro Devices, Inc., or its affiliates. +# +#SPDX-License-Identifier: MIT +# # build_powerinfer.sh: Script to build and install powerinfer library # This build is classic cmake, make, make install # diff --git a/bin/rocmlibs/build_rocBLAS.sh b/bin/rocmlibs/build_rocBLAS.sh index 5eef6f8cc5..cf244b6f3b 100755 --- a/bin/rocmlibs/build_rocBLAS.sh +++ b/bin/rocmlibs/build_rocBLAS.sh @@ -1,4 +1,9 @@ #!/bin/bash +# +#Copyright © Advanced Micro Devices, Inc., or its affiliates. +# +#SPDX-License-Identifier: MIT +# # # build_rocblas.sh: Script to build and install rocblas library # diff --git a/bin/rocmlibs/build_rocPRIM.sh b/bin/rocmlibs/build_rocPRIM.sh index 32ff54e352..2c49ce1fe8 100755 --- a/bin/rocmlibs/build_rocPRIM.sh +++ b/bin/rocmlibs/build_rocPRIM.sh @@ -1,4 +1,9 @@ #!/bin/bash +# +#Copyright © Advanced Micro Devices, Inc., or its affiliates. +# +#SPDX-License-Identifier: MIT +# # # build_rocPRIM.sh: Script to build and install rocPRIM library # diff --git a/bin/rocmlibs/build_rocSOLVER.sh b/bin/rocmlibs/build_rocSOLVER.sh index dd95c90a47..e511511d68 100755 --- a/bin/rocmlibs/build_rocSOLVER.sh +++ b/bin/rocmlibs/build_rocSOLVER.sh @@ -1,4 +1,9 @@ #!/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_rocSPARSE.sh b/bin/rocmlibs/build_rocSPARSE.sh index e16c20fcd4..bd9ef06c9e 100755 --- a/bin/rocmlibs/build_rocSPARSE.sh +++ b/bin/rocmlibs/build_rocSPARSE.sh @@ -1,4 +1,9 @@ #!/bin/bash +# +#Copyright © Advanced Micro Devices, Inc., or its affiliates. +# +#SPDX-License-Identifier: MIT +# # # build_rocsparse.sh: Script to build and install rocsparse library # diff --git a/bin/rocmlibs/build_rocmlibs.sh b/bin/rocmlibs/build_rocmlibs.sh index 064c1fa712..f6697fd7a7 100755 --- a/bin/rocmlibs/build_rocmlibs.sh +++ b/bin/rocmlibs/build_rocmlibs.sh @@ -1,4 +1,9 @@ #!/bin/bash +# +#Copyright © Advanced Micro Devices, Inc., or its affiliates. +# +#SPDX-License-Identifier: MIT +# # # build_rocmlibs.sh : Build and install ROCm libraries as AOMP components # diff --git a/bin/rocmlibs/clone_rocmlibs.sh b/bin/rocmlibs/clone_rocmlibs.sh index dac87fb085..7ed39dbe68 100755 --- a/bin/rocmlibs/clone_rocmlibs.sh +++ b/bin/rocmlibs/clone_rocmlibs.sh @@ -1,5 +1,10 @@ #!/bin/bash # +#Copyright © Advanced Micro Devices, Inc., or its affiliates. +# +#SPDX-License-Identifier: MIT +# +# # clone_rocmlibs.sh: Clone the set of rocmlibs # Currently AOMP needs 14 repositories. # diff --git a/bin/rocmlibs/test_powerinfer.sh b/bin/rocmlibs/test_powerinfer.sh index 6cd011fd41..ef3adba407 100755 --- a/bin/rocmlibs/test_powerinfer.sh +++ b/bin/rocmlibs/test_powerinfer.sh @@ -1,4 +1,9 @@ #!/bin/bash +# +#Copyright © Advanced Micro Devices, Inc., or its affiliates. +# +#SPDX-License-Identifier: MIT +# # # test_powerinfer.sh: Script to test powerinfer installation with various models # diff --git a/bin/run_OpenMP_VV.sh b/bin/run_OpenMP_VV.sh index 91d7ac485e..c4fe6bb3e2 100755 --- a/bin/run_OpenMP_VV.sh +++ b/bin/run_OpenMP_VV.sh @@ -1,5 +1,10 @@ #!/bin/bash # +#Copyright © Advanced Micro Devices, Inc., or its affiliates. +# +#SPDX-License-Identifier: MIT +# +# # run_openmpvv.sh: # Script for running the OpenMP_VV suite found at # https://github.com/OpenMP-Validation-and-Verification/OpenMP_VV diff --git a/bin/run_accel2023.sh b/bin/run_accel2023.sh index 567f88aed6..ecefcce8b0 100755 --- a/bin/run_accel2023.sh +++ b/bin/run_accel2023.sh @@ -1,4 +1,9 @@ #! /usr/bin/env bash +# +#Copyright © Advanced Micro Devices, Inc., or its affiliates. +# +#SPDX-License-Identifier: MIT +# # ACCEL2023_SOURCE_DIR where to clone sources to. Default: AOMP_REPOS_TEST # ACCEL2023_BUILD_NUM_THREADS Number of parallel compile processes. Default: 32 diff --git a/bin/run_hpc2021.sh b/bin/run_hpc2021.sh index 4c070ee313..1683bf683f 100755 --- a/bin/run_hpc2021.sh +++ b/bin/run_hpc2021.sh @@ -1,4 +1,9 @@ #! /usr/bin/env bash +# +#Copyright © Advanced Micro Devices, Inc., or its affiliates. +# +#SPDX-License-Identifier: MIT +# # HPC2021_SOURCE_DIR where to clone sources to. Default: AOMP_REPOS_TEST # HPC2021_BUILD_NUM_THREADS Number of parallel compile processes. Default: 32 diff --git a/test/smoke-asan/hip-gbo/hip-gbo.cpp b/test/smoke-asan/hip-gbo/hip-gbo.cpp index 23adcbd79c..3059aaf958 100644 --- a/test/smoke-asan/hip-gbo/hip-gbo.cpp +++ b/test/smoke-asan/hip-gbo/hip-gbo.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #define __HIP_PLATFORM_AMD__ 1 #include diff --git a/test/smoke-asan/hip-hbo/hip-hbo.cpp b/test/smoke-asan/hip-hbo/hip-hbo.cpp index 625cb59355..e5b8c7348a 100644 --- a/test/smoke-asan/hip-hbo/hip-hbo.cpp +++ b/test/smoke-asan/hip-hbo/hip-hbo.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #define __HIP_PLATFORM_AMD__ 1 #include diff --git a/test/smoke-asan/hip-uaf/hip-uaf.cpp b/test/smoke-asan/hip-uaf/hip-uaf.cpp index 8324ab4785..4f9ce0d2b8 100644 --- a/test/smoke-asan/hip-uaf/hip-uaf.cpp +++ b/test/smoke-asan/hip-uaf/hip-uaf.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #define __HIP_PLATFORM_AMD__ 1 #include diff --git a/test/smoke-asan/omp-device-free-uaf/omp-device-free-uaf.cpp b/test/smoke-asan/omp-device-free-uaf/omp-device-free-uaf.cpp index c00a3b02b1..af33819760 100644 --- a/test/smoke-asan/omp-device-free-uaf/omp-device-free-uaf.cpp +++ b/test/smoke-asan/omp-device-free-uaf/omp-device-free-uaf.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include int main(int argc, char *argv[]) { diff --git a/test/smoke-asan/omp-device-malloc-hbo/omp-device-malloc-hbo.cpp b/test/smoke-asan/omp-device-malloc-hbo/omp-device-malloc-hbo.cpp index b0792efea6..e53d59fbaf 100644 --- a/test/smoke-asan/omp-device-malloc-hbo/omp-device-malloc-hbo.cpp +++ b/test/smoke-asan/omp-device-malloc-hbo/omp-device-malloc-hbo.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include int main(int argc, char *argv[]) { diff --git a/test/smoke-asan/omp-dynamic-direct-lbo/omp-dynamic-direct-lbo.cpp b/test/smoke-asan/omp-dynamic-direct-lbo/omp-dynamic-direct-lbo.cpp index 146eb89fa7..19fab6bdfc 100644 --- a/test/smoke-asan/omp-dynamic-direct-lbo/omp-dynamic-direct-lbo.cpp +++ b/test/smoke-asan/omp-dynamic-direct-lbo/omp-dynamic-direct-lbo.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #define LDS_ATTR __attribute__((address_space(3))) diff --git a/test/smoke-asan/omp-dynamic-indirect-lbo/omp-dynamic-indirect-lbo.cpp b/test/smoke-asan/omp-dynamic-indirect-lbo/omp-dynamic-indirect-lbo.cpp index 1e06d00d8e..1ee7d6929a 100644 --- a/test/smoke-asan/omp-dynamic-indirect-lbo/omp-dynamic-indirect-lbo.cpp +++ b/test/smoke-asan/omp-dynamic-indirect-lbo/omp-dynamic-indirect-lbo.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #define LDS_ATTR volatile __attribute__((address_space(3))) diff --git a/test/smoke-asan/omp-function-parameters-lbo/omp-function-parameters-lbo.cpp b/test/smoke-asan/omp-function-parameters-lbo/omp-function-parameters-lbo.cpp index 9af33096e4..e3723c9518 100644 --- a/test/smoke-asan/omp-function-parameters-lbo/omp-function-parameters-lbo.cpp +++ b/test/smoke-asan/omp-function-parameters-lbo/omp-function-parameters-lbo.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #define LDS_ATTR volatile __attribute__((address_space(3))) diff --git a/test/smoke-asan/omp-gbo/omp-gbo.cpp b/test/smoke-asan/omp-gbo/omp-gbo.cpp index bb96f742ea..1fb8d79073 100644 --- a/test/smoke-asan/omp-gbo/omp-gbo.cpp +++ b/test/smoke-asan/omp-gbo/omp-gbo.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #define N 100 diff --git a/test/smoke-asan/omp-hbo/omp-hbo.cpp b/test/smoke-asan/omp-hbo/omp-hbo.cpp index d55b81e0aa..9939673af0 100644 --- a/test/smoke-asan/omp-hbo/omp-hbo.cpp +++ b/test/smoke-asan/omp-hbo/omp-hbo.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include int main(int argc, char *argv[]) { diff --git a/test/smoke-asan/omp-static-direct-lbo/omp-static-direct-lbo.cpp b/test/smoke-asan/omp-static-direct-lbo/omp-static-direct-lbo.cpp index 95cdd365fa..7f4b0c709f 100644 --- a/test/smoke-asan/omp-static-direct-lbo/omp-static-direct-lbo.cpp +++ b/test/smoke-asan/omp-static-direct-lbo/omp-static-direct-lbo.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #define LDS_ATTR volatile __attribute__((address_space(3))) diff --git a/test/smoke-asan/omp-static-indirect-lbo/omp-static-indirect-lbo.cpp b/test/smoke-asan/omp-static-indirect-lbo/omp-static-indirect-lbo.cpp index da35374f88..76dbbe350a 100644 --- a/test/smoke-asan/omp-static-indirect-lbo/omp-static-indirect-lbo.cpp +++ b/test/smoke-asan/omp-static-indirect-lbo/omp-static-indirect-lbo.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #define LDS_ATTR volatile __attribute__((address_space(3))) diff --git a/test/smoke-asan/omp-uaf/omp-uaf.cpp b/test/smoke-asan/omp-uaf/omp-uaf.cpp index c0a31e13ff..765e7e9f34 100644 --- a/test/smoke-asan/omp-uaf/omp-uaf.cpp +++ b/test/smoke-asan/omp-uaf/omp-uaf.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include int main(int argc, char *argv[]) { diff --git a/test/smoke-dev/clang-ifaces/clang-ifaces.c b/test/smoke-dev/clang-ifaces/clang-ifaces.c index 6d29f656c3..2b588c0629 100644 --- a/test/smoke-dev/clang-ifaces/clang-ifaces.c +++ b/test/smoke-dev/clang-ifaces/clang-ifaces.c @@ -1,3 +1,7 @@ +/* Copyright © Advanced Micro Devices, Inc., or its affiliates. + + SPDX-License-Identifier: MIT */ + #include #include diff --git a/test/smoke-dev/fast_fp_atomics_mi200_default_usm_map/fast_fp_atomics_mi200_default_usm_map.cpp b/test/smoke-dev/fast_fp_atomics_mi200_default_usm_map/fast_fp_atomics_mi200_default_usm_map.cpp index b40547cadb..2fc0432c0b 100644 --- a/test/smoke-dev/fast_fp_atomics_mi200_default_usm_map/fast_fp_atomics_mi200_default_usm_map.cpp +++ b/test/smoke-dev/fast_fp_atomics_mi200_default_usm_map/fast_fp_atomics_mi200_default_usm_map.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include 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-dev/fast_fp_atomics_mi200_enable_corase_grain_usm_map/fast_fp_atomics_mi200_enable_coarse_grain_usm_map.cpp index e9f71c02bf..6d3e8e6bcb 100644 --- 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-dev/fast_fp_atomics_mi200_enable_corase_grain_usm_map/fast_fp_atomics_mi200_enable_coarse_grain_usm_map.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include diff --git a/test/smoke-dev/fast_fp_atomics_mi200_not_enable_corase_grain_usm_map/fast_fp_atomics_mi200_not_enable_coarse_grain_usm_map.cpp b/test/smoke-dev/fast_fp_atomics_mi200_not_enable_corase_grain_usm_map/fast_fp_atomics_mi200_not_enable_coarse_grain_usm_map.cpp index 5035e90842..dc3cd7fdc7 100644 --- a/test/smoke-dev/fast_fp_atomics_mi200_not_enable_corase_grain_usm_map/fast_fp_atomics_mi200_not_enable_coarse_grain_usm_map.cpp +++ b/test/smoke-dev/fast_fp_atomics_mi200_not_enable_corase_grain_usm_map/fast_fp_atomics_mi200_not_enable_coarse_grain_usm_map.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include diff --git a/test/smoke-dev/gpurun-l-m/gpurun-l-m.c b/test/smoke-dev/gpurun-l-m/gpurun-l-m.c index 64c74dc0c7..efe0a8c640 100644 --- a/test/smoke-dev/gpurun-l-m/gpurun-l-m.c +++ b/test/smoke-dev/gpurun-l-m/gpurun-l-m.c @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include #include diff --git a/test/smoke-dev/gpurun-l-m/gpurun-l-m.py b/test/smoke-dev/gpurun-l-m/gpurun-l-m.py index cc814f0bef..da0336781b 100644 --- a/test/smoke-dev/gpurun-l-m/gpurun-l-m.py +++ b/test/smoke-dev/gpurun-l-m/gpurun-l-m.py @@ -1,3 +1,7 @@ +# Copyright © Advanced Micro Devices, Inc., or its affiliates. + +# SPDX-License-Identifier: MIT + # Python program to check the gpurun -m and -l options. import subprocess diff --git a/test/smoke-dev/lib-debug/lib-debug.c b/test/smoke-dev/lib-debug/lib-debug.c index ce79c906ff..4bbcc06c11 100644 --- a/test/smoke-dev/lib-debug/lib-debug.c +++ b/test/smoke-dev/lib-debug/lib-debug.c @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #define N 10 diff --git a/test/smoke-dev/occupancy-based-opt-big-jump-loop/occupancy_based_opt_big_jump_loop.c b/test/smoke-dev/occupancy-based-opt-big-jump-loop/occupancy_based_opt_big_jump_loop.c index b68c9ade5a..541055204e 100755 --- a/test/smoke-dev/occupancy-based-opt-big-jump-loop/occupancy_based_opt_big_jump_loop.c +++ b/test/smoke-dev/occupancy-based-opt-big-jump-loop/occupancy_based_opt_big_jump_loop.c @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include diff --git a/test/smoke-dev/occupancy-based-opt-xteam-reduction/occupancy_based_opt_xteam_reduction.c b/test/smoke-dev/occupancy-based-opt-xteam-reduction/occupancy_based_opt_xteam_reduction.c index 44503f25fa..6e548056a4 100644 --- a/test/smoke-dev/occupancy-based-opt-xteam-reduction/occupancy_based_opt_xteam_reduction.c +++ b/test/smoke-dev/occupancy-based-opt-xteam-reduction/occupancy_based_opt_xteam_reduction.c @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include diff --git a/test/smoke-dev/occupancy-based-opt/occupancy_based_opt.c b/test/smoke-dev/occupancy-based-opt/occupancy_based_opt.c index 5c6ac7a54c..207b30625d 100644 --- a/test/smoke-dev/occupancy-based-opt/occupancy_based_opt.c +++ b/test/smoke-dev/occupancy-based-opt/occupancy_based_opt.c @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include diff --git a/test/smoke-dev/red_bug_51/red_bug_51.cpp b/test/smoke-dev/red_bug_51/red_bug_51.cpp index 2d841d7afe..6ae5a73464 100644 --- a/test/smoke-dev/red_bug_51/red_bug_51.cpp +++ b/test/smoke-dev/red_bug_51/red_bug_51.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include diff --git a/test/smoke-dev/reduction_team/reduction_team.c b/test/smoke-dev/reduction_team/reduction_team.c index cad63f94db..f1ba9e3fdf 100644 --- a/test/smoke-dev/reduction_team/reduction_team.c +++ b/test/smoke-dev/reduction_team/reduction_team.c @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include diff --git a/test/smoke-dev/reduction_teams/reduction_teams.c b/test/smoke-dev/reduction_teams/reduction_teams.c index be84403a92..c51aa12bc9 100644 --- a/test/smoke-dev/reduction_teams/reduction_teams.c +++ b/test/smoke-dev/reduction_teams/reduction_teams.c @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include diff --git a/test/smoke-dev/rt-tuning-envar/rt_tuning_envar.c b/test/smoke-dev/rt-tuning-envar/rt_tuning_envar.c index ac38d05bd9..d71fd3fbe6 100644 --- a/test/smoke-dev/rt-tuning-envar/rt_tuning_envar.c +++ b/test/smoke-dev/rt-tuning-envar/rt_tuning_envar.c @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include diff --git a/test/smoke-dev/snap_red/snap_red.c b/test/smoke-dev/snap_red/snap_red.c index 448a7ded27..e4fe23b3c1 100644 --- a/test/smoke-dev/snap_red/snap_red.c +++ b/test/smoke-dev/snap_red/snap_red.c @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #define N 10 diff --git a/test/smoke-dev/swdev-461650/swdev_461650.c b/test/smoke-dev/swdev-461650/swdev_461650.c index 29444417b4..92023ace5b 100644 --- a/test/smoke-dev/swdev-461650/swdev_461650.c +++ b/test/smoke-dev/swdev-461650/swdev_461650.c @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include diff --git a/test/smoke-dev/test-offload-profile-envar/veccopy.c b/test/smoke-dev/test-offload-profile-envar/veccopy.c index be6acf0b1c..b74fb84b0d 100644 --- a/test/smoke-dev/test-offload-profile-envar/veccopy.c +++ b/test/smoke-dev/test-offload-profile-envar/veccopy.c @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include diff --git a/test/smoke-dev/xteam-red-collapse/xteam_red_collapse.c b/test/smoke-dev/xteam-red-collapse/xteam_red_collapse.c index 1c83629b97..1dbd52adf5 100644 --- a/test/smoke-dev/xteam-red-collapse/xteam_red_collapse.c +++ b/test/smoke-dev/xteam-red-collapse/xteam_red_collapse.c @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include diff --git a/test/smoke-dev/xteamr/test_xteamr.h b/test/smoke-dev/xteamr/test_xteamr.h index c14606a793..93243eed5c 100644 --- a/test/smoke-dev/xteamr/test_xteamr.h +++ b/test/smoke-dev/xteamr/test_xteamr.h @@ -1,3 +1,6 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT // Header file: overload_to_externs.h // generated by utility gen_externs diff --git a/test/smoke-dev/zero-copy-xnack-enable-dgpu-map-disable-apu/zero_copy.cpp b/test/smoke-dev/zero-copy-xnack-enable-dgpu-map-disable-apu/zero_copy.cpp index 06961db90a..c196d09a3b 100644 --- a/test/smoke-dev/zero-copy-xnack-enable-dgpu-map-disable-apu/zero_copy.cpp +++ b/test/smoke-dev/zero-copy-xnack-enable-dgpu-map-disable-apu/zero_copy.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include // When OMPX_DGPU_MAPS=0 and HSA_XNACK=1, it performs zero-copy on APU. diff --git a/test/smoke-dev/zero-copy-xnack-enable-dgpu-map-enable-apu/zero_copy.cpp b/test/smoke-dev/zero-copy-xnack-enable-dgpu-map-enable-apu/zero_copy.cpp index 2db5e038c7..71876d4d8d 100644 --- a/test/smoke-dev/zero-copy-xnack-enable-dgpu-map-enable-apu/zero_copy.cpp +++ b/test/smoke-dev/zero-copy-xnack-enable-dgpu-map-enable-apu/zero_copy.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include // When OMPX_DGPU_MAPS=1 and HSA_XNACK=1, it performs copy on APU. diff --git a/test/smoke-fails/FNew-use_device_ptr/fortran_callable_init.hip b/test/smoke-fails/FNew-use_device_ptr/fortran_callable_init.hip index a6bd393bce..72fef8ca74 100644 --- a/test/smoke-fails/FNew-use_device_ptr/fortran_callable_init.hip +++ b/test/smoke-fails/FNew-use_device_ptr/fortran_callable_init.hip @@ -1,3 +1,7 @@ +// 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/test/smoke-fails/big-jump-loop-nonrect-collapse/big_jump_loop_nonrect_collapse.cpp b/test/smoke-fails/big-jump-loop-nonrect-collapse/big_jump_loop_nonrect_collapse.cpp index 888aa02dae..630a8ee438 100644 --- a/test/smoke-fails/big-jump-loop-nonrect-collapse/big_jump_loop_nonrect_collapse.cpp +++ b/test/smoke-fails/big-jump-loop-nonrect-collapse/big_jump_loop_nonrect_collapse.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include diff --git a/test/smoke-fails/clang-506539/clang-506539.cpp b/test/smoke-fails/clang-506539/clang-506539.cpp index b8e031d0cd..5293493d41 100644 --- a/test/smoke-fails/clang-506539/clang-506539.cpp +++ b/test/smoke-fails/clang-506539/clang-506539.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include diff --git a/test/smoke-fails/cuda_arch/cuda_arch.c b/test/smoke-fails/cuda_arch/cuda_arch.c index 0ecd9c6809..e4d278697f 100644 --- a/test/smoke-fails/cuda_arch/cuda_arch.c +++ b/test/smoke-fails/cuda_arch/cuda_arch.c @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + //#include int main(int argc, char **argv) { diff --git a/test/smoke-fails/noloop-nonrect-collapse/noloop_nonrect_collapse.cpp b/test/smoke-fails/noloop-nonrect-collapse/noloop_nonrect_collapse.cpp index ea8e678ad6..043cb684a3 100644 --- a/test/smoke-fails/noloop-nonrect-collapse/noloop_nonrect_collapse.cpp +++ b/test/smoke-fails/noloop-nonrect-collapse/noloop_nonrect_collapse.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include diff --git a/test/smoke-fails/omp_lock/omp_lock.c b/test/smoke-fails/omp_lock/omp_lock.c index 78f3193965..141c758af3 100644 --- a/test/smoke-fails/omp_lock/omp_lock.c +++ b/test/smoke-fails/omp_lock/omp_lock.c @@ -1,3 +1,8 @@ +/* Copyright © Advanced Micro Devices, Inc., or its affiliates. + + SPDX-License-Identifier: MIT +*/ + #include #include diff --git a/test/smoke-fails/swdev-507161/clang-507161.cpp b/test/smoke-fails/swdev-507161/clang-507161.cpp index 413fcc8401..865ad9ee1e 100644 --- a/test/smoke-fails/swdev-507161/clang-507161.cpp +++ b/test/smoke-fails/swdev-507161/clang-507161.cpp @@ -1,3 +1,6 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT template class A { diff --git a/test/smoke-fails/veccopy-ompt-target-emi-flush-trace/callbacks.h b/test/smoke-fails/veccopy-ompt-target-emi-flush-trace/callbacks.h index 1305476534..f75623b82e 100644 --- a/test/smoke-fails/veccopy-ompt-target-emi-flush-trace/callbacks.h +++ b/test/smoke-fails/veccopy-ompt-target-emi-flush-trace/callbacks.h @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include #include diff --git a/test/smoke-fails/veccopy-ompt-target-emi-flush-trace/veccopy-ompt-target-emi-tracing.cpp b/test/smoke-fails/veccopy-ompt-target-emi-flush-trace/veccopy-ompt-target-emi-tracing.cpp index b50ad376c0..b7a70497db 100644 --- a/test/smoke-fails/veccopy-ompt-target-emi-flush-trace/veccopy-ompt-target-emi-tracing.cpp +++ b/test/smoke-fails/veccopy-ompt-target-emi-flush-trace/veccopy-ompt-target-emi-tracing.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include #include diff --git a/test/smoke-fort/flang-target-associate-ptr/device-omp.c b/test/smoke-fort/flang-target-associate-ptr/device-omp.c index af2ad3121c..194bc8158b 100644 --- a/test/smoke-fort/flang-target-associate-ptr/device-omp.c +++ b/test/smoke-fort/flang-target-associate-ptr/device-omp.c @@ -1,3 +1,8 @@ +/* + Copyright © Advanced Micro Devices, Inc., or its affiliates. + + SPDX-License-Identifier: MIT +*/ #include #include #include diff --git a/test/smoke-limbo/veccopy-ompt-target-tracing/callbacks.h b/test/smoke-limbo/veccopy-ompt-target-tracing/callbacks.h index a442c1e8b9..cfb5fd4147 100644 --- a/test/smoke-limbo/veccopy-ompt-target-tracing/callbacks.h +++ b/test/smoke-limbo/veccopy-ompt-target-tracing/callbacks.h @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include #include diff --git a/test/smoke-limbo/veccopy-ompt-target-tracing/veccopy-ompt-target-tracing.cpp b/test/smoke-limbo/veccopy-ompt-target-tracing/veccopy-ompt-target-tracing.cpp index e8721b85c7..e10ac3fc16 100644 --- a/test/smoke-limbo/veccopy-ompt-target-tracing/veccopy-ompt-target-tracing.cpp +++ b/test/smoke-limbo/veccopy-ompt-target-tracing/veccopy-ompt-target-tracing.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include #include diff --git a/test/smoke-limbo/xteam-red-split-2/xteam_red_split_2.c b/test/smoke-limbo/xteam-red-split-2/xteam_red_split_2.c index 8c2d174d49..59f333032a 100644 --- a/test/smoke-limbo/xteam-red-split-2/xteam_red_split_2.c +++ b/test/smoke-limbo/xteam-red-split-2/xteam_red_split_2.c @@ -1,3 +1,8 @@ +/* + Copyright © Advanced Micro Devices, Inc., or its affiliates. + + SPDX-License-Identifier: MIT +*/ #include #include diff --git a/test/smoke/clang-337336/clang-337336.cpp b/test/smoke/clang-337336/clang-337336.cpp index 0ef59035a9..ab65c8aed6 100644 --- a/test/smoke/clang-337336/clang-337336.cpp +++ b/test/smoke/clang-337336/clang-337336.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include #include diff --git a/test/smoke/hipmalloc-omptarget-multifile/hipMallocOmpTarget1.cpp b/test/smoke/hipmalloc-omptarget-multifile/hipMallocOmpTarget1.cpp index a85878161a..a70c751bf6 100644 --- a/test/smoke/hipmalloc-omptarget-multifile/hipMallocOmpTarget1.cpp +++ b/test/smoke/hipmalloc-omptarget-multifile/hipMallocOmpTarget1.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include "hip/hip_runtime.h" #include "support.h" diff --git a/test/smoke/hipmalloc-omptarget-multifile/hipMallocOmpTarget2.cpp b/test/smoke/hipmalloc-omptarget-multifile/hipMallocOmpTarget2.cpp index 062b0d7cde..d8b61c4728 100644 --- a/test/smoke/hipmalloc-omptarget-multifile/hipMallocOmpTarget2.cpp +++ b/test/smoke/hipmalloc-omptarget-multifile/hipMallocOmpTarget2.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include "hip/hip_runtime.h" #include "support.h" diff --git a/test/smoke/hipmalloc-omptarget-multifile/main.cpp b/test/smoke/hipmalloc-omptarget-multifile/main.cpp index 3b7588da19..af9637d1a3 100644 --- a/test/smoke/hipmalloc-omptarget-multifile/main.cpp +++ b/test/smoke/hipmalloc-omptarget-multifile/main.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include extern int hipMallocOmpTarget1(); diff --git a/test/smoke/hipmalloc-omptarget-multifile/support.cpp b/test/smoke/hipmalloc-omptarget-multifile/support.cpp index 0d7df4bb52..4128f876fc 100644 --- a/test/smoke/hipmalloc-omptarget-multifile/support.cpp +++ b/test/smoke/hipmalloc-omptarget-multifile/support.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include "hip/hip_runtime.h" #include "support.h" #include "stdio.h" diff --git a/test/smoke/hipmalloc-omptarget-multifile/support.h b/test/smoke/hipmalloc-omptarget-multifile/support.h index 3e2368e072..a28554c778 100644 --- a/test/smoke/hipmalloc-omptarget-multifile/support.h +++ b/test/smoke/hipmalloc-omptarget-multifile/support.h @@ -1,2 +1,6 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + void printHipError(hipError_t error); bool hipCallSuccessful(hipError_t error); From 4440aa75ddda4c37f254eff61f05f830dabd24bc Mon Sep 17 00:00:00 2001 From: "Stewart, Ethan" Date: Tue, 22 Jul 2025 16:32:31 -0500 Subject: [PATCH 2/6] [smoke-limbo] - Default to AOMP clang instead of GCC for cmake invocation (#1502) (#100) Running into an issue where the gcc on some testers seems incomplete or ccache is misconfigured. Also fix the clean target to remove build dir and not use 'git clean' because the tests are not always in a git repo when tested. --- test/smoke-limbo/omptest-device-emi/Makefile | 2 +- test/smoke-limbo/omptest-device-emi/performBuildRun.sh | 6 ++++-- test/smoke-limbo/omptest-device-non-emi/Makefile | 2 +- .../smoke-limbo/omptest-device-non-emi/performBuildRun.sh | 6 ++++-- test/smoke-limbo/veccopy-ompt-target-cmake/Makefile | 2 +- .../veccopy-ompt-target-cmake/performBuildRun.sh | 8 +++++--- 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/test/smoke-limbo/omptest-device-emi/Makefile b/test/smoke-limbo/omptest-device-emi/Makefile index e3718127ce..1afcf77776 100644 --- a/test/smoke-limbo/omptest-device-emi/Makefile +++ b/test/smoke-limbo/omptest-device-emi/Makefile @@ -23,4 +23,4 @@ CC = $(DUMMYSRC) | $(OMP_BIN) $(DUMMYOPT) include ../Makefile.rules clean:: - git clean -dfx ./build + rm -rf ./build diff --git a/test/smoke-limbo/omptest-device-emi/performBuildRun.sh b/test/smoke-limbo/omptest-device-emi/performBuildRun.sh index ff8a36e696..fa240420ec 100755 --- a/test/smoke-limbo/omptest-device-emi/performBuildRun.sh +++ b/test/smoke-limbo/omptest-device-emi/performBuildRun.sh @@ -40,12 +40,14 @@ if [ ! -d ${AOMP_DIR} ]; then fi echo " >>> Clean ..." -git clean -fdx ./${BUILD_DIR} +rm -rf ./${BUILD_DIR} echo " >>> Configure ..." cmake -B ${BUILD_DIR} -S . \ -DAOMP_DIR=${AOMP_DIR} \ --DTGT_OFFLOAD_ARCH=${TGT_OFFLOAD_ARCH} +-DTGT_OFFLOAD_ARCH=${TGT_OFFLOAD_ARCH} \ +-DCMAKE_C_COMPILER=${AOMP_DIR}/bin/clang \ +-DCMAKE_CXX_COMPILER=${AOMP_DIR}/bin/clang++ echo " >>> Build ..." cmake --build ${BUILD_DIR} --clean-first --parallel || exit 1 diff --git a/test/smoke-limbo/omptest-device-non-emi/Makefile b/test/smoke-limbo/omptest-device-non-emi/Makefile index 253ed72663..aa1a595263 100644 --- a/test/smoke-limbo/omptest-device-non-emi/Makefile +++ b/test/smoke-limbo/omptest-device-non-emi/Makefile @@ -22,4 +22,4 @@ CC = $(DUMMYSRC) | $(OMP_BIN) $(DUMMYOPT) include ../Makefile.rules clean:: - git clean -dfx ./build + rm -rf ./build diff --git a/test/smoke-limbo/omptest-device-non-emi/performBuildRun.sh b/test/smoke-limbo/omptest-device-non-emi/performBuildRun.sh index ff8a36e696..fa240420ec 100755 --- a/test/smoke-limbo/omptest-device-non-emi/performBuildRun.sh +++ b/test/smoke-limbo/omptest-device-non-emi/performBuildRun.sh @@ -40,12 +40,14 @@ if [ ! -d ${AOMP_DIR} ]; then fi echo " >>> Clean ..." -git clean -fdx ./${BUILD_DIR} +rm -rf ./${BUILD_DIR} echo " >>> Configure ..." cmake -B ${BUILD_DIR} -S . \ -DAOMP_DIR=${AOMP_DIR} \ --DTGT_OFFLOAD_ARCH=${TGT_OFFLOAD_ARCH} +-DTGT_OFFLOAD_ARCH=${TGT_OFFLOAD_ARCH} \ +-DCMAKE_C_COMPILER=${AOMP_DIR}/bin/clang \ +-DCMAKE_CXX_COMPILER=${AOMP_DIR}/bin/clang++ echo " >>> Build ..." cmake --build ${BUILD_DIR} --clean-first --parallel || exit 1 diff --git a/test/smoke-limbo/veccopy-ompt-target-cmake/Makefile b/test/smoke-limbo/veccopy-ompt-target-cmake/Makefile index dd8b95b287..ef68b72c75 100644 --- a/test/smoke-limbo/veccopy-ompt-target-cmake/Makefile +++ b/test/smoke-limbo/veccopy-ompt-target-cmake/Makefile @@ -21,4 +21,4 @@ CC = $(DUMMYSRC) | $(OMP_BIN) $(DUMMYOPT) include ../Makefile.rules clean:: - git clean -dfx ./build + rm -rf ./build diff --git a/test/smoke-limbo/veccopy-ompt-target-cmake/performBuildRun.sh b/test/smoke-limbo/veccopy-ompt-target-cmake/performBuildRun.sh index 7c50a93dcb..fa240420ec 100755 --- a/test/smoke-limbo/veccopy-ompt-target-cmake/performBuildRun.sh +++ b/test/smoke-limbo/veccopy-ompt-target-cmake/performBuildRun.sh @@ -40,12 +40,14 @@ if [ ! -d ${AOMP_DIR} ]; then fi echo " >>> Clean ..." -git clean -fdx ./${BUILD_DIR} +rm -rf ./${BUILD_DIR} echo " >>> Configure ..." cmake -B ${BUILD_DIR} -S . \ -DAOMP_DIR=${AOMP_DIR} \ --DTGT_OFFLOAD_ARCH=${TGT_OFFLOAD_ARCH} +-DTGT_OFFLOAD_ARCH=${TGT_OFFLOAD_ARCH} \ +-DCMAKE_C_COMPILER=${AOMP_DIR}/bin/clang \ +-DCMAKE_CXX_COMPILER=${AOMP_DIR}/bin/clang++ echo " >>> Build ..." cmake --build ${BUILD_DIR} --clean-first --parallel || exit 1 @@ -53,4 +55,4 @@ cmake --build ${BUILD_DIR} --clean-first --parallel || exit 1 echo " >>> Run ..." ./${BUILD_DIR}/${PROJECT_NAME} || exit 1 -echo " >>> DONE!" \ No newline at end of file +echo " >>> DONE!" From 2b7443ee14363bd044185357c1fe0aa460974846 Mon Sep 17 00:00:00 2001 From: Catherine Moore Date: Wed, 1 Oct 2025 18:25:25 -0500 Subject: [PATCH 3/6] Add MIT license. --- .../xteam-red-split-default-option-1/xteam_red_split_1.c | 4 ++++ test/smoke-fails/atomic-contended/performBuildRun.sh | 5 +++++ test/smoke-fails/gpus/gpus.c | 4 ++++ test/smoke-fort-dev/openmp-ver/doit.sh | 5 +++++ test/smoke-fort/split-dist-par-c/split-dist-par.c | 4 ++++ test/smoke-limbo/omptest-device-emi/omptest-device-emi.cpp | 4 ++++ .../omptest-device-non-emi/omptest-device-non-emi.cpp | 5 ++++- test/smoke-limbo/xteam-red-split-1/xteam_red_split_1.c | 4 ++++ test/smoke/clang_udel_saxpy/clang_udel_saxpy.cc | 4 ++++ test/smoke/double_complex_scalar/double_complex_scalar.cpp | 4 ++++ 10 files changed, 42 insertions(+), 1 deletion(-) diff --git a/test/smoke-dev/xteam-red-split-default-option-1/xteam_red_split_1.c b/test/smoke-dev/xteam-red-split-default-option-1/xteam_red_split_1.c index fe3d0479ce..34356ad98e 100644 --- a/test/smoke-dev/xteam-red-split-default-option-1/xteam_red_split_1.c +++ b/test/smoke-dev/xteam-red-split-default-option-1/xteam_red_split_1.c @@ -1,3 +1,7 @@ +/* Copyright © Advanced Micro Devices, Inc., or its affiliates. + + SPDX-License-Identifier: MIT */ + #include #include diff --git a/test/smoke-fails/atomic-contended/performBuildRun.sh b/test/smoke-fails/atomic-contended/performBuildRun.sh index f0c97712b7..59624fdd12 100755 --- a/test/smoke-fails/atomic-contended/performBuildRun.sh +++ b/test/smoke-fails/atomic-contended/performBuildRun.sh @@ -1,3 +1,8 @@ +# +#Copyright © Advanced Micro Devices, Inc., or its affiliates. +# +#SPDX-License-Identifier: MIT +# #!/bin/bash usage() { echo "Usage: $0 [-a ]" \ diff --git a/test/smoke-fails/gpus/gpus.c b/test/smoke-fails/gpus/gpus.c index 8cc302974f..11c0460837 100644 --- a/test/smoke-fails/gpus/gpus.c +++ b/test/smoke-fails/gpus/gpus.c @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + // Copy of helloworld smoke test to verify compile/link for all GPUs // in the GFXLIST located in aomp_common_vars. diff --git a/test/smoke-fort-dev/openmp-ver/doit.sh b/test/smoke-fort-dev/openmp-ver/doit.sh index d8583ccd0f..2ae6c1448f 100755 --- a/test/smoke-fort-dev/openmp-ver/doit.sh +++ b/test/smoke-fort-dev/openmp-ver/doit.sh @@ -1,4 +1,9 @@ #!/bin/bash +# +#Copyright © Advanced Micro Devices, Inc., or its affiliates. +# +#SPDX-License-Identifier: MIT +# echo "Verifying initial test" exp=202111 # OpenMP 5.2 release date diff --git a/test/smoke-fort/split-dist-par-c/split-dist-par.c b/test/smoke-fort/split-dist-par-c/split-dist-par.c index 40e6f9482b..c3a71641de 100644 --- a/test/smoke-fort/split-dist-par-c/split-dist-par.c +++ b/test/smoke-fort/split-dist-par-c/split-dist-par.c @@ -1,3 +1,7 @@ +/* Copyright © Advanced Micro Devices, Inc., or its affiliates. + + SPDX-License-Identifier: MIT */ + #include #include diff --git a/test/smoke-limbo/omptest-device-emi/omptest-device-emi.cpp b/test/smoke-limbo/omptest-device-emi/omptest-device-emi.cpp index d3d1b6baed..aadc8c07df 100644 --- a/test/smoke-limbo/omptest-device-emi/omptest-device-emi.cpp +++ b/test/smoke-limbo/omptest-device-emi/omptest-device-emi.cpp @@ -1,3 +1,7 @@ +/* Copyright © Advanced Micro Devices, Inc., or its affiliates. + + SPDX-License-Identifier: MIT */ + #include "omp.h" #include "OmptTester.h" diff --git a/test/smoke-limbo/omptest-device-non-emi/omptest-device-non-emi.cpp b/test/smoke-limbo/omptest-device-non-emi/omptest-device-non-emi.cpp index f121b62fba..9a7275cf8b 100644 --- a/test/smoke-limbo/omptest-device-non-emi/omptest-device-non-emi.cpp +++ b/test/smoke-limbo/omptest-device-non-emi/omptest-device-non-emi.cpp @@ -1,5 +1,8 @@ -#include "omp.h" +/* Copyright © Advanced Micro Devices, Inc., or its affiliates. + + SPDX-License-Identifier: MIT */ +#include "omp.h" #include "OmptTester.h" using namespace omptest; diff --git a/test/smoke-limbo/xteam-red-split-1/xteam_red_split_1.c b/test/smoke-limbo/xteam-red-split-1/xteam_red_split_1.c index fe3d0479ce..34356ad98e 100644 --- a/test/smoke-limbo/xteam-red-split-1/xteam_red_split_1.c +++ b/test/smoke-limbo/xteam-red-split-1/xteam_red_split_1.c @@ -1,3 +1,7 @@ +/* Copyright © Advanced Micro Devices, Inc., or its affiliates. + + SPDX-License-Identifier: MIT */ + #include #include diff --git a/test/smoke/clang_udel_saxpy/clang_udel_saxpy.cc b/test/smoke/clang_udel_saxpy/clang_udel_saxpy.cc index 86b6d161c4..90d4f43d26 100644 --- a/test/smoke/clang_udel_saxpy/clang_udel_saxpy.cc +++ b/test/smoke/clang_udel_saxpy/clang_udel_saxpy.cc @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include #include diff --git a/test/smoke/double_complex_scalar/double_complex_scalar.cpp b/test/smoke/double_complex_scalar/double_complex_scalar.cpp index b1ff61bd0c..41a0b9e14e 100644 --- a/test/smoke/double_complex_scalar/double_complex_scalar.cpp +++ b/test/smoke/double_complex_scalar/double_complex_scalar.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include From 113a64b7bbd24e9ab505a782d1bc30449e9980a1 Mon Sep 17 00:00:00 2001 From: Catherine Moore Date: Wed, 22 Oct 2025 18:08:08 -0500 Subject: [PATCH 4/6] Add AMD copyright and MIT license designation. --- bin/build_llvm-flang-rt-host-dev.sh | 5 +++++ bin/build_rocprofiler-sdk.sh | 4 ++++ bin/check_openmpvv.sh | 4 ++++ bin/clone_list_checkout | 4 ++++ bin/rocmlibs/build_half.sh | 4 ++++ bin/rocmlibs/build_hipBLAS-common.sh | 5 +++++ bin/rocmlibs/build_hipRAND.sh | 5 +++++ bin/rocmlibs/build_hipSOLVER.sh | 5 +++++ bin/rocmlibs/build_rccl.sh | 5 +++++ bin/rocmlibs/build_rocRAND.sh | 5 +++++ bin/run_composable-kernels.sh | 5 +++++ bin/run_gpurun_rocprof_env.sh | 5 +++++ .../fortran/fortran-hip-interop/fortran_callable_init.hip | 4 ++++ .../fortran/fortran-hip-interop/fortran_hip_interop.f95 | 5 +++++ examples/fortran/gdb-simple/gdb_simple.f95 | 5 +++++ examples/fortran/gdb-simple/gdbcmds | 5 +++++ .../fortran/is-initial-device-api/is-initial-device.f90 | 5 +++++ examples/fortran/simple-offload/simple_offload.f95 | 5 +++++ test/smoke-dev/ompx-bare/ompx_bare.c | 5 +++++ test/smoke-dev/testmarch/test.cpp | 4 ++++ .../xteam-red-min-max-calls.c | 5 ++++- .../xteam-red-min-max-calls/xteam-red-min-max-calls.c | 5 ++++- .../xteam-red-min-max-small-precision-builtin.c | 6 +++++- .../xteam-red-min-max-small-precision.c | 6 +++++- .../xteam-red-min-max-std/xteam-red-min-max-std.cpp | 4 ++++ 25 files changed, 116 insertions(+), 4 deletions(-) diff --git a/bin/build_llvm-flang-rt-host-dev.sh b/bin/build_llvm-flang-rt-host-dev.sh index 739234a6fa..c1be967ff3 100755 --- a/bin/build_llvm-flang-rt-host-dev.sh +++ b/bin/build_llvm-flang-rt-host-dev.sh @@ -1,5 +1,10 @@ #!/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 diff --git a/bin/build_rocprofiler-sdk.sh b/bin/build_rocprofiler-sdk.sh index b95222505a..ff2fc13be8 100755 --- a/bin/build_rocprofiler-sdk.sh +++ b/bin/build_rocprofiler-sdk.sh @@ -1,5 +1,9 @@ #!/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 # diff --git a/bin/check_openmpvv.sh b/bin/check_openmpvv.sh index e28d1d1242..ecef407c29 100755 --- a/bin/check_openmpvv.sh +++ b/bin/check_openmpvv.sh @@ -1,5 +1,9 @@ #!/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 1185cdcef3..4f8a32e4bb 100755 --- a/bin/clone_list_checkout +++ b/bin/clone_list_checkout @@ -1,5 +1,9 @@ #!/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/rocmlibs/build_half.sh b/bin/rocmlibs/build_half.sh index 418f567235..8ef9ffc843 100755 --- a/bin/rocmlibs/build_half.sh +++ b/bin/rocmlibs/build_half.sh @@ -1,4 +1,8 @@ #!/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 ed16b68590..8fe81aa675 100755 --- a/bin/rocmlibs/build_hipBLAS-common.sh +++ b/bin/rocmlibs/build_hipBLAS-common.sh @@ -1,4 +1,9 @@ #!/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 c35fab740c..92d8199c38 100755 --- a/bin/rocmlibs/build_hipRAND.sh +++ b/bin/rocmlibs/build_hipRAND.sh @@ -1,4 +1,9 @@ #!/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 05137d502c..1e4316aa57 100755 --- a/bin/rocmlibs/build_hipSOLVER.sh +++ b/bin/rocmlibs/build_hipSOLVER.sh @@ -1,4 +1,9 @@ #!/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 60534a535a..6a198d3804 100755 --- a/bin/rocmlibs/build_rccl.sh +++ b/bin/rocmlibs/build_rccl.sh @@ -1,4 +1,9 @@ #!/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 3f7c16b146..2260674c33 100755 --- a/bin/rocmlibs/build_rocRAND.sh +++ b/bin/rocmlibs/build_rocRAND.sh @@ -1,4 +1,9 @@ #!/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/run_composable-kernels.sh b/bin/run_composable-kernels.sh index 98c5cf50cf..326428ac19 100755 --- a/bin/run_composable-kernels.sh +++ b/bin/run_composable-kernels.sh @@ -1,4 +1,9 @@ #!/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' CKRepoBranchName='develop' diff --git a/bin/run_gpurun_rocprof_env.sh b/bin/run_gpurun_rocprof_env.sh index dcf6b5b7ab..2a05794650 100755 --- a/bin/run_gpurun_rocprof_env.sh +++ b/bin/run_gpurun_rocprof_env.sh @@ -1,5 +1,10 @@ #!/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/examples/fortran/fortran-hip-interop/fortran_callable_init.hip b/examples/fortran/fortran-hip-interop/fortran_callable_init.hip index a6bd393bce..72fef8ca74 100644 --- a/examples/fortran/fortran-hip-interop/fortran_callable_init.hip +++ b/examples/fortran/fortran-hip-interop/fortran_callable_init.hip @@ -1,3 +1,7 @@ +// 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 6b19469c38..130dbeda83 100644 --- a/examples/fortran/fortran-hip-interop/fortran_hip_interop.f95 +++ b/examples/fortran/fortran-hip-interop/fortran_hip_interop.f95 @@ -1,3 +1,8 @@ +! +!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 6976f2fb57..068dd9de21 100644 --- a/examples/fortran/gdb-simple/gdb_simple.f95 +++ b/examples/fortran/gdb-simple/gdb_simple.f95 @@ -1,3 +1,8 @@ +! +!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 f689227dee..8da0a868a9 100644 --- a/examples/fortran/gdb-simple/gdbcmds +++ b/examples/fortran/gdb-simple/gdbcmds @@ -1,2 +1,7 @@ +# +#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 daa1b9539d..cd94253e0e 100644 --- a/examples/fortran/is-initial-device-api/is-initial-device.f90 +++ b/examples/fortran/is-initial-device-api/is-initial-device.f90 @@ -1,3 +1,8 @@ +! +!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 2545243129..8af8094f2b 100644 --- a/examples/fortran/simple-offload/simple_offload.f95 +++ b/examples/fortran/simple-offload/simple_offload.f95 @@ -1,3 +1,8 @@ +! +!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/test/smoke-dev/ompx-bare/ompx_bare.c b/test/smoke-dev/ompx-bare/ompx_bare.c index 8beb60dc92..2e7e070ebb 100644 --- a/test/smoke-dev/ompx-bare/ompx_bare.c +++ b/test/smoke-dev/ompx-bare/ompx_bare.c @@ -1,3 +1,8 @@ +// +// 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/testmarch/test.cpp b/test/smoke-dev/testmarch/test.cpp index 86663dbe40..399bdfb9db 100644 --- a/test/smoke-dev/testmarch/test.cpp +++ b/test/smoke-dev/testmarch/test.cpp @@ -1,3 +1,7 @@ +// 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-calls-target-fast/xteam-red-min-max-calls.c b/test/smoke-dev/xteam-red-min-max-calls-target-fast/xteam-red-min-max-calls.c index 1bc8792747..0fcfe6e930 100644 --- a/test/smoke-dev/xteam-red-min-max-calls-target-fast/xteam-red-min-max-calls.c +++ b/test/smoke-dev/xteam-red-min-max-calls-target-fast/xteam-red-min-max-calls.c @@ -1,4 +1,7 @@ -/* +/* 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/xteam-red-min-max-calls.c b/test/smoke-dev/xteam-red-min-max-calls/xteam-red-min-max-calls.c index f1a0062900..da8e53d656 100644 --- a/test/smoke-dev/xteam-red-min-max-calls/xteam-red-min-max-calls.c +++ b/test/smoke-dev/xteam-red-min-max-calls/xteam-red-min-max-calls.c @@ -1,4 +1,7 @@ -/* +/* 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. abs is not yet recognized as a * math function and hence treated as a regular function call. In diff --git a/test/smoke-dev/xteam-red-min-max-small-precision-builtin/xteam-red-min-max-small-precision-builtin.c b/test/smoke-dev/xteam-red-min-max-small-precision-builtin/xteam-red-min-max-small-precision-builtin.c index fc752f8756..4ee0a52d35 100644 --- a/test/smoke-dev/xteam-red-min-max-small-precision-builtin/xteam-red-min-max-small-precision-builtin.c +++ b/test/smoke-dev/xteam-red-min-max-small-precision-builtin/xteam-red-min-max-small-precision-builtin.c @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include @@ -61,4 +65,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 \ No newline at end of file +/// CHECK: DEVID:[[S:[ ]*]][[DEVID:[0-9]+]] SGN:8 diff --git a/test/smoke-dev/xteam-red-min-max-small-precision/xteam-red-min-max-small-precision.c b/test/smoke-dev/xteam-red-min-max-small-precision/xteam-red-min-max-small-precision.c index 96e03e02a8..ce0cc8260e 100644 --- a/test/smoke-dev/xteam-red-min-max-small-precision/xteam-red-min-max-small-precision.c +++ b/test/smoke-dev/xteam-red-min-max-small-precision/xteam-red-min-max-small-precision.c @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include #include @@ -62,4 +66,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 \ No newline at end of file +/// CHECK: DEVID:[[S:[ ]*]][[DEVID:[0-9]+]] SGN:8 diff --git a/test/smoke-dev/xteam-red-min-max-std/xteam-red-min-max-std.cpp b/test/smoke-dev/xteam-red-min-max-std/xteam-red-min-max-std.cpp index b7531038f1..2f7204b4ad 100644 --- a/test/smoke-dev/xteam-red-min-max-std/xteam-red-min-max-std.cpp +++ b/test/smoke-dev/xteam-red-min-max-std/xteam-red-min-max-std.cpp @@ -1,3 +1,7 @@ +// Copyright © Advanced Micro Devices, Inc., or its affiliates. +// +// SPDX-License-Identifier: MIT + #include #include #include From 2d9b4606de29486f0bb7b8f33f76f63e3013d09c Mon Sep 17 00:00:00 2001 From: Catherine Moore Date: Mon, 16 Sep 2024 17:24:53 -0500 Subject: [PATCH 5/6] Remove SimpleTimer.h due to invalid license. Recode use of timer routines using in tsp.cpp. --- examples/stdpar/tsp/SimpleTimer.h | 51 ------------------------------- examples/stdpar/tsp/tsp.cpp | 17 ++++++----- 2 files changed, 9 insertions(+), 59 deletions(-) delete mode 100644 examples/stdpar/tsp/SimpleTimer.h diff --git a/examples/stdpar/tsp/SimpleTimer.h b/examples/stdpar/tsp/SimpleTimer.h deleted file mode 100644 index 0babcff677..0000000000 --- a/examples/stdpar/tsp/SimpleTimer.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * borrowed from https://gist.github.com/mcleary/b0bf4fa88830ff7c882d - */ - -#include -#include -#include -#include - -class SimpleTimer -{ -public: - void start() - { - m_StartTime = std::chrono::system_clock::now(); - m_bRunning = true; - } - - void stop() - { - m_EndTime = std::chrono::system_clock::now(); - m_bRunning = false; - } - - double elapsedMilliseconds() - { - std::chrono::time_point endTime; - - if(m_bRunning) - { - endTime = std::chrono::system_clock::now(); - } - else - { - endTime = m_EndTime; - } - - return std::chrono::duration_cast(endTime - m_StartTime).count(); - } - - double elapsedSeconds() - { - return elapsedMilliseconds() / 1000.0; - } - -private: - std::chrono::time_point m_StartTime; - std::chrono::time_point m_EndTime; - bool m_bRunning = false; - -}; // class Simpletimer diff --git a/examples/stdpar/tsp/tsp.cpp b/examples/stdpar/tsp/tsp.cpp index fa52ce33ce..7448b3c0c0 100644 --- a/examples/stdpar/tsp/tsp.cpp +++ b/examples/stdpar/tsp/tsp.cpp @@ -2,7 +2,6 @@ #include "route_cost.h" #include "tsp_utils.h" #include "counting_iterator.h" -#include "SimpleTimer.h" // #include // #include @@ -15,9 +14,13 @@ #include #include +#include #include #include +using namespace std; +using namespace std::chrono; + // ============================================ // ============================================ void print_factorials(int N) @@ -122,24 +125,22 @@ route_cost find_best_route(int const* distances) // ============================================================ // ============================================================ //! \param[in] nbRepeat number of repeat (for accurate time measurement) + template void solve_traveling_salesman(int nbRepeat = 1) { - // find best route auto distances_small = init_distance_matrix_small(N); - route_cost best_route; - SimpleTimer timer; - timer.start(); + auto start = high_resolution_clock::now(); for (int i = 0; i(distances_small.data()); - timer.stop(); - double time = timer.elapsedSeconds()/nbRepeat; + auto end = high_resolution_clock::now(); + duration elapsed = (end - start) / nbRepeat; // print best route - printf("Trav Salesman Prob N=%d, best route cost is: %d, average time is %f seconds\n",N, best_route.cost, time); + printf("Trav Salesman Prob N=%d, best route cost is: %d, average time is %f seconds\n",N, best_route.cost, elapsed.count()); printf("Solution route is "); route_iterator rit(best_route.route); From a431dc56b416ae5c6ac13698897f5a93f980343b Mon Sep 17 00:00:00 2001 From: Catherine Moore Date: Tue, 17 Sep 2024 16:07:31 -0500 Subject: [PATCH 6/6] 1. Remove counting_iterator.h due to licensing issues 2. Update Makefile to use c++-20 3. Remove counting_iterator references in call to transform_reduce --- examples/stdpar/tsp/Makefile | 3 +- examples/stdpar/tsp/counting_iterator.h | 82 ------------------------- examples/stdpar/tsp/tsp.cpp | 21 +++---- 3 files changed, 9 insertions(+), 97 deletions(-) delete mode 100644 examples/stdpar/tsp/counting_iterator.h diff --git a/examples/stdpar/tsp/Makefile b/examples/stdpar/tsp/Makefile index da8a9b191b..72dfac71be 100644 --- a/examples/stdpar/tsp/Makefile +++ b/examples/stdpar/tsp/Makefile @@ -23,7 +23,8 @@ ifeq ("$(wildcard $(HIPSTDPARPRIMPATH)/rocprim)","") endif CC = $(LLVM_INSTALL_DIR)/bin/clang++ -opts=-I. -DNDEBUG -O3 --hipstdpar --hipstdpar-path=$(HIPSTDPARPATH) --hipstdpar-thrust-path=$(HIPSTDPARTHRUSTPATH) --hipstdpar-prim-path=$(HIPSTDPARPRIMPATH) --offload-arch=$(LLVM_GPU_ARCH) -std=c++17 +#opts=-I. -DNDEBUG -O3 --hipstdpar --hipstdpar-path=$(HIPSTDPARPATH) --hipstdpar-thrust-path=$(HIPSTDPARTHRUSTPATH) --hipstdpar-prim-path=$(HIPSTDPARPRIMPATH) --offload-arch=$(LLVM_GPU_ARCH) -std=c++17 +opts=-I. -g -O0 --hipstdpar --hipstdpar-path=$(HIPSTDPARPATH) --hipstdpar-thrust-path=$(HIPSTDPARTHRUSTPATH) --hipstdpar-prim-path=$(HIPSTDPARPRIMPATH) --offload-arch=$(LLVM_GPU_ARCH) -std=c++20 # Build both babelstream stdpar binaries tsp:tsp.o diff --git a/examples/stdpar/tsp/counting_iterator.h b/examples/stdpar/tsp/counting_iterator.h deleted file mode 100644 index 477aa11c6c..0000000000 --- a/examples/stdpar/tsp/counting_iterator.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef COUNTING_ITERATOR_H_ -#define COUNTING_ITERATOR_H_ - -#include -#include // for std::make_signed -#include - -/* - * This class is borrowed from Lulesh: - * https://github.com/LLNL/LULESH - */ -struct counting_iterator -{ - -private: - using self = counting_iterator; - -public: - using Index_t = int64_t; - using value_type = Index_t; - using difference_type = typename std::make_signed::type; - using pointer = Index_t*; - using reference = Index_t&; - using iterator_category = std::random_access_iterator_tag; - - counting_iterator() : value(0) { } - explicit counting_iterator(value_type v) : value(v) { } - - value_type operator*() const { return value; } - value_type operator[](difference_type n) const { return value + n; } - - self& operator++() { ++value; return *this; } - self operator++(int) { - self result{value}; - ++value; - return result; - } - self& operator--() { --value; return *this; } - self operator--(int) { - self result{value}; - --value; - return result; - } - self& operator+=(difference_type n) { value += n; return *this; } - self& operator-=(difference_type n) { value -= n; return *this; } - - friend self operator+(self const& i, difference_type n) { - return self(i.value + n); - } - friend self operator+(difference_type n, self const& i) { - return self(i.value + n); - } - friend difference_type operator-(self const& x, self const& y) { - return x.value - y.value; - } - friend self operator-(self const& i, difference_type n) { - return self(i.value - n); - } - - friend bool operator==(self const& x, self const& y) { - return x.value == y.value; - } - friend bool operator!=(self const& x, self const& y) { - return x.value != y.value; - } - friend bool operator<(self const& x, self const& y) { - return x.value < y.value; - } - friend bool operator<=(self const& x, self const& y) { - return x.value <= y.value; - } - friend bool operator>(self const& x, self const& y) { - return x.value > y.value; - } - friend bool operator>=(self const& x, self const& y) { - return x.value >= y.value; - } -private: - value_type value; -}; - -#endif // COUNTING_ITERATOR_H_ diff --git a/examples/stdpar/tsp/tsp.cpp b/examples/stdpar/tsp/tsp.cpp index 7448b3c0c0..48fef359a3 100644 --- a/examples/stdpar/tsp/tsp.cpp +++ b/examples/stdpar/tsp/tsp.cpp @@ -1,7 +1,6 @@ #include "route_iterator.h" #include "route_cost.h" #include "tsp_utils.h" -#include "counting_iterator.h" // #include // #include @@ -17,6 +16,7 @@ #include #include #include +#include using namespace std; using namespace std::chrono; @@ -82,23 +82,20 @@ void test_city_distance() } // test_city_distance -// ============================================ -// ============================================ + template route_cost find_best_route(int const* distances) { - + int X = factorial(N); return std::transform_reduce(std::execution::par_unseq, - counting_iterator(0), - counting_iterator(factorial(N)), + std::views::iota(0, X).begin(), + std::views::iota(0, X).end(), route_cost(), - //route_cost::minf, [](route_cost x, route_cost y) { return x.cost < y.cost ? x : y; }, [=](int64_t i) { int cost = 0; - route_iterator it(i); // first city visited @@ -109,18 +106,14 @@ route_cost find_best_route(int const* distances) while (!it.done()) { int to = it.next(); - cost += distances[to + N*from]; + cost += distances[to + N * from]; from = to; } - - // debug - // printf("route #%d cost=%d\n",i,cost); - // update best_route -> reduction return route_cost(i, cost); }); -} // find_best_route +} // ============================================================ // ============================================================