diff --git a/bin/build_flang-classic.sh b/bin/build_flang-classic.sh index 4ad0a1d2f..b61228f56 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 b4fa8a6dc..9c456233d 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_llvm-flang-rt-host-dev.sh b/bin/build_llvm-flang-rt-host-dev.sh index 739234a6f..c1be967ff 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-register.sh b/bin/build_rocprofiler-register.sh index 489a9136e..e3f66634c 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/build_rocprofiler-sdk.sh b/bin/build_rocprofiler-sdk.sh index b95222505..ff2fc13be 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 e28d1d124..ecef407c2 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 1185cdcef..4f8a32e4b 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/diff_driver.sh b/bin/diff_driver.sh index d70ef82f5..7f1d0a3f3 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_half.sh b/bin/rocmlibs/build_half.sh index 418f56723..8ef9ffc84 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 ed16b6859..8fe81aa67 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_hipBLAS.sh b/bin/rocmlibs/build_hipBLAS.sh index 6483123e4..76849c6ca 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_hipRAND.sh b/bin/rocmlibs/build_hipRAND.sh index c35fab740..92d8199c3 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 05137d502..1e4316aa5 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_powerinfer.sh b/bin/rocmlibs/build_powerinfer.sh index c23ce6bd0..a6143a920 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_rccl.sh b/bin/rocmlibs/build_rccl.sh index 60534a535..6a198d380 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_rocBLAS.sh b/bin/rocmlibs/build_rocBLAS.sh index 5eef6f8cc..cf244b6f3 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 32ff54e35..2c49ce1fe 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_rocRAND.sh b/bin/rocmlibs/build_rocRAND.sh index 3f7c16b14..2260674c3 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/rocmlibs/build_rocSOLVER.sh b/bin/rocmlibs/build_rocSOLVER.sh index dd95c90a4..e511511d6 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 e16c20fcd..bd9ef06c9 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 064c1fa71..f6697fd7a 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 dac87fb08..7ed39dbe6 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 6cd011fd4..ef3adba40 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 91d7ac485..c4fe6bb3e 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 567f88aed..ecefcce8b 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_composable-kernels.sh b/bin/run_composable-kernels.sh index 98c5cf50c..326428ac1 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 dcf6b5b7a..2a0579465 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/bin/run_hpc2021.sh b/bin/run_hpc2021.sh index 4c070ee31..1683bf683 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/examples/fortran/fortran-hip-interop/fortran_callable_init.hip b/examples/fortran/fortran-hip-interop/fortran_callable_init.hip index a6bd393bc..72fef8ca7 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 6b19469c3..130dbeda8 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 6976f2fb5..068dd9de2 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 f689227de..8da0a868a 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 daa1b9539..cd94253e0 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 254524312..8af8094f2 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/examples/stdpar/tsp/Makefile b/examples/stdpar/tsp/Makefile index da8a9b191..72dfac71b 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/SimpleTimer.h b/examples/stdpar/tsp/SimpleTimer.h deleted file mode 100644 index 0babcff67..000000000 --- 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/counting_iterator.h b/examples/stdpar/tsp/counting_iterator.h deleted file mode 100644 index 477aa11c6..000000000 --- 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 fa52ce33c..48fef359a 100644 --- a/examples/stdpar/tsp/tsp.cpp +++ b/examples/stdpar/tsp/tsp.cpp @@ -1,8 +1,6 @@ #include "route_iterator.h" #include "route_cost.h" #include "tsp_utils.h" -#include "counting_iterator.h" -#include "SimpleTimer.h" // #include // #include @@ -15,8 +13,13 @@ #include #include +#include #include #include +#include + +using namespace std; +using namespace std::chrono; // ============================================ // ============================================ @@ -79,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 @@ -106,40 +106,34 @@ 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 +} // ============================================================ // ============================================================ //! \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); diff --git a/test/smoke-asan/hip-gbo/hip-gbo.cpp b/test/smoke-asan/hip-gbo/hip-gbo.cpp index 23adcbd79..3059aaf95 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 625cb5935..e5b8c7348 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 8324ab478..4f9ce0d2b 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 c00a3b02b..af3381976 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 b0792efea..e53d59fba 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 146eb89fa..19fab6bdf 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 1e06d00d8..1ee7d6929 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 9af33096e..e3723c951 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 bb96f742e..1fb8d7907 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 d55b81e0a..9939673af 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 95cdd365f..7f4b0c709 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 da35374f8..76dbbe350 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 c0a31e13f..765e7e9f3 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 6d29f656c..2b588c062 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 b40547cad..2fc0432c0 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 e9f71c02b..6d3e8e6bc 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 5035e9084..dc3cd7fdc 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 64c74dc0c..efe0a8c64 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 cc814f0be..da0336781 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 ce79c906f..4bbcc06c1 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 b68c9ade5..541055204 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 44503f25f..6e548056a 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 5c6ac7a54..207b30625 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/ompx-bare/ompx_bare.c b/test/smoke-dev/ompx-bare/ompx_bare.c index 8beb60dc9..2e7e070eb 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/red_bug_51/red_bug_51.cpp b/test/smoke-dev/red_bug_51/red_bug_51.cpp index 2d841d7af..6ae5a7346 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 cad63f94d..f1ba9e3fd 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 be84403a9..c51aa12bc 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 ac38d05bd..d71fd3fbe 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 448a7ded2..e4fe23b3c 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 29444417b..92023ace5 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 be6acf0b1..b74fb84b0 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/testmarch/test.cpp b/test/smoke-dev/testmarch/test.cpp index 86663dbe4..399bdfb9d 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-collapse/xteam_red_collapse.c b/test/smoke-dev/xteam-red-collapse/xteam_red_collapse.c index 1c83629b9..1dbd52adf 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/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 1bc879274..0fcfe6e93 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 f1a006290..da8e53d65 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 fc752f875..4ee0a52d3 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 96e03e02a..ce0cc8260 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 b7531038f..2f7204b4a 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 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 fe3d0479c..34356ad98 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-dev/xteamr/test_xteamr.h b/test/smoke-dev/xteamr/test_xteamr.h index c14606a79..93243eed5 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 06961db90..c196d09a3 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 2db5e038c..71876d4d8 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 a6bd393bc..72fef8ca7 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/atomic-contended/performBuildRun.sh b/test/smoke-fails/atomic-contended/performBuildRun.sh index f0c97712b..59624fdd1 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/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 888aa02da..630a8ee43 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 b8e031d0c..5293493d4 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 0ecd9c680..e4d278697 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/gpus/gpus.c b/test/smoke-fails/gpus/gpus.c index 8cc302974..11c046083 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-fails/noloop-nonrect-collapse/noloop_nonrect_collapse.cpp b/test/smoke-fails/noloop-nonrect-collapse/noloop_nonrect_collapse.cpp index ea8e678ad..043cb684a 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 78f319396..141c758af 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 413fcc840..865ad9ee1 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 130547653..f75623b82 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 b50ad376c..b7a70497d 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-dev/openmp-ver/doit.sh b/test/smoke-fort-dev/openmp-ver/doit.sh index d8583ccd0..2ae6c1448 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/flang-target-associate-ptr/device-omp.c b/test/smoke-fort/flang-target-associate-ptr/device-omp.c index af2ad3121..194bc8158 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-fort/split-dist-par-c/split-dist-par.c b/test/smoke-fort/split-dist-par-c/split-dist-par.c index 40e6f9482..c3a71641d 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/Makefile b/test/smoke-limbo/omptest-device-emi/Makefile index e3718127c..1afcf7777 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/omptest-device-emi.cpp b/test/smoke-limbo/omptest-device-emi/omptest-device-emi.cpp index d3d1b6bae..aadc8c07d 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-emi/performBuildRun.sh b/test/smoke-limbo/omptest-device-emi/performBuildRun.sh index ff8a36e69..fa240420e 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 253ed7266..aa1a59526 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/omptest-device-non-emi.cpp b/test/smoke-limbo/omptest-device-non-emi/omptest-device-non-emi.cpp index f121b62fb..9a7275cf8 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/omptest-device-non-emi/performBuildRun.sh b/test/smoke-limbo/omptest-device-non-emi/performBuildRun.sh index ff8a36e69..fa240420e 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 dd8b95b28..ef68b72c7 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 7c50a93dc..fa240420e 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!" diff --git a/test/smoke-limbo/veccopy-ompt-target-tracing/callbacks.h b/test/smoke-limbo/veccopy-ompt-target-tracing/callbacks.h index a442c1e8b..cfb5fd414 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 e8721b85c..e10ac3fc1 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-1/xteam_red_split_1.c b/test/smoke-limbo/xteam-red-split-1/xteam_red_split_1.c index fe3d0479c..34356ad98 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-limbo/xteam-red-split-2/xteam_red_split_2.c b/test/smoke-limbo/xteam-red-split-2/xteam_red_split_2.c index 8c2d174d4..59f333032 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 0ef59035a..ab65c8aed 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/clang_udel_saxpy/clang_udel_saxpy.cc b/test/smoke/clang_udel_saxpy/clang_udel_saxpy.cc index 86b6d161c..90d4f43d2 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 b1ff61bd0..41a0b9e14 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 diff --git a/test/smoke/hipmalloc-omptarget-multifile/hipMallocOmpTarget1.cpp b/test/smoke/hipmalloc-omptarget-multifile/hipMallocOmpTarget1.cpp index a85878161..a70c751bf 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 062b0d7cd..d8b61c472 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 3b7588da1..af9637d1a 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 0d7df4bb5..4128f876f 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 3e2368e07..a28554c77 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);