From 09fe8aff9643fff59a299400d257df3c927f2939 Mon Sep 17 00:00:00 2001 From: Ben Liu <38140930+liu15@users.noreply.github.com> Date: Mon, 9 Sep 2024 20:52:54 -0700 Subject: [PATCH 01/24] Fix syntax error in raja-chai integration test (#276) * Fix syntax error in raja-chai integration test * Avoid building non-essential stuff from umpire and raja --------- Co-authored-by: Alan Dayton --- cmake/thirdparty/SetupChaiThirdparty.cmake | 8 +++++++- tests/integration/raja-chai-tests.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cmake/thirdparty/SetupChaiThirdparty.cmake b/cmake/thirdparty/SetupChaiThirdparty.cmake index eac981ca..aae229f2 100644 --- a/cmake/thirdparty/SetupChaiThirdparty.cmake +++ b/cmake/thirdparty/SetupChaiThirdparty.cmake @@ -15,8 +15,11 @@ if (NOT TARGET umpire) else () message(STATUS "[CHAI] Using internal Umpire") + set(UMPIRE_ENABLE_BENCHMARKS Off CACHE BOOL "Enable benchmarks in Umpire") + set(UMPIRE_ENABLE_C Off CACHE BOOL "Enable C in Umpire") + set(UMPIRE_ENABLE_DOCS Off CACHE BOOL "Enable documentation in Umpire") + set(UMPIRE_ENABLE_EXAMPLES Off CACHE BOOL "Enable examples in Umpire") set(UMPIRE_ENABLE_FORTRAN Off CACHE BOOL "Enable Fortran in Umpire") - set(UMPIRE_ENABLE_C Off CACHE BOOL "Enable Fortran in Umpire") set(UMPIRE_ENABLE_TESTS Off CACHE BOOL "Enable tests in Umpire") set(UMPIRE_ENABLE_TOOLS Off CACHE BOOL "Enable tools in Umpire") @@ -35,8 +38,11 @@ if (CHAI_ENABLE_RAJA_PLUGIN) message(FATAL_ERROR "[CHAI] RAJA not found! Set raja_DIR to the install location of RAJA or run 'git submodule update --init --recursive' in the CHAI repository, then try building again.") else () message(STATUS "[CHAI] Using internal RAJA") + set(RAJA_ENABLE_BENCHMARKS Off CACHE BOOL "Enable benchmarks in RAJA") + set(RAJA_ENABLE_DOCS Off CACHE BOOL "Enable documentation in RAJA") set(RAJA_ENABLE_EXAMPLES Off CACHE BOOL "Enable examples in RAJA") set(RAJA_ENABLE_EXERCISES Off CACHE BOOL "Enable exercises in RAJA") + set(RAJA_ENABLE_TESTS Off CACHE BOOL "Enable tests in RAJA") add_subdirectory(${PROJECT_SOURCE_DIR}/src/tpl/raja) endif () endif () diff --git a/tests/integration/raja-chai-tests.cpp b/tests/integration/raja-chai-tests.cpp index 6cabbe91..8fc7d587 100644 --- a/tests/integration/raja-chai-tests.cpp +++ b/tests/integration/raja-chai-tests.cpp @@ -139,7 +139,7 @@ CUDA_TEST(ChaiTest, MultiView) }); // accessing pointer to v2_array - float* raw_v2 = mview.data[1]; + float* raw_v2 = mview.data[1].data(); for (int i = 0; i < 10; i++) { ASSERT_FLOAT_EQ(raw_v2[i], i * 1.0f * 2.0f * 2.0f); ; From 6e1388bfc73bd493e08ed74e679d4e8f5d916b21 Mon Sep 17 00:00:00 2001 From: Ben Liu <38140930+liu15@users.noreply.github.com> Date: Wed, 18 Sep 2024 09:21:36 -0700 Subject: [PATCH 02/24] Tabale reproducer (#281) * Add ROCM GPU crash reproducer for complex inheritance heirarchy * Add host configs for easier standalone builds * Make CHAI_ENABLE_REPRODUCERS independent --------- Co-authored-by: Alan Dayton --- CMakeLists.txt | 2 - .../blueos_3_ppc64le_ib_p9/nvcc_clang.cmake | 32 ++ host-configs/lc/toss_4_x86_64_ib/clang.cmake | 20 + host-configs/lc/toss_4_x86_64_ib/intel.cmake | 20 + .../lc/toss_4_x86_64_ib_cray/amdclang.cmake | 26 ++ reproducers/CMakeLists.txt | 8 + ...ed_ptr_multiple_inheritance_reproducer.cpp | 352 ++++++++++++++++++ 7 files changed, 458 insertions(+), 2 deletions(-) create mode 100644 host-configs/lc/blueos_3_ppc64le_ib_p9/nvcc_clang.cmake create mode 100644 host-configs/lc/toss_4_x86_64_ib/clang.cmake create mode 100644 host-configs/lc/toss_4_x86_64_ib/intel.cmake create mode 100644 host-configs/lc/toss_4_x86_64_ib_cray/amdclang.cmake create mode 100644 reproducers/managed_ptr_multiple_inheritance_reproducer.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 80b00b78..fbee03b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,8 +71,6 @@ cmake_dependent_option(CHAI_ENABLE_DOCS "Build CHAI docs" On "ENABLE_DOCS" Off) cmake_dependent_option( CHAI_ENABLE_GMOCK "Build CHAI with gmock" On "ENABLE_GMOCK" Off ) -cmake_dependent_option(CHAI_ENABLE_REPRODUCERS "Build CHAI reproducers" On - "ENABLE_REPRODUCERS" Off) include(cmake/ChaiBasics.cmake) diff --git a/host-configs/lc/blueos_3_ppc64le_ib_p9/nvcc_clang.cmake b/host-configs/lc/blueos_3_ppc64le_ib_p9/nvcc_clang.cmake new file mode 100644 index 00000000..4a03099a --- /dev/null +++ b/host-configs/lc/blueos_3_ppc64le_ib_p9/nvcc_clang.cmake @@ -0,0 +1,32 @@ +############################################################################## +# Copyright (c) 2024, Lawrence Livermore National Security, LLC and CHAI +# project contributors. See the CHAI LICENSE file for details. +# +# SPDX-License-Identifier: BSD-3-Clause +############################################################################## + +# Set up software versions +set(CLANG_VERSION "ibm-14.0.5" CACHE PATH "") +set(CUDA_VERSION "11.8.0" CACHE PATH "") +set(GCC_VERSION "11.2.1" CACHE PATH "") + +# Set up compilers +set(COMPILER_BASE "/usr/tce/packages/clang/clang-${CLANG_VERSION}" CACHE PATH "") +set(CMAKE_C_COMPILER "${COMPILER_BASE}/bin/clang" CACHE PATH "") +set(CMAKE_CXX_COMPILER "${COMPILER_BASE}/bin/clang++" CACHE PATH "") + +# Set up compiler flags +set(GCC_HOME "/usr/tce/packages/gcc/gcc-${GCC_VERSION}" CACHE PATH "") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --gcc-toolchain=${GCC_HOME}" CACHE STRING "") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --gcc-toolchain=${GCC_HOME}" CACHE STRING "") + +# Prevent the wrong libraries from being linked in +set(BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE "/usr/tce/packages/gcc/gcc-4.9.3/lib64/gcc/powerpc64le-unknown-linux-gnu/4.9.3;/usr/tce/packages/gcc/gcc-4.9.3/lib64" CACHE STRING "") + +# Set up CUDA +set(ENABLE_CUDA ON CACHE BOOL "Enable CUDA") +set(CUDA_TOOLKIT_ROOT_DIR "/usr/tce/packages/cuda/cuda-${CUDA_VERSION}" CACHE PATH "Path to CUDA") +set(CMAKE_CUDA_COMPILER "${CUDA_TOOLKIT_ROOT_DIR}/bin/nvcc" CACHE PATH "") +set(CMAKE_CUDA_HOST_COMPILER "${CMAKE_CXX_COMPILER}" CACHE PATH "") +set(CMAKE_CUDA_ARCHITECTURES "70" CACHE STRING "") +set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler=--gcc-toolchain=${GCC_HOME}" CACHE STRING "") diff --git a/host-configs/lc/toss_4_x86_64_ib/clang.cmake b/host-configs/lc/toss_4_x86_64_ib/clang.cmake new file mode 100644 index 00000000..e9feda97 --- /dev/null +++ b/host-configs/lc/toss_4_x86_64_ib/clang.cmake @@ -0,0 +1,20 @@ +############################################################################## +# Copyright (c) 2024, Lawrence Livermore National Security, LLC and CHAI +# project contributors. See the CHAI LICENSE file for details. +# +# SPDX-License-Identifier: BSD-3-Clause +############################################################################## + +# Set up software versions +set(CLANG_VERSION "14.0.6" CACHE PATH "") +set(GCC_VERSION "12.1.1" CACHE PATH "") + +# Set up compilers +set(COMPILER_BASE "/usr/tce/packages/clang/clang-${CLANG_VERSION}-magic" CACHE PATH "") +set(CMAKE_C_COMPILER "${COMPILER_BASE}/bin/clang" CACHE PATH "") +set(CMAKE_CXX_COMPILER "${COMPILER_BASE}/bin/clang++" CACHE PATH "") + +# Set up compiler flags +set(GCC_HOME "/usr/tce/packages/gcc/gcc-${GCC_VERSION}-magic" CACHE PATH "") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --gcc-toolchain=${GCC_HOME}" CACHE STRING "") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --gcc-toolchain=${GCC_HOME}" CACHE STRING "") diff --git a/host-configs/lc/toss_4_x86_64_ib/intel.cmake b/host-configs/lc/toss_4_x86_64_ib/intel.cmake new file mode 100644 index 00000000..644d97d2 --- /dev/null +++ b/host-configs/lc/toss_4_x86_64_ib/intel.cmake @@ -0,0 +1,20 @@ +############################################################################## +# Copyright (c) 2024, Lawrence Livermore National Security, LLC and CHAI +# project contributors. See the CHAI LICENSE file for details. +# +# SPDX-License-Identifier: BSD-3-Clause +############################################################################## + +# Set up software versions +set(INTEL_VERSION "2022.1.0" CACHE PATH "") +set(GCC_VERSION "12.1.1" CACHE PATH "") + +# Set up compilers +set(COMPILER_BASE "/usr/tce/packages/intel/intel-${INTEL_VERSION}-magic" CACHE PATH "") +set(CMAKE_C_COMPILER "${COMPILER_BASE}/bin/icx" CACHE PATH "") +set(CMAKE_CXX_COMPILER "${COMPILER_BASE}/bin/icpx" CACHE PATH "") + +# Set up compiler flags +set(GCC_HOME "/usr/tce/packages/gcc/gcc-${GCC_VERSION}-magic" CACHE PATH "") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --gcc-toolchain=${GCC_HOME}" CACHE STRING "") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --gcc-toolchain=${GCC_HOME}" CACHE STRING "") diff --git a/host-configs/lc/toss_4_x86_64_ib_cray/amdclang.cmake b/host-configs/lc/toss_4_x86_64_ib_cray/amdclang.cmake new file mode 100644 index 00000000..f7895e1c --- /dev/null +++ b/host-configs/lc/toss_4_x86_64_ib_cray/amdclang.cmake @@ -0,0 +1,26 @@ +############################################################################## +# Copyright (c) 2024, Lawrence Livermore National Security, LLC and CHAI +# project contributors. See the CHAI LICENSE file for details. +# +# SPDX-License-Identifier: BSD-3-Clause +############################################################################## + +# Set up software versions +set(ROCM_VERSION "6.2.0" CACHE PATH "") +set(GCC_VERSION "12.2.1" CACHE PATH "") + +# Set up compilers +set(COMPILER_BASE "/usr/tce/packages/rocmcc/rocmcc-${ROCM_VERSION}-magic" CACHE PATH "") +set(CMAKE_C_COMPILER "${COMPILER_BASE}/bin/amdclang" CACHE PATH "") +set(CMAKE_CXX_COMPILER "${COMPILER_BASE}/bin/amdclang++" CACHE PATH "") + +# Set up compiler flags +set(GCC_HOME "/usr/tce/packages/gcc/gcc-${GCC_VERSION}" CACHE PATH "") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --gcc-toolchain=${GCC_HOME}" CACHE STRING "") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --gcc-toolchain=${GCC_HOME}" CACHE STRING "") + +# Set up HIP +set(ENABLE_HIP ON CACHE BOOL "") +set(ROCM_PATH "/usr/tce/packages/rocmcc/rocmcc-${ROCM_VERSION}-magic" CACHE PATH "") +set(CMAKE_HIP_ARCHITECTURES "gfx942:xnack+" CACHE STRING "") +set(AMDGPU_TARGETS "${CMAKE_HIP_ARCHITECTURES}" CACHE STRING "") diff --git a/reproducers/CMakeLists.txt b/reproducers/CMakeLists.txt index e5ec4348..e8a39f58 100644 --- a/reproducers/CMakeLists.txt +++ b/reproducers/CMakeLists.txt @@ -14,6 +14,14 @@ if (CHAI_ENABLE_HIP) list(APPEND chai_reproducer_depends blt::hip) endif () +if (CHAI_ENABLE_MANAGED_PTR AND (CHAI_ENABLE_HIP OR CHAI_ENABLE_CUDA)) + # This crashes with HIP but not with CUDA + blt_add_executable( + NAME managed_ptr_multiple_inheritance_reproducer.exe + SOURCES managed_ptr_multiple_inheritance_reproducer.cpp + DEPENDS_ON ${chai_reproducer_depends}) +endif () + if (CHAI_ENABLE_MANAGED_PTR AND CHAI_ENABLE_HIP) blt_add_executable( NAME virtual_function_simple_reproducer.exe diff --git a/reproducers/managed_ptr_multiple_inheritance_reproducer.cpp b/reproducers/managed_ptr_multiple_inheritance_reproducer.cpp new file mode 100644 index 00000000..fb638ef2 --- /dev/null +++ b/reproducers/managed_ptr_multiple_inheritance_reproducer.cpp @@ -0,0 +1,352 @@ +////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// project contributors. See the CHAI LICENSE file for details. +// +// SPDX-License-Identifier: BSD-3-Clause +////////////////////////////////////////////////////////////////////////////// +// +// To reproduce crash on with a ROCM compiler: +// % mkdir build_rocm +// % cd build_rocm +// % cmake -DCHAI_ENABLE_REPRODUCERS=1 -C ../host-configs/lc/toss_4_x86_64_ib_cray/amdclang.cmake .. +// % flux alloc -N 1 -n 1 -g1 make -j 40 +// % flux alloc -N 1 -n 1 -g1 ./bin/managed_ptr_multiple_inheritance_reproducer.exe +// +// - Note that the "this" pointer in YofXfromRTTable1D::RootFromBaseX differs from the +// "this" pointer in other YofXfromRTTable1D methods. The crash occurs because m_table is null +// and is dereferenced. +// - Interestingly , the crash goes away if GetNumStrings() is removed +// +// The NVCC case does not crash and has consistent pointer addresses in YofXfromRTTable1D. +// This can be reproduced with: +// % mkdir build_cuda +// % cd build_cuda +// % cmake -DCHAI_ENABLE_REPRODUCERS=1 -C ../host-configs/lc/blueos_3_ppc64le_ib_p9/nvcc_clang.cmake .. +// % lalloc 1 make -j 40 +// % lalloc 1 ./bin/managed_ptr_multiple_inheritance_reproducer.exe +// + +#include "chai/config.hpp" +#include "chai/managed_ptr.hpp" +#include "chai/ArrayManager.hpp" +#include "chai/ManagedArray.hpp" +#include +#include +#include + +class Table { + public: + CHAI_HOST_DEVICE Table() { +#ifdef CHAI_DEVICE_COMPILE + printf("Table::Table POINTER %p\n", this) ; +#endif + } + + CHAI_HOST_DEVICE virtual ~Table() {} + + class Data { + public: + CHAI_HOST_DEVICE Data() { +#ifdef CHAI_DEVICE_COMPILE + printf("Table::Data::Data POINTER %p\n", this) ; +#endif + } + + CHAI_HOST_DEVICE virtual ~Data() {} + + private: + } ; + + class Derived { + public: + CHAI_HOST_DEVICE Derived() { +#ifdef CHAI_DEVICE_COMPILE + printf("Table::Derived::Derived POINTER %p\n", this) ; +#endif + } + + CHAI_HOST_DEVICE virtual ~Derived() {} + + /// Removing this makes the bug go away!!! + virtual int GetNumStrings() const = 0 ; + } ; + + class Compute { + public: + CHAI_HOST_DEVICE Compute() { +#ifdef CHAI_DEVICE_COMPILE + printf("Table::Compute::Compute POINTER %p\n", this) ; +#endif + } + + CHAI_HOST_DEVICE virtual ~Compute() {} + + protected: + + CHAI_HOST_DEVICE double BaseXFromNewX() const { +#ifdef CHAI_DEVICE_COMPILE + printf("Table::Compute::BaseXFromNewX %p\n", this) ; +#endif + RootFromBaseX() ; + return 0.0 ; + } + + CHAI_HOST_DEVICE virtual double RootFromBaseX() const = 0; + + private: + Compute(const Compute &other); + Compute &operator=(const Compute &other); + } ; + private: + + Table(const Table &other); + + Table& operator =(const Table&); +}; + +class SimpleTable : public Table { + public: + CHAI_HOST_DEVICE SimpleTable() : Table() { +#ifdef CHAI_DEVICE_COMPILE + printf("SimpleTable::SimpleTable POINTER %p\n", this) ; +#endif + } + + + CHAI_HOST_DEVICE virtual ~SimpleTable() {} + + private: + SimpleTable(const SimpleTable& other); + + SimpleTable& operator =(const SimpleTable&); +}; + +class Table1D : public SimpleTable { + public: + CHAI_HOST_DEVICE Table1D() : SimpleTable() { +#ifdef CHAI_DEVICE_COMPILE + printf("Table1D::Table1D POINTER %p\n", this) ; +#endif + } + + CHAI_HOST_DEVICE virtual ~Table1D() {} + + CHAI_HOST_DEVICE virtual double Evaluate() const = 0 ; + + protected: + CHAI_HOST_DEVICE Table1D(const Table1D &other) = delete; + + CHAI_HOST_DEVICE Table1D& operator=(const Table1D &other) = delete; +} ; + +class DataTable1D : public Table1D, public Table::Data { + public: + CHAI_HOST_DEVICE DataTable1D() : Table1D(), Table::Data() {} + + CHAI_HOST_DEVICE virtual ~DataTable1D() {} + + CHAI_HOST_DEVICE virtual double Evaluate() const override { + return innerEvaluate() ; + } + + protected: + CHAI_HOST_DEVICE virtual double innerEvaluate() const = 0 ; +} ; + +class LinearTable1D : public DataTable1D { + public: + CHAI_HOST_DEVICE LinearTable1D() : DataTable1D() {} + + CHAI_HOST_DEVICE virtual ~LinearTable1D() {} + + CHAI_HOST_DEVICE virtual double innerEvaluate() const override { + return 0.0 ; + } + + private: + CHAI_HOST_DEVICE LinearTable1D(const LinearTable1D &other) = delete; + CHAI_HOST_DEVICE LinearTable1D &operator=(const LinearTable1D &other) = delete; +} ; + + +class DerivedTable1D : public Table1D, public Table::Data, public Table::Derived { + public: + CHAI_HOST_DEVICE DerivedTable1D() : Table1D(), Table::Data(), Table::Derived() { +#ifdef CHAI_DEVICE_COMPILE + printf("DerivedTable1D::DerivedTable1D POINTER %p\n", this) ; +#endif + } + + CHAI_HOST_DEVICE virtual ~DerivedTable1D() {} + + CHAI_HOST_DEVICE virtual double Evaluate() const override { +#ifdef CHAI_DEVICE_COMPILE + printf("DerivedTable1D::Evaluate POINTER %p\n", this) ; +#endif + return innerEvaluate() ; + } + + virtual int GetNumStrings() const override = 0; + + protected: + + CHAI_HOST_DEVICE virtual double innerEvaluate() const = 0 ; + + private: + CHAI_HOST_DEVICE DerivedTable1D(const DerivedTable1D &other) = delete; + CHAI_HOST_DEVICE DerivedTable1D &operator=(const DerivedTable1D &other) = delete; +} ; + +class StitchTable1D : public DerivedTable1D { + public: + CHAI_HOST_DEVICE StitchTable1D(int nt, chai::managed_ptr* tabs) : DerivedTable1D(), m_nTables(nt), m_tables(new const Table1D *[nt]) { + for (int i = 0 ; i < nt ; ++i) { + m_tables[i] = tabs[i].get() ; +#ifdef CHAI_DEVICE_COMPILE + printf("StitchTable1D::StitchTable1D POINTER %p i %d m_tables[i] %p\n", this, i, m_tables[i]) ; +#endif + } + } + + CHAI_HOST_DEVICE virtual ~StitchTable1D() { + if (m_nTables > 0) { + delete [] m_tables ; + } + } + + inline virtual int GetNumStrings() const override { return m_nTables; } + + private: + CHAI_HOST_DEVICE double innerEvaluate() const override { + for (int i = 0 ; i < m_nTables ; ++i) { +#ifdef CHAI_DEVICE_COMPILE + printf("StitchTable1D::innerEvaluate POINTER %p i %d m_tables[i] %p\n", this, i, m_tables[i]) ; +#endif + m_tables[i]->Evaluate() ; + } + return 0.0 ; + } + + CHAI_HOST_DEVICE StitchTable1D() = delete; + CHAI_HOST_DEVICE StitchTable1D(const StitchTable1D &other) = delete; + CHAI_HOST_DEVICE StitchTable1D &operator=(const StitchTable1D &other) = delete; + + int m_nTables ; + const Table1D ** m_tables = nullptr; +} ; + +class ComputedTable1D : public DerivedTable1D, public Table::Compute { + public: + CHAI_HOST_DEVICE ComputedTable1D(const Table1D * f) : DerivedTable1D(), Table::Compute(), m_table(f) + { +#ifdef CHAI_DEVICE_COMPILE + printf("ComputedTable1D::ComputedTable1D POINTER %p m_table %p\n", this, m_table) ; +#endif + } + + CHAI_HOST_DEVICE virtual ~ComputedTable1D() {} + + protected: + const Table1D *m_table; + + private: + CHAI_HOST_DEVICE ComputedTable1D() = delete; + CHAI_HOST_DEVICE ComputedTable1D(const ComputedTable1D &other) = delete; + CHAI_HOST_DEVICE ComputedTable1D& operator=(const ComputedTable1D &other) = delete; +} ; + +class YofXfromRTTable1D : public ComputedTable1D { + public: + CHAI_HOST_DEVICE YofXfromRTTable1D(Table1D const * f) : ComputedTable1D(f) { +#ifdef CHAI_DEVICE_COMPILE + printf("YofXfromRTTable1D::YofXfromRTTable1D POINTER %p m_table %p <<< CHECK THESE POINTERS\n", this, m_table) ; +#endif + m_table->Evaluate() ; + } + + CHAI_HOST_DEVICE virtual ~YofXfromRTTable1D() {} + + inline int virtual GetNumStrings() const override { return 1; } + + private: + CHAI_HOST_DEVICE virtual double innerEvaluate() const override { +#ifdef CHAI_DEVICE_COMPILE + printf("YofXfromRTTable1D::innerEvaluate POINTER %p m_table %p <<< CHECK THESE POINTERS\n", this, m_table) ; +#endif + BaseXFromNewX() ; + return 0.0 ; + } + + CHAI_HOST_DEVICE virtual double RootFromBaseX() const override { +#ifdef CHAI_DEVICE_COMPILE + printf("YofXfromRTTable1D::RootFromBaseX POINTER %p m_table %p <<< CHECK THESE POINTERS\n", this, m_table) ; +#endif + return m_table->Evaluate() ; + } + + CHAI_HOST_DEVICE YofXfromRTTable1D() = delete; + CHAI_HOST_DEVICE YofXfromRTTable1D(const YofXfromRTTable1D &other) = delete; + CHAI_HOST_DEVICE YofXfromRTTable1D &operator=(const YofXfromRTTable1D &other) = delete; +} ; + +class RofTfromXYTable1D : public ComputedTable1D { + public: + CHAI_HOST_DEVICE RofTfromXYTable1D(Table1D const * f) : ComputedTable1D(f) { +#ifdef CHAI_DEVICE_COMPILE + printf("RofTfromXY::RofTfromXYTable1D POINTER %p m_table %p\n", this, m_table) ; +#endif + + m_table->Evaluate() ; + } + + CHAI_HOST_DEVICE virtual ~RofTfromXYTable1D() {} + + inline int virtual GetNumStrings() const override { return 1; } + + private: + CHAI_HOST_DEVICE virtual double innerEvaluate() const override { + BaseXFromNewX() ; + return 0.0 ; + } + + CHAI_HOST_DEVICE virtual double RootFromBaseX() const override { + return m_table->Evaluate() ; + } + + CHAI_HOST_DEVICE RofTfromXYTable1D() = delete; + CHAI_HOST_DEVICE RofTfromXYTable1D(const RofTfromXYTable1D &other) = delete; + CHAI_HOST_DEVICE RofTfromXYTable1D &operator=(const RofTfromXYTable1D &other) = delete; +} ; + +int main(int, char**) { + chai::managed_ptr tabArray[6] ; + + tabArray[0] = chai::make_managed() ; + tabArray[1] = chai::make_managed(chai::unpack(tabArray[0])) ; + tabArray[2] = chai::make_managed() ; + tabArray[3] = chai::make_managed() ; + + chai::ManagedArray > host_device_temp0(2) ; + chai::managed_ptr *host_temp0 = host_device_temp0.data() ; + host_temp0[0] = tabArray[1] ; + host_temp0[1] = tabArray[2] ; + + tabArray[4] = chai::make_managed(2, chai::unpack(host_device_temp0)) ; + + chai::ManagedArray > host_device_temp1(2) ; + chai::managed_ptr *host_temp1 = host_device_temp1.data() ; + host_temp1[0] = tabArray[3] ; + host_temp1[1] = tabArray[4] ; + + tabArray[5] = chai::make_managed(2, chai::unpack(host_device_temp1)) ; + + chai::make_managed(chai::unpack(tabArray[5])) ; + + printf("SUCCESS\n") ; + + host_device_temp0.free() ; + host_device_temp1.free() ; + + return 0; +} + From e083a7989f08b08760545c0ba17e3d5560d12f0a Mon Sep 17 00:00:00 2001 From: Alan Dayton <6393677+adayton1@users.noreply.github.com> Date: Wed, 18 Sep 2024 10:08:31 -0700 Subject: [PATCH 03/24] Fix config variable in release notes (#282) --- RELEASE_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index efe8befc..4ccaf0b9 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -35,7 +35,7 @@ The format of this file is based on [Keep a Changelog](http://keepachangelog.com ## [Version 2024.02.0] - Release date 2024-03-04 ### Added -- Support for APUs with a single memory space. To use, configure with -DCHAI\_DISABLE\_RM=ON -DCHAI\_GPU\_THIN\_ALLOCATE=ON. +- Support for APUs with a single memory space. To use, configure with -DCHAI\_DISABLE\_RM=ON -DCHAI\_THIN\_GPU\_ALLOCATE=ON. ### Changed - Moved installed CMake targets from share/chai/cmake to lib/cmake/chai to be consistent with other libraries in the RAJA Portability Suite From ec3fe013fc95407ea1bcf8d53dbaf5410a646b5c Mon Sep 17 00:00:00 2001 From: Adrien Bernede <51493078+adrienbernede@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:24:33 +0200 Subject: [PATCH 04/24] Update toolchains on tioga, lassen, ruby and poodle (#275) * Update RSC * Update CI jobs * Lassen CI: Allow failure for gcc 11.2.1 + cuda 11.8 job * Inline allocate function --------- Co-authored-by: Alan Dayton Co-authored-by: Alan Dayton <6393677+adayton1@users.noreply.github.com> --- .gitlab/jobs/lassen.yml | 36 ++++++++++++++++++++-------------- .gitlab/jobs/poodle.yml | 6 ++++++ .gitlab/jobs/ruby.yml | 6 ++++++ scripts/radiuss-spack-configs | 2 +- src/chai/ManagedArray.hpp | 2 +- src/chai/ManagedArray.inl | 1 + src/chai/ManagedArray_thin.inl | 2 +- 7 files changed, 37 insertions(+), 18 deletions(-) diff --git a/.gitlab/jobs/lassen.yml b/.gitlab/jobs/lassen.yml index e55bc458..1c3100ee 100644 --- a/.gitlab/jobs/lassen.yml +++ b/.gitlab/jobs/lassen.yml @@ -17,23 +17,15 @@ # project. We keep ${PROJECT__VARIANTS} and ${PROJECT__DEPS} # So that the comparison with the original job is easier. -# Overridden to increase allocation time -xl_2022_08_19_gcc_8_3_1_cuda_11_2_0: +# Allow failure due to what appears to be a bug with handling std::function in +# cuda context (https://github.com/LLNL/CHAI/pull/275#issuecomment-2332696091) +gcc_11_2_1_cuda_11_8_0: variables: - SPEC: "${PROJECT_LASSEN_VARIANTS} +cuda %xl@16.1.1.12.gcc.8.3.1 ^cuda@11.2.0+allow-unsupported-compilers ${PROJECT_LASSEN_DEPS}" - MODULE_LIST: "cuda/11.2.0" - LASSEN_JOB_ALLOC: "1 -W 12 -q pci" - extends: .job_on_lassen - - -# Override job with old cuda to allow it to fail. -clang_12_0_1_ibm_gcc_8_3_1_cuda_10_1_243: - variables: - SPEC: "${PROJECT_LASSEN_VARIANTS} +cuda %clang@12.0.1.ibm.gcc.8.3.1 ^cuda@10.1.243+allow-unsupported-compilers ${PROJECT_LASSEN_DEPS}" + SPEC: "${PROJECT_LASSEN_VARIANTS} +cuda %gcc@=11.2.1 ^cuda@11.8.0+allow-unsupported-compilers ${PROJECT_LASSEN_DEPS}" + MODULE_LIST: "cuda/11.8.0" extends: .job_on_lassen allow_failure: true - ############ # Extra jobs ############ @@ -45,7 +37,11 @@ clang_12_0_1_libcpp: extends: .job_on_lassen variables: SPEC: "~shared +raja tests=basic %clang@12.0.1 cflags==\"-DGTEST_HAS_CXXABI_H_=0\" cxxflags==\"-stdlib=libc++ -DGTEST_HAS_CXXABI_H_=0\"" - allow_failure: true + +clang_16_0_6_libcpp: + extends: .job_on_lassen + variables: + SPEC: "~shared +raja tests=basic %clang@16.0.6 cflags==\"-DGTEST_HAS_CXXABI_H_=0\" cxxflags==\"-stdlib=libc++ -DGTEST_HAS_CXXABI_H_=0\"" clang_12_0_1_gcc_8_3_1_memleak: extends: .job_on_lassen @@ -53,9 +49,19 @@ clang_12_0_1_gcc_8_3_1_memleak: SPEC: "~shared +raja tests=basic %clang@12.0.1.gcc.8.3.1 cxxflags==\"-fsanitize=address\"" ASAN_OPTIONS: "detect_leaks=1" +clang_16_0_6_gcc_8_3_1_memleak: + extends: .job_on_lassen + variables: + SPEC: "~shared +raja tests=basic %clang@16.0.6.gcc.8.3.1 cxxflags==\"-fsanitize=address\"" + ASAN_OPTIONS: "detect_leaks=1" + clang_12_0_1_datarace: extends: .job_on_lassen variables: SPEC: "~shared +raja tests=basic %clang@12.0.1 cxxflags==\"-fsanitize=thread\"" - allow_failure: true + +clang_16_0_6_datarace: + extends: .job_on_lassen + variables: + SPEC: "~shared +raja tests=basic %clang@16.0.6 cxxflags==\"-fsanitize=thread\"" diff --git a/.gitlab/jobs/poodle.yml b/.gitlab/jobs/poodle.yml index 2d2a9a60..345aaa3e 100644 --- a/.gitlab/jobs/poodle.yml +++ b/.gitlab/jobs/poodle.yml @@ -31,3 +31,9 @@ clang_14_0_6_develop_tpls: SPEC: " %clang@14.0.6 ^umpire@develop ^raja@develop ^camp@main" extends: .job_on_poodle allow_failure: true + +clang_16_0_6_develop_tpls: + variables: + SPEC: " %clang@16.0.6 ^umpire@develop ^raja@develop ^camp@main" + extends: .job_on_poodle + allow_failure: true diff --git a/.gitlab/jobs/ruby.yml b/.gitlab/jobs/ruby.yml index f1db9969..eccb6ac8 100644 --- a/.gitlab/jobs/ruby.yml +++ b/.gitlab/jobs/ruby.yml @@ -31,3 +31,9 @@ clang_14_0_6_develop_tpls: SPEC: " %clang@14.0.6 ^umpire@develop ^raja@develop ^camp@main" extends: .job_on_ruby allow_failure: true + +clang_16_0_6_develop_tpls: + variables: + SPEC: " %clang@16.0.6 ^umpire@develop ^raja@develop ^camp@main" + extends: .job_on_ruby + allow_failure: true diff --git a/scripts/radiuss-spack-configs b/scripts/radiuss-spack-configs index 54c09b5d..e5b51383 160000 --- a/scripts/radiuss-spack-configs +++ b/scripts/radiuss-spack-configs @@ -1 +1 @@ -Subproject commit 54c09b5dcf45decaac2b1e6d1048671cde17f7e5 +Subproject commit e5b513834aa46c7e1b8ec59e31da79e65caa4dca diff --git a/src/chai/ManagedArray.hpp b/src/chai/ManagedArray.hpp index 6cfd5063..aab617d2 100644 --- a/src/chai/ManagedArray.hpp +++ b/src/chai/ManagedArray.hpp @@ -132,7 +132,7 @@ class ManagedArray : public CHAICopyable */ CHAI_HOST void allocate(size_t elems, ExecutionSpace space = CPU, - UserCallback const& cback = + const UserCallback& cback = [] (const PointerRecord*, Action, ExecutionSpace) {}); diff --git a/src/chai/ManagedArray.inl b/src/chai/ManagedArray.inl index 32339841..72b7cfbe 100644 --- a/src/chai/ManagedArray.inl +++ b/src/chai/ManagedArray.inl @@ -148,6 +148,7 @@ CHAI_HOST_DEVICE ManagedArray::ManagedArray(T* data, ArrayManager* array_mana template +CHAI_INLINE CHAI_HOST void ManagedArray::allocate( size_t elems, ExecutionSpace space, diff --git a/src/chai/ManagedArray_thin.inl b/src/chai/ManagedArray_thin.inl index d9e504e5..0cc2106b 100644 --- a/src/chai/ManagedArray_thin.inl +++ b/src/chai/ManagedArray_thin.inl @@ -167,7 +167,7 @@ template CHAI_INLINE CHAI_HOST void ManagedArray::allocate(size_t elems, ExecutionSpace space, - UserCallback const &) { + const UserCallback&) { if (!m_is_slice) { if (elems > 0) { (void) space; // Quiet compiler warning when CHAI_LOG does nothing From a1be99864cecabc5179d1e9a191a27a2e51c275c Mon Sep 17 00:00:00 2001 From: Adrien Bernede <51493078+adrienbernede@users.noreply.github.com> Date: Mon, 14 Oct 2024 18:11:45 +0200 Subject: [PATCH 05/24] Update and sandardize implementation of packages, in sync with spack update (#283) * Update RSC * Update spack * build_and_test.sh: allow to control whether or not to push to registry --------- Co-authored-by: Alan Dayton Co-authored-by: Alan Dayton <6393677+adayton1@users.noreply.github.com> --- .uberenv_config.json | 2 +- scripts/gitlab/build_and_test.sh | 4 +++- scripts/radiuss-spack-configs | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.uberenv_config.json b/.uberenv_config.json index 202b3d05..1c348e5d 100644 --- a/.uberenv_config.json +++ b/.uberenv_config.json @@ -4,7 +4,7 @@ "package_final_phase" : "initconfig", "package_source_dir" : "../..", "spack_url": "https://github.com/spack/spack.git", -"spack_branch": "develop-2024-07-07", +"spack_branch": "develop-2024-10-06", "spack_activate" : {}, "spack_configs_path": "scripts/radiuss-spack-configs", "spack_packages_path": "scripts/radiuss-spack-configs/packages", diff --git a/scripts/gitlab/build_and_test.sh b/scripts/gitlab/build_and_test.sh index f267f4d1..8bd54375 100755 --- a/scripts/gitlab/build_and_test.sh +++ b/scripts/gitlab/build_and_test.sh @@ -28,6 +28,7 @@ job_unique_id=${CI_JOB_ID:-""} use_dev_shm=${USE_DEV_SHM:-true} spack_debug=${SPACK_DEBUG:-false} debug_mode=${DEBUG_MODE:-false} +push_to_registry=${PUSH_TO_REGISTRY:-true} # REGISTRY_TOKEN allows you to provide your own personal access token to the CI # registry. Be sure to set the token with at least read access to the registry. @@ -56,6 +57,7 @@ then echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" use_dev_shm=false spack_debug=true + push_to_registry=false fi if [[ -n ${module_list} ]] @@ -150,7 +152,7 @@ then timed_message "Spack build of dependencies" ${uberenv_cmd} --skip-setup-and-env --spec="${spec}" ${prefix_opt} - if [[ -n ${ci_registry_token} && ${debug_mode} == false ]] + if [[ -n ${ci_registry_token} && ${push_to_registry} == true ]] then timed_message "Push dependencies to buildcache" ${spack_cmd} -D ${spack_env_path} buildcache push --only dependencies gitlab_ci diff --git a/scripts/radiuss-spack-configs b/scripts/radiuss-spack-configs index e5b51383..00c06c2d 160000 --- a/scripts/radiuss-spack-configs +++ b/scripts/radiuss-spack-configs @@ -1 +1 @@ -Subproject commit e5b513834aa46c7e1b8ec59e31da79e65caa4dca +Subproject commit 00c06c2d0258802fbf4a57ff987314d4acd9f629 From ff456cf07c57a2994009bdf4af4f2ad57b32c3b1 Mon Sep 17 00:00:00 2001 From: Alan Dayton <6393677+adayton1@users.noreply.github.com> Date: Tue, 29 Oct 2024 12:22:25 -0700 Subject: [PATCH 06/24] Remove deprecated getPointer method (#284) * Remove deprecated getPointer method --- RELEASE_NOTES.md | 5 +++++ src/chai/ManagedArray.hpp | 12 ------------ src/chai/ManagedArray.inl | 5 ----- src/chai/ManagedArray_thin.inl | 6 ------ tests/integration/managed_array_tests.cpp | 4 ++-- 5 files changed, 7 insertions(+), 25 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 4ccaf0b9..6062aee5 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -13,6 +13,11 @@ in this file. The format of this file is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). +## [Unreleased] - Release date yyyy-mm-dd + +### Removed +- Removes deprecated ManagedArray::getPointer method. Use ManagedArray::data instead. + ## [Version 2024.07.0] - Release date 2024-07-26 ### Changed diff --git a/src/chai/ManagedArray.hpp b/src/chai/ManagedArray.hpp index aab617d2..427e0b0b 100644 --- a/src/chai/ManagedArray.hpp +++ b/src/chai/ManagedArray.hpp @@ -228,18 +228,6 @@ class ManagedArray : public CHAICopyable */ CHAI_HOST T* data(ExecutionSpace space, bool do_move = true) const; - /*! - * \brief Deprecated! Use the data method instead! - * Return the raw pointer to the data in the given execution - * space. Optionally move the data to that execution space. - * - * \param space The execution space from which to retrieve the raw pointer. - * \param do_move Ensure data at that pointer is live and valid. - * - * @return A copy of the pointer in the given execution space - */ - CHAI_HOST T* getPointer(ExecutionSpace space, bool do_move = true) const; - /*! * \brief Move data to the current execution space (actually determined * by where the code is executing) and return an iterator to the diff --git a/src/chai/ManagedArray.inl b/src/chai/ManagedArray.inl index 72b7cfbe..82e26416 100644 --- a/src/chai/ManagedArray.inl +++ b/src/chai/ManagedArray.inl @@ -574,11 +574,6 @@ T* ManagedArray::data(ExecutionSpace space, bool do_move) const { return ((T*) m_pointer_record->m_pointers[space]) + offset; } -template -T* ManagedArray::getPointer(ExecutionSpace space, bool do_move) const { - return data(space, do_move); -} - template CHAI_INLINE CHAI_HOST_DEVICE T* ManagedArray::begin() const { diff --git a/src/chai/ManagedArray_thin.inl b/src/chai/ManagedArray_thin.inl index 0cc2106b..ee647388 100644 --- a/src/chai/ManagedArray_thin.inl +++ b/src/chai/ManagedArray_thin.inl @@ -145,12 +145,6 @@ T* ManagedArray::data(ExecutionSpace space, bool do_move) const return m_active_pointer; } -template -T* ManagedArray::getPointer(ExecutionSpace space, bool do_move) const -{ - return data(space, do_move); -} - template CHAI_INLINE CHAI_HOST_DEVICE T* ManagedArray::begin() const { diff --git a/tests/integration/managed_array_tests.cpp b/tests/integration/managed_array_tests.cpp index 28f4e11b..33bea05a 100644 --- a/tests/integration/managed_array_tests.cpp +++ b/tests/integration/managed_array_tests.cpp @@ -875,7 +875,7 @@ TEST(ManagedArray, ExternalOwnedFromManagedArray) forall(sequential(), 0, 20, [=](int i) { array[i] = 1.0f * i; }); chai::ManagedArray arrayCopy = - chai::makeManagedArray(array.getPointer(chai::CPU), 20, chai::CPU, true); + chai::makeManagedArray(array.data(chai::CPU), 20, chai::CPU, true); #if defined(CHAI_ENABLE_IMPLICIT_CONVERSIONS) ASSERT_EQ(array, arrayCopy); @@ -894,7 +894,7 @@ TEST(ManagedArray, ExternalUnownedFromManagedArray) forall(sequential(), 0, 20, [=](int i) { array[i] = 1.0f * i; }); chai::ManagedArray arrayCopy = - chai::makeManagedArray(array.getPointer(chai::CPU), 20, chai::CPU, false); + chai::makeManagedArray(array.data(chai::CPU), 20, chai::CPU, false); forall(sequential(), 0, 20, [=](int i) { ASSERT_EQ(arrayCopy[i], 1.0f * i); }); // freeing from an unowned pointer should leave the original ManagedArray intact From 7ba2ba89071bf836071079929af7419da475ba27 Mon Sep 17 00:00:00 2001 From: Alan Dayton <6393677+adayton1@users.noreply.github.com> Date: Tue, 29 Oct 2024 13:38:37 -0700 Subject: [PATCH 07/24] Remove ManagedArray implicit casts (#285) * Remove implicit casts between ManagedArrays and raw pointers * Remove operator== and operator!= comparison operators for ManagedArrays and raw pointers * Remove CHAI_ENABLE_IMPLICIT_CONVERSIONS configuration option --- RELEASE_NOTES.md | 2 + cmake/SetupChaiOptions.cmake | 1 - docs/sphinx/advanced_configuration.rst | 6 --- examples/example.cpp | 12 +----- src/chai/ManagedArray.hpp | 38 ----------------- src/chai/ManagedArray.inl | 52 ----------------------- src/chai/ManagedArray_thin.inl | 35 --------------- src/chai/config.hpp.in | 1 - tests/integration/managed_array_tests.cpp | 21 +-------- tests/integration/managed_ptr_tests.cpp | 4 -- 10 files changed, 5 insertions(+), 167 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 6062aee5..fd60cc96 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -17,6 +17,8 @@ The format of this file is based on [Keep a Changelog](http://keepachangelog.com ### Removed - Removes deprecated ManagedArray::getPointer method. Use ManagedArray::data instead. +- Removes optional support for implicitly casting between raw pointers and ManagedArrays (CHAI\_ENABLE\_IMPLICIT\_CONVERSIONS). Use makeManagedArray and ManagedArray::data to perform explicit conversions instead. +- Removes equality and inequality comparison operators between ManagedArrays and raw pointers ## [Version 2024.07.0] - Release date 2024-07-26 diff --git a/cmake/SetupChaiOptions.cmake b/cmake/SetupChaiOptions.cmake index 74f63deb..e653f007 100644 --- a/cmake/SetupChaiOptions.cmake +++ b/cmake/SetupChaiOptions.cmake @@ -7,7 +7,6 @@ option(CHAI_ENABLE_GPU_SIMULATION_MODE "Enable GPU Simulation Mode" Off) option(CHAI_ENABLE_OPENMP "Enable OpenMP" Off) option(CHAI_ENABLE_MPI "Enable MPI (for umpire replay only)" Off) -option(CHAI_ENABLE_IMPLICIT_CONVERSIONS "Enable implicit conversions to-from raw pointers" On) option(CHAI_DISABLE_RM "Make ManagedArray a thin wrapper" Off) mark_as_advanced(CHAI_DISABLE_RM) diff --git a/docs/sphinx/advanced_configuration.rst b/docs/sphinx/advanced_configuration.rst index 846f5048..7893304f 100644 --- a/docs/sphinx/advanced_configuration.rst +++ b/docs/sphinx/advanced_configuration.rst @@ -25,7 +25,6 @@ Here is a summary of the configuration options, their default value, and meaning ENABLE_HIP Off Enable HIP support. CHAI_ENABLE_GPU_SIMULATION_MODE Off Simulates GPU execution. CHAI_ENABLE_UM Off Enable support for CUDA Unified Memory. - CHAI_ENABLE_IMPLICIT_CONVERSIONS On Enable implicit conversions between ManagedArray and raw pointers CHAI_DISABLE_RM Off Disable the ArrayManager and make ManagedArray a thin wrapper around a pointer. ENABLE_TESTS On Build test executables. ENABLE_BENCHMARKS On Build benchmark programs. @@ -52,11 +51,6 @@ These arguments are explained in more detail below: not manually copy data. Data movement in this case is handled by the CUDA driver and runtime. -* CHAI_ENABLE_IMPLICIT_CONVERSIONS - This option will allow implicit casting between an object of type - ``ManagedArray`` and the correpsonding raw pointer type ``T*``. This - option is disabled by default, and should be used with caution. - * CHAI_DISABLE_RM This option will remove all usage of the ``ArrayManager`` class and let the ``ManagedArray`` objects function as thin wrappers around a raw pointer. This diff --git a/examples/example.cpp b/examples/example.cpp index eeb0d7db..b46b18ea 100644 --- a/examples/example.cpp +++ b/examples/example.cpp @@ -48,12 +48,8 @@ int main(int CHAI_UNUSED_ARG(argc), char** CHAI_UNUSED_ARG(argv)) std::cout << "Doubling v2 on device." << std::endl; forall(gpu(), 0, 10, [=] __device__(int i) { v2[i] *= 2.0f; }); - std::cout << "Casting v2 to a pointer." << std::endl; -#if defined(CHAI_ENABLE_IMPLICIT_CONVERSIONS) - float* raw_v2 = v2; -#else + std::cout << "Extracting pointer from v2." << std::endl; float* raw_v2 = v2.data(); -#endif std::cout << "raw_v2 = ["; for (int i = 0; i < 10; i++) { @@ -61,12 +57,8 @@ int main(int CHAI_UNUSED_ARG(argc), char** CHAI_UNUSED_ARG(argv)) } std::cout << " ]" << std::endl; - std::cout << "Casting device_array to a pointer." << std::endl; -#if defined(CHAI_ENABLE_IMPLICIT_CONVERSIONS) - int* raw_device_array = device_array; -#else + std::cout << "Extracting pointer from device_array." << std::endl; int* raw_device_array = device_array.data(); -#endif std::cout << "device_array = ["; for (int i = 0; i < 10; i++) { std::cout << " " << device_array[i]; diff --git a/src/chai/ManagedArray.hpp b/src/chai/ManagedArray.hpp index 427e0b0b..054875d3 100644 --- a/src/chai/ManagedArray.hpp +++ b/src/chai/ManagedArray.hpp @@ -42,18 +42,6 @@ class CHAICopyable { }; -/*! - * \class CHAIDISAMBIGUATE - * - * \brief Type to disambiguate otherwise ambiguous constructors. - * - */ -class CHAIDISAMBIGUATE -{ -public: - CHAI_HOST_DEVICE CHAIDISAMBIGUATE(){}; - CHAI_HOST_DEVICE ~CHAIDISAMBIGUATE(){}; -}; /*! * \class ManagedArray * @@ -274,9 +262,6 @@ class ManagedArray : public CHAICopyable CHAI_HOST_DEVICE bool operator==(const ManagedArray& rhs) const; CHAI_HOST_DEVICE bool operator!=(const ManagedArray& from) const; - CHAI_HOST_DEVICE bool operator==(const T* from) const; - CHAI_HOST_DEVICE bool operator!=(const T* from) const; - CHAI_HOST_DEVICE bool operator==(std::nullptr_t from) const; CHAI_HOST_DEVICE bool operator!=(std::nullptr_t from) const; @@ -323,29 +308,6 @@ class ManagedArray : public CHAICopyable #endif -#if defined(CHAI_ENABLE_IMPLICIT_CONVERSIONS) - /*! - * \brief Cast the ManagedArray to a raw pointer. - * - * \return Raw pointer to data. - */ - CHAI_HOST_DEVICE operator T*() const; - - /*! - * \brief Construct a ManagedArray from a raw pointer. - * - * This raw pointer *must* have taken from an existing ManagedArray object. - * - * \param data Raw pointer to data. - * \param enable Boolean argument (unused) added to differentiate constructor. - */ - template - CHAI_HOST_DEVICE ManagedArray(T* data, - CHAIDISAMBIGUATE test = CHAIDISAMBIGUATE(), - bool foo = Q); -#endif - - #ifndef CHAI_DISABLE_RM /*! * \brief Assign a user-defined callback triggerd upon memory migration. diff --git a/src/chai/ManagedArray.inl b/src/chai/ManagedArray.inl index 82e26416..b9c2288d 100644 --- a/src/chai/ManagedArray.inl +++ b/src/chai/ManagedArray.inl @@ -448,41 +448,6 @@ CHAI_HOST_DEVICE T& ManagedArray::operator[](const Idx i) const { return m_active_pointer[i]; } -#if defined(CHAI_ENABLE_IMPLICIT_CONVERSIONS) -template -CHAI_INLINE -CHAI_HOST_DEVICE ManagedArray::operator T*() const { - return data(); -} - -template -template -CHAI_INLINE -CHAI_HOST_DEVICE ManagedArray::ManagedArray(T* data, CHAIDISAMBIGUATE, bool ) : - m_active_pointer(data), - m_active_base_pointer(data), -#if !defined(CHAI_DEVICE_COMPILE) - m_resource_manager(ArrayManager::getInstance()), - m_size(m_resource_manager->getSize((void *)m_active_base_pointer)), - m_offset(0), - m_pointer_record(m_resource_manager->getPointerRecord((void *)data)), -#else - m_resource_manager(nullptr), - m_size(0), - m_offset(0), - m_pointer_record(nullptr), -#endif - m_is_slice(false) -{ -#if !defined(CHAI_DEVICE_COMPILE) - - if (m_active_pointer && (m_pointer_record == &ArrayManager::s_null_record || m_active_pointer != m_pointer_record->m_pointers[CPU])) { - CHAI_LOG(Warning,"REINTEGRATED external pointer unknown by CHAI."); - } -#endif -} -#endif - template CHAI_HOST_DEVICE T* ManagedArray::getActiveBasePointer() const @@ -649,23 +614,6 @@ ManagedArray::operator!= (const ManagedArray& rhs) const return (m_active_pointer != rhs.m_active_pointer); } - -template -CHAI_INLINE -CHAI_HOST_DEVICE -bool -ManagedArray::operator== (const T * from) const { - return m_active_pointer == from; -} - -template -CHAI_INLINE -CHAI_HOST_DEVICE -bool -ManagedArray::operator!= (const T * from) const { - return m_active_pointer != from; -} - template CHAI_INLINE CHAI_HOST_DEVICE diff --git a/src/chai/ManagedArray_thin.inl b/src/chai/ManagedArray_thin.inl index ee647388..0a675d82 100644 --- a/src/chai/ManagedArray_thin.inl +++ b/src/chai/ManagedArray_thin.inl @@ -352,28 +352,6 @@ CHAI_INLINE CHAI_HOST_DEVICE T& ManagedArray::operator[](const Idx i) const return m_active_pointer[i]; } -#if defined(CHAI_ENABLE_IMPLICIT_CONVERSIONS) -template -CHAI_INLINE CHAI_HOST_DEVICE ManagedArray::operator T*() const -{ - return m_active_pointer; -} - -template -template -CHAI_INLINE CHAI_HOST_DEVICE -ManagedArray::ManagedArray(T* data, CHAIDISAMBIGUATE, bool) : - m_active_pointer(data), - m_active_base_pointer(data), - m_resource_manager(nullptr), - m_size(-1), - m_pointer_record(nullptr), - m_offset(0), - m_is_slice(false) -{ -} -#endif - template template ManagedArray::operator typename std:: @@ -421,19 +399,6 @@ CHAI_INLINE CHAI_HOST_DEVICE bool ManagedArray::operator!=( return (m_active_pointer != rhs.m_active_pointer); } - -template -CHAI_INLINE CHAI_HOST_DEVICE bool ManagedArray::operator==(const T* from) const -{ - return m_active_pointer == from; -} - -template -CHAI_INLINE CHAI_HOST_DEVICE bool ManagedArray::operator!=(const T* from) const -{ - return m_active_pointer != from; -} - template CHAI_INLINE CHAI_HOST_DEVICE bool ManagedArray::operator==( std::nullptr_t from) const { diff --git a/src/chai/config.hpp.in b/src/chai/config.hpp.in index fdb77cdd..fa656456 100644 --- a/src/chai/config.hpp.in +++ b/src/chai/config.hpp.in @@ -10,7 +10,6 @@ #cmakedefine CHAI_ENABLE_PICK #cmakedefine CHAI_ENABLE_CUDA #cmakedefine CHAI_ENABLE_HIP -#cmakedefine CHAI_ENABLE_IMPLICIT_CONVERSIONS #cmakedefine CHAI_DISABLE_RM #cmakedefine CHAI_THIN_GPU_ALLOCATE #cmakedefine CHAI_ENABLE_UM diff --git a/tests/integration/managed_array_tests.cpp b/tests/integration/managed_array_tests.cpp index 33bea05a..67098a80 100644 --- a/tests/integration/managed_array_tests.cpp +++ b/tests/integration/managed_array_tests.cpp @@ -774,22 +774,6 @@ TEST(ManagedArray, NullpointerConversions) assert_empty_map(true); } -#if defined(CHAI_ENABLE_IMPLICIT_CONVERSIONS) -TEST(ManagedArray, ImplicitConversions) -{ - chai::ManagedArray a(1); - a[0] = 3.14159; - - chai::ManagedArray a2 = a; - - ASSERT_EQ(a2[0], a[0]); - - a.free(); - SUCCEED(); - assert_empty_map(true); -} -#endif - TEST(ManagedArray, PodTest) { chai::ManagedArray array(1); @@ -877,11 +861,8 @@ TEST(ManagedArray, ExternalOwnedFromManagedArray) chai::ManagedArray arrayCopy = chai::makeManagedArray(array.data(chai::CPU), 20, chai::CPU, true); -#if defined(CHAI_ENABLE_IMPLICIT_CONVERSIONS) - ASSERT_EQ(array, arrayCopy); -#else ASSERT_EQ(array.data(), arrayCopy.data()); -#endif + // should be able to free through the new ManagedArray arrayCopy.free(); assert_empty_map(true); diff --git a/tests/integration/managed_ptr_tests.cpp b/tests/integration/managed_ptr_tests.cpp index 6ad9ce25..000e6210 100644 --- a/tests/integration/managed_ptr_tests.cpp +++ b/tests/integration/managed_ptr_tests.cpp @@ -481,11 +481,7 @@ GPU_TEST(managed_ptr, gpu_class_with_raw_array_and_callback) array[i] = expectedValue; }); -#if defined(CHAI_ENABLE_IMPLICIT_CONVERSIONS) - auto cpuPointer = new RawArrayClass(array); -#else auto cpuPointer = new RawArrayClass(array.data()); -#endif auto gpuPointer = chai::make_on_device(chai::unpack(array)); auto callback = [=] (chai::Action action, chai::ExecutionSpace space, void*) mutable -> bool { From c12475b46366507e5e68b0af457ba7023aa82d53 Mon Sep 17 00:00:00 2001 From: Alan Dayton <6393677+adayton1@users.noreply.github.com> Date: Thu, 5 Dec 2024 13:12:55 -0800 Subject: [PATCH 08/24] Remove make_managed_from_factory (#291) * Remove make_managed_from_factory --- RELEASE_NOTES.md | 3 +- src/chai/managed_ptr.hpp | 218 +++----------------------- tests/unit/managed_ptr_unit_tests.cpp | 153 +----------------- 3 files changed, 28 insertions(+), 346 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index fd60cc96..98def121 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -18,7 +18,8 @@ The format of this file is based on [Keep a Changelog](http://keepachangelog.com ### Removed - Removes deprecated ManagedArray::getPointer method. Use ManagedArray::data instead. - Removes optional support for implicitly casting between raw pointers and ManagedArrays (CHAI\_ENABLE\_IMPLICIT\_CONVERSIONS). Use makeManagedArray and ManagedArray::data to perform explicit conversions instead. -- Removes equality and inequality comparison operators between ManagedArrays and raw pointers +- Removes equality and inequality comparison operators between ManagedArrays and raw pointers. +- Removes make\_managed\_from\_factory function for creating managed\_ptr objects from factory functions. This change will lead to safer adoption of allocators during construction and destruction of managed\_ptr objects. ## [Version 2024.07.0] - Release date 2024-07-26 diff --git a/src/chai/managed_ptr.hpp b/src/chai/managed_ptr.hpp index 92f7235e..b5f4d7de 100644 --- a/src/chai/managed_ptr.hpp +++ b/src/chai/managed_ptr.hpp @@ -57,10 +57,10 @@ namespace chai { /// /// This wrapper stores both host and device pointers so that polymorphism can be /// used in both contexts with a single API. - /// The make_managed and make_managed_from_factory functions call new on both the - /// host and device so that polymorphism is valid in both contexts. Simply copying - /// the bits of an object to the device will not copy the vtable, so new must be - /// called on the device. + /// The make_managed function calls new on both the host and device so that + /// polymorphism is valid in both contexts. Simply copying the bits of an + /// object to the device will not copy the vtable, so new must be called + /// on the device. /// /// Usage Requirements: /// Methods that can be called on the host and/or device must be declared @@ -72,28 +72,27 @@ namespace chai { /// you must explicitly modify the object in both the host context and the /// device context. /// C-style array members of T need to be initialized correctly with a host or - /// device C-style array. If a ManagedArray is passed to the make_managed or - /// make_managed_from_factory methods in place of a C-style array, wrap it in - /// a call to chai::unpack to extract the C-style arrays contained within the - /// ManagedArray. This will pass the extracted host C-style array to the host - /// constructor and the extracted device C-style array to the device - /// constructor. If it is desired that these host and device C-style arrays be - /// kept in sync like the normal behavior of ManagedArray, define a callback - /// that maintains a copy of the ManagedArray and upon the ACTION_MOVE event - /// calls the copy constructor of that ManagedArray. + /// device C-style array. If a ManagedArray is passed to the make_managed + /// function in place of a C-style array, wrap it in a call to chai::unpack to + /// extract the C-style arrays contained within the ManagedArray. This will + /// pass the extracted host C-style array to the host constructor and the + /// extracted device C-style array to the device constructor. If it is desired + /// that these host and device C-style arrays be kept in sync like the normal + /// behavior of ManagedArray, define a callback that maintains a copy of the + /// ManagedArray and upon the ACTION_MOVE event calls the copy constructor of + /// that ManagedArray. /// If a C-style array is passed to make_managed, accessing that member will be /// valid only in the correct context. To prevent the accidental use of that /// member in the wrong context, any methods that access it should be __host__ /// only or __device__ only. Special care should be taken when passing C-style /// arrays as arguments to member functions. /// The same restrictions for C-style array members also apply to raw pointer - /// members. If a managed_ptr is passed to the make_managed or - /// make_managed_from_factory methods in place of a raw pointer, wrap it in - /// a call to chai::unpack to extract the raw pointers contained within the - /// managed_ptr. This will pass the extracted host pointer to the host - /// constructor and the extracted device pointer to the device constructor. - /// If it is desired that these host and device pointers be kept in sync, - /// define a callback that maintains a copy of the managed_ptr and upon the + /// members. If a managed_ptr is passed to the make_managed function in place of + /// a raw pointer, wrap it in a call to chai::unpack to extract the raw pointers + /// contained within the managed_ptr. This will pass the extracted host pointer + /// to the host constructor and the extracted device pointer to the device + /// constructor. If it is desired that these host and device pointers be kept in + /// sync, define a callback that maintains a copy of the managed_ptr and upon the /// ACTION_MOVE event call the copy constructor of that managed_ptr. /// Again, if a raw pointer is passed to make_managed, accessing that member will /// only be valid in the correct context. Take care when passing raw pointers @@ -102,12 +101,12 @@ namespace chai { /// turn off GPU error checking, pass -DCHAI_ENABLE_GPU_ERROR_CHECKING=OFF as /// an argument to cmake when building CHAI. To turn on synchronization after /// every kernel, set the appropriate environment variable (e.g. CUDA_LAUNCH_BLOCKING or HIP_LAUNCH_BLOCKING). - /// Alternatively, call cudaDeviceSynchronize() after any call to make_managed, - /// make_managed_from_factory, or managed_ptr::free, and check the return code - /// for errors. If your code crashes in the constructor/destructor of T, then - /// it is recommended to turn on this synchronization. For example, the - /// constructor of T might run out of per-thread stack space on the GPU. If - /// that happens, you can increase the device limit of per-thread stack space. + /// Alternatively, call cudaDeviceSynchronize() after any call to make_managed + /// or managed_ptr::free, and check the return code for errors. If your code + /// crashes in the constructor/destructor of T, then it is recommended to turn + /// on this synchronization for debugging. For example, the constructor of T + /// might run out of per-thread stack space on the GPU. If that happens, you + /// can increase the device limit of per-thread stack space. /// template class managed_ptr { @@ -804,27 +803,6 @@ namespace chai { *gpuPointer = new T(processArguments(args)...); } - /// - /// @author Alan Dayton - /// - /// Creates a new object on the device by calling the given factory method. - /// - /// @param[out] gpuPointer Used to return the device pointer to the new object - /// @param[in] f The factory method (must be a __device__ or __host__ __device__ - /// method - /// @param[in] args The arguments to the factory method - /// - /// @note Cannot capture argument packs in an extended device lambda, - /// so explicit kernel is needed. - /// - template - CHAI_GLOBAL void make_on_device_from_factory(T** gpuPointer, F f, Args... args) - { - *gpuPointer = f(processArguments(args)...); - } - /// /// @author Alan Dayton /// @@ -933,44 +911,6 @@ namespace chai { return cpuPointer; } - /// - /// @author Alan Dayton - /// - /// Calls a factory method to create a new object on the host. - /// Sets the execution space to the CPU so that ManagedArrays and managed_ptrs - /// are moved to the host as necessary. - /// - /// @param[in] f The factory method - /// @param[in] args The arguments to the factory method - /// - /// @return The host pointer to the new object - /// - template - CHAI_HOST T* make_on_host_from_factory(F f, Args&&... args) { -#if !defined(CHAI_DISABLE_RM) - // Get the ArrayManager and save the current execution space - chai::ArrayManager* arrayManager = chai::ArrayManager::getInstance(); - ExecutionSpace currentSpace = arrayManager->getExecutionSpace(); - - // Set the execution space so that ManagedArrays and managed_ptrs - // are handled properly - arrayManager->setExecutionSpace(CPU); -#endif - - // Create the object on the device - T* cpuPointer = f(args...); - -#if !defined(CHAI_DISABLE_RM) - // Set the execution space back to the previous value - arrayManager->setExecutionSpace(currentSpace); -#endif - - // Return the GPU pointer - return cpuPointer; - } - /// /// @author Alan Dayton /// @@ -1035,67 +975,6 @@ namespace chai { free(cpuBuffer); gpuFree(gpuBuffer); -#if !defined(CHAI_DISABLE_RM) - // Set the execution space back to the previous value - arrayManager->setExecutionSpace(currentSpace); -#endif - - // Return the GPU pointer - return gpuPointer; - } - - /// - /// @author Alan Dayton - /// - /// Calls a factory method to create a new object on the device. - /// - /// @param[in] f The factory method - /// @param[in] args The arguments to the factory method - /// - /// @return The device pointer to the new object - /// - template - CHAI_HOST T* make_on_device_from_factory(F f, Args&&... args) { -#if !defined(CHAI_DISABLE_RM) - // Get the ArrayManager and save the current execution space - chai::ArrayManager* arrayManager = chai::ArrayManager::getInstance(); - ExecutionSpace currentSpace = arrayManager->getExecutionSpace(); -#if defined(CHAI_ENABLE_GPU_SIMULATION_MODE) - arrayManager->setGPUSimMode(true); -#endif - - // Set the execution space so that chai::ManagedArrays and - // chai::managed_ptrs are handled properly - arrayManager->setExecutionSpace(GPU); -#endif - - // Allocate space on the GPU to hold the pointer to the new object - T** gpuBuffer; - gpuMalloc((void**)(&gpuBuffer), sizeof(T*)); - - // Create the object on the device -#if defined(CHAI_ENABLE_GPU_SIMULATION_MODE) - detail::make_on_device_from_factory(gpuBuffer, f, args...); - arrayManager->setGPUSimMode(false); -#elif defined(__CUDACC__) && defined(CHAI_ENABLE_MANAGED_PTR_ON_GPU) - detail::make_on_device_from_factory<<<1, 1>>>(gpuBuffer, f, args...); -#elif defined(__HIPCC__) && defined(CHAI_ENABLE_MANAGED_PTR_ON_GPU) - hipLaunchKernelGGL(detail::make_on_device_from_factory, 1, 1, 0, 0, gpuBuffer, f, args...); -#endif - - // Allocate space on the CPU for the pointer and copy the pointer to the CPU - T** cpuBuffer = (T**) malloc(sizeof(T*)); - gpuMemcpy(cpuBuffer, gpuBuffer, sizeof(T*), gpuMemcpyDeviceToHost); - - // Get the GPU pointer - T* gpuPointer = cpuBuffer[0]; - - // Free the host and device buffers - free(cpuBuffer); - gpuFree(gpuBuffer); - #if !defined(CHAI_DISABLE_RM) // Set the execution space back to the previous value arrayManager->setExecutionSpace(currentSpace); @@ -1155,53 +1034,6 @@ namespace chai { #endif } - /// - /// @author Alan Dayton - /// - /// Makes a managed_ptr. - /// Factory function to create managed_ptrs. - /// - /// @param[in] f The factory function that will create the object - /// @param[in] args The arguments to the factory function - /// - template - CHAI_HOST managed_ptr make_managed_from_factory(F&& f, Args&&... args) { - static_assert(detail::is_invocable::value, - "F is not invocable with the given arguments."); - - static_assert(std::is_pointer::type>::value, - "F does not return a pointer."); - - using R = typename std::remove_pointer::type>::type; - - static_assert(std::is_convertible::value, - "F does not return a pointer that is convertible to T*."); - -#if (defined(CHAI_GPUCC) || defined(CHAI_ENABLE_GPU_SIMULATION_MODE)) && defined(CHAI_ENABLE_MANAGED_PTR_ON_GPU) - // Construct on the GPU first to take advantage of asynchrony -#if defined(CHAI_ENABLE_GPU_SIMULATION_MODE) - chai::ArrayManager* threadRM = chai::ArrayManager::getInstance(); - threadRM->setGPUSimMode(true); -#endif - T* gpuPointer = make_on_device_from_factory(f, args...); -#if defined(CHAI_ENABLE_GPU_SIMULATION_MODE) - threadRM->setGPUSimMode(false); -#endif -#endif - - // Construct on the CPU - T* cpuPointer = make_on_host_from_factory(f, args...); - - // Construct and return the managed_ptr -#if defined(CHAI_GPUCC) && defined(CHAI_ENABLE_MANAGED_PTR_ON_GPU) - return managed_ptr({CPU, GPU}, {cpuPointer, gpuPointer}); -#else - return managed_ptr({CPU}, {cpuPointer}); -#endif - } - /// /// @author Alan Dayton /// diff --git a/tests/unit/managed_ptr_unit_tests.cpp b/tests/unit/managed_ptr_unit_tests.cpp index a1ab6c63..d6c6a60d 100644 --- a/tests/unit/managed_ptr_unit_tests.cpp +++ b/tests/unit/managed_ptr_unit_tests.cpp @@ -53,9 +53,8 @@ class Simple { class TestBase { public: CHAI_HOST_DEVICE TestBase() {} - CHAI_HOST_DEVICE virtual ~TestBase() {} - CHAI_HOST_DEVICE static TestBase* Factory(const int value); + CHAI_HOST_DEVICE virtual ~TestBase() {} CHAI_HOST_DEVICE virtual int getValue() const = 0; }; @@ -73,23 +72,6 @@ class TestDerived : public TestBase { int m_value; }; -CHAI_HOST_DEVICE TestBase* TestBase::Factory(const int value) { - return new TestDerived(value); -} - -CHAI_HOST_DEVICE TestBase* Factory(const int value) { - return new TestDerived(value); -} - -CHAI_HOST_DEVICE TestBase* OverloadedFactory() { - return new TestDerived(-1); -} - -CHAI_HOST_DEVICE TestBase* OverloadedFactory(const int value) { - return new TestDerived(value); -} - - TEST(managed_ptr, default_constructor) { chai::managed_ptr derived; @@ -766,94 +748,6 @@ GPU_TEST(managed_ptr, gpu_make_managed) derived.free(); } -GPU_TEST(managed_ptr, make_managed_from_factory_function) -{ - const int expectedValue = rand(); - - auto factory = [] CHAI_HOST_DEVICE (const int value) { - return Factory(value); - }; - - auto derived = chai::make_managed_from_factory(factory, expectedValue); - - EXPECT_EQ((*derived).getValue(), expectedValue); - - EXPECT_NE(derived.get(), nullptr); - EXPECT_TRUE(derived); - EXPECT_FALSE(derived == nullptr); - EXPECT_FALSE(nullptr == derived); - EXPECT_TRUE(derived != nullptr); - EXPECT_TRUE(nullptr != derived); - - derived.free(); -} - -GPU_TEST(managed_ptr, make_managed_from_factory_lambda) -{ - const int expectedValue = rand(); - - auto factory = [] CHAI_HOST_DEVICE (const int value) { - return new TestDerived(value); - }; - - auto derived = chai::make_managed_from_factory(factory, expectedValue); - - EXPECT_EQ((*derived).getValue(), expectedValue); - - EXPECT_NE(derived.get(), nullptr); - EXPECT_TRUE(derived); - EXPECT_FALSE(derived == nullptr); - EXPECT_FALSE(nullptr == derived); - EXPECT_TRUE(derived != nullptr); - EXPECT_TRUE(nullptr != derived); - - derived.free(); -} - -GPU_TEST(managed_ptr, make_managed_from_overloaded_factory_function) -{ - const int expectedValue = rand(); - - auto factory = [] CHAI_HOST_DEVICE (const int value) { - return OverloadedFactory(value); - }; - - auto derived = chai::make_managed_from_factory(factory, expectedValue); - - EXPECT_EQ((*derived).getValue(), expectedValue); - - EXPECT_NE(derived.get(), nullptr); - EXPECT_TRUE(derived); - EXPECT_FALSE(derived == nullptr); - EXPECT_FALSE(nullptr == derived); - EXPECT_TRUE(derived != nullptr); - EXPECT_TRUE(nullptr != derived); - - derived.free(); -} - -GPU_TEST(managed_ptr, make_managed_from_factory_static_member_function) -{ - const int expectedValue = rand(); - - auto factory = [] CHAI_HOST_DEVICE (const int value) { - return TestBase::Factory(value); - }; - - auto derived = chai::make_managed_from_factory(factory, expectedValue); - - EXPECT_EQ((*derived).getValue(), expectedValue); - - EXPECT_NE(derived.get(), nullptr); - EXPECT_TRUE(derived); - EXPECT_FALSE(derived == nullptr); - EXPECT_FALSE(nullptr == derived); - EXPECT_TRUE(derived != nullptr); - EXPECT_TRUE(nullptr != derived); - - derived.free(); -} - GPU_TEST(managed_ptr, gpu_copy_constructor) { const int expectedValue = rand(); @@ -1048,48 +942,3 @@ GPU_TEST(managed_ptr, gpu_copy_assignment_operator) } #endif - -// Enable the following tests to ensure that proper compiler errors are given -// for bad arguments since otherwise it is difficult to make sure the template -// metaprogramming is correct. - -#if 0 - -// Should give something like the following: -// error: static assertion failed: F is not invocable with the given arguments. - -TEST(managed_ptr, bad_function_to_make_managed_from_factory_function) -{ - const int expectedValue = rand(); - - auto factory = [] CHAI_HOST (const int value) { - return new TestDerived(value); - }; - - auto derived = chai::make_managed_from_factory(expectedValue, factory); - - EXPECT_EQ((*derived).getValue(), expectedValue); -} - -#endif - -#if 0 - -// Should give something like the following: -// error: static assertion failed: F is not invocable with the given arguments. - -TEST(managed_ptr, bad_arguments_to_make_managed_from_factory_function) -{ - const int expectedValue = rand(); - - auto factory = [] CHAI_HOST (const int value) { - return new TestDerived(value); - }; - - auto derived = chai::make_managed_from_factory(factory, expectedValue, 3); - - EXPECT_EQ((*derived).getValue(), expectedValue); -} - -#endif - From fc20f3f14dde992a0a726d3f17f9b7e1221a59aa Mon Sep 17 00:00:00 2001 From: robinson96 Date: Mon, 9 Dec 2024 12:55:52 -0800 Subject: [PATCH 09/24] fix reallocation for pinned memory. (#292) * Pinned and unified memory fixes --------- Co-authored-by: Alan Dayton --- RELEASE_NOTES.md | 4 +++ src/chai/ArrayManager.cpp | 3 ++ src/chai/ArrayManager.inl | 66 +++++++++++++++++++++++++++++++++------ 3 files changed, 63 insertions(+), 10 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 98def121..8da54742 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -15,6 +15,10 @@ The format of this file is based on [Keep a Changelog](http://keepachangelog.com ## [Unreleased] - Release date yyyy-mm-dd +### Fixed +- Fixes reallocate when using pinned or unified memory. +- Adds missing synchronize when using pinned memory. + ### Removed - Removes deprecated ManagedArray::getPointer method. Use ManagedArray::data instead. - Removes optional support for implicitly casting between raw pointers and ManagedArrays (CHAI\_ENABLE\_IMPLICIT\_CONVERSIONS). Use makeManagedArray and ManagedArray::data to perform explicit conversions instead. diff --git a/src/chai/ArrayManager.cpp b/src/chai/ArrayManager.cpp index 17c3a2b6..64c55037 100644 --- a/src/chai/ArrayManager.cpp +++ b/src/chai/ArrayManager.cpp @@ -281,6 +281,9 @@ void ArrayManager::move(PointerRecord* record, ExecutionSpace space) #if defined(CHAI_ENABLE_UM) if (record->m_last_space == UM) { + if (space == CPU) { + syncIfNeeded(); + } return; } #endif diff --git a/src/chai/ArrayManager.inl b/src/chai/ArrayManager.inl index e2aa34db..12efb007 100644 --- a/src/chai/ArrayManager.inl +++ b/src/chai/ArrayManager.inl @@ -46,8 +46,24 @@ void* ArrayManager::reallocate(void* pointer, size_t elems, PointerRecord* point // Call callback with ACTION_FREE before changing the size for (int space = CPU; space < NUM_EXECUTION_SPACES; ++space) { - if (pointer_record->m_pointers[space]) { - callback(pointer_record, ACTION_FREE, ExecutionSpace(space)); + void* space_ptr = pointer_record->m_pointers[space]; + int actualSpace = space; + if (space_ptr) { +#if defined(CHAI_ENABLE_UM) + if (space_ptr == pointer_record->m_pointers[UM]) { + actualSpace = UM; + } else +#endif +#if defined(CHAI_ENABLE_PINNED) + if (space_ptr == pointer_record->m_pointers[PINNED]) { + actualSpace = PINNED; + } +#endif + callback(pointer_record, ACTION_FREE, ExecutionSpace(actualSpace)); + if (actualSpace == UM || actualSpace == PINNED) { + // stop the loop over spaces + break; + } } } @@ -60,18 +76,48 @@ void* ArrayManager::reallocate(void* pointer, size_t elems, PointerRecord* point size_t num_bytes_to_copy = std::min(old_size, new_size); for (int space = CPU; space < NUM_EXECUTION_SPACES; ++space) { - void* old_ptr = pointer_record->m_pointers[space]; + void* space_ptr = pointer_record->m_pointers[space]; + auto alloc = m_resource_manager.getAllocator(pointer_record->m_allocators[space]); + int actualSpace = space; - if (old_ptr) { - void* new_ptr = m_allocators[space]->allocate(new_size); - m_resource_manager.copy(new_ptr, old_ptr, num_bytes_to_copy); - m_allocators[space]->deallocate(old_ptr); + if (space_ptr) { +#if defined(CHAI_ENABLE_UM) + if (space_ptr == pointer_record->m_pointers[UM]) { + alloc = m_resource_manager.getAllocator(pointer_record->m_allocators[UM]); + actualSpace = UM; + } else +#endif +#if defined(CHAI_ENABLE_PINNED) + if (space_ptr == pointer_record->m_pointers[PINNED]) { + alloc = m_resource_manager.getAllocator(pointer_record->m_allocators[PINNED]); + actualSpace = PINNED; + } else +#endif + { + alloc = m_resource_manager.getAllocator(pointer_record->m_allocators[space]); + } + void* new_ptr = alloc.allocate(new_size); +#if CHAI_ENABLE_ZERO_INITIALIZED_MEMORY + m_resource_manager.memset(new_ptr, 0, new_size); +#endif + m_resource_manager.copy(new_ptr, space_ptr, num_bytes_to_copy); + alloc.deallocate(space_ptr); - pointer_record->m_pointers[space] = new_ptr; - callback(pointer_record, ACTION_ALLOC, ExecutionSpace(space)); + pointer_record->m_pointers[actualSpace] = new_ptr; + callback(pointer_record, ACTION_ALLOC, ExecutionSpace(actualSpace)); - m_pointer_map.erase(old_ptr); + m_pointer_map.erase(space_ptr); m_pointer_map.insert(new_ptr, pointer_record); + + if (actualSpace == UM || actualSpace == PINNED) { + for (int aliasedSpace = CPU; aliasedSpace < NUM_EXECUTION_SPACES; ++aliasedSpace) { + if (aliasedSpace != UM && aliasedSpace != PINNED) { + pointer_record->m_pointers[aliasedSpace] = new_ptr; + } + } + // stop the loop over spaces + break; + } } } From de7efab029d8e3cc84b15d3bbfb41808b1abd3b7 Mon Sep 17 00:00:00 2001 From: Alan Dayton <6393677+adayton1@users.noreply.github.com> Date: Mon, 27 Jan 2025 14:41:20 -0800 Subject: [PATCH 10/24] Remove incr and decr methods on ManagedArray (#295) * Remove incr and decr methods * Disable multiview test since it has invalid memory accesses --- RELEASE_NOTES.md | 1 + src/chai/ManagedArray.hpp | 17 --- src/chai/ManagedArray.inl | 34 ------ src/chai/ManagedArray_thin.inl | 26 +--- tests/integration/managed_array_tests.cpp | 138 ---------------------- tests/integration/raja-chai-tests.cpp | 4 + 6 files changed, 6 insertions(+), 214 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 8da54742..3fad0368 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -21,6 +21,7 @@ The format of this file is based on [Keep a Changelog](http://keepachangelog.com ### Removed - Removes deprecated ManagedArray::getPointer method. Use ManagedArray::data instead. +- Removes ManagedArray::incr and ManagedArray::decr methods. Use ManagedArray::pick and ManagedArray::set instead. - Removes optional support for implicitly casting between raw pointers and ManagedArrays (CHAI\_ENABLE\_IMPLICIT\_CONVERSIONS). Use makeManagedArray and ManagedArray::data to perform explicit conversions instead. - Removes equality and inequality comparison operators between ManagedArrays and raw pointers. - Removes make\_managed\_from\_factory function for creating managed\_ptr objects from factory functions. This change will lead to safer adoption of allocators during construction and destruction of managed\_ptr objects. diff --git a/src/chai/ManagedArray.hpp b/src/chai/ManagedArray.hpp index 054875d3..bf38b628 100644 --- a/src/chai/ManagedArray.hpp +++ b/src/chai/ManagedArray.hpp @@ -289,22 +289,6 @@ class ManagedArray : public CHAICopyable * \tparam T The type of data value in ManagedArray. */ CHAI_HOST_DEVICE void set(size_t i, T val) const; - - /*! - * \brief Increment the value of element i in the ManagedArray. - * - * \param index The index of the element to be incremented - * \tparam T The type of data value in ManagedArray. - */ - CHAI_HOST_DEVICE void incr(size_t i) const; - - /*! - * \brief Decrement the value of element i in the ManagedArray. - * - * \param index The index of the element to be decremented - * \tparam T The type of data value in ManagedArray. - */ - CHAI_HOST_DEVICE void decr(size_t i) const; #endif @@ -382,7 +366,6 @@ class ManagedArray : public CHAICopyable private: - CHAI_HOST void modify(size_t i, const T& val) const; // The following are only used by ManagedArray.inl, but for template // shenanigan reasons need to be defined here. #if !defined(CHAI_DISABLE_RM) diff --git a/src/chai/ManagedArray.inl b/src/chai/ManagedArray.inl index b9c2288d..77bd79d5 100644 --- a/src/chai/ManagedArray.inl +++ b/src/chai/ManagedArray.inl @@ -364,40 +364,6 @@ CHAI_HOST_DEVICE void ManagedArray::set(size_t i, T val) const { #endif // !defined(CHAI_DEVICE_COMPILE) } -template -CHAI_INLINE -CHAI_HOST void ManagedArray::modify(size_t i, const T& val) const { - #if defined(CHAI_ENABLE_UM) - if(m_pointer_record->m_pointers[UM] == m_active_pointer) { - synchronize(); - m_active_pointer[i] = m_active_pointer[i] + val; - return; - } - #endif - T_non_const temp = pick(i); - temp = temp + val; - set(i, temp); -} - -template -CHAI_INLINE -CHAI_HOST_DEVICE void ManagedArray::incr(size_t i) const { - #if !defined(CHAI_DEVICE_COMPILE) - modify(i, (T)1); - #else - ++m_active_pointer[i]; - #endif -} - -template -CHAI_INLINE -CHAI_HOST_DEVICE void ManagedArray::decr(size_t i) const { - #if !defined(CHAI_DEVICE_COMPILE) - modify(i, (T)-1); - #else - --m_active_pointer[i]; - #endif -} #endif template diff --git a/src/chai/ManagedArray_thin.inl b/src/chai/ManagedArray_thin.inl index 0a675d82..caa52d91 100644 --- a/src/chai/ManagedArray_thin.inl +++ b/src/chai/ManagedArray_thin.inl @@ -272,6 +272,7 @@ CHAI_INLINE CHAI_HOST void ManagedArray::reset() #if defined(CHAI_ENABLE_PICK) + template CHAI_INLINE CHAI_HOST_DEVICE typename ManagedArray::T_non_const ManagedArray< T>::pick(size_t i) const @@ -299,31 +300,6 @@ CHAI_INLINE CHAI_HOST_DEVICE void ManagedArray::set(size_t i, T val) const m_active_pointer[i] = val; } -template -CHAI_INLINE CHAI_HOST_DEVICE void ManagedArray::incr(size_t i) const -{ -#if defined(CHAI_THIN_GPU_ALLOCATE) -#if !defined(CHAI_DEVICE_COMPILE) - ArrayManager::getInstance()->syncIfNeeded(); -#endif -#elif defined(CHAI_ENABLE_UM) - synchronize(); -#endif - ++m_active_pointer[i]; -} - -template -CHAI_INLINE CHAI_HOST_DEVICE void ManagedArray::decr(size_t i) const -{ -#if defined(CHAI_THIN_GPU_ALLOCATE) -#if !defined(CHAI_DEVICE_COMPILE) - ArrayManager::getInstance()->syncIfNeeded(); -#endif -#elif defined(CHAI_ENABLE_UM) - synchronize(); -#endif - --m_active_pointer[i]; -} #endif // CHAI_ENABLE_PICK template diff --git a/tests/integration/managed_array_tests.cpp b/tests/integration/managed_array_tests.cpp index 67098a80..812944b5 100644 --- a/tests/integration/managed_array_tests.cpp +++ b/tests/integration/managed_array_tests.cpp @@ -209,32 +209,6 @@ TEST(ManagedArray, SetHostToHost) } -TEST(ManagedArray, IncrementDecrementOnHost) -{ - chai::ManagedArray arrayI(10); - chai::ManagedArray arrayD(10); - - forall(sequential(), 0, 10, [=](int i) { - arrayI[i] = i; - arrayD[i] = i; - }); - - forall(sequential(), 0, 10, [=](int i) { - arrayI.incr(i); - arrayD.decr(i); - }); - - forall(sequential(), 0, 10, [=](int i) { - ASSERT_EQ(arrayI[i], i + 1); - ASSERT_EQ(arrayD[i], i - 1); - }); - - arrayI.free(); - arrayD.free(); - assert_empty_map(true); -} - - #if defined(CHAI_ENABLE_UM) #if (!defined(CHAI_DISABLE_RM)) TEST(ManagedArray, PickHostFromHostConstUM) { @@ -279,30 +253,6 @@ TEST(ManagedArray, SetHostToHostUM) assert_empty_map(true); } -TEST(ManagedArray, IncrementDecrementOnHostUM) -{ - chai::ManagedArray arrayI(10, chai::UM); - chai::ManagedArray arrayD(10, chai::UM); - - forall(sequential(), 0, 10, [=](int i) { - arrayI[i] = i; - arrayD[i] = i; - }); - - forall(sequential(), 0, 10, [=](int i) { - arrayI.incr(i); - arrayD.decr(i); - }); - - forall(sequential(), 0, 10, [=](int i) { - ASSERT_EQ(arrayI[i], i + 1); - ASSERT_EQ(arrayD[i], i - 1); - }); - - arrayI.free(); - arrayD.free(); - assert_empty_map(true); -} #endif #endif @@ -374,51 +324,6 @@ GPU_TEST(ManagedArray, SetHostToDeviceUM) assert_empty_map(true); } -GPU_TEST(ManagedArray, IncrementDecrementOnDeviceUM) -{ - chai::ManagedArray arrayI(10, chai::UM); - chai::ManagedArray arrayD(10, chai::UM); - - forall(gpu(), 0, 10, [=] __device__(int i) { - arrayI[i] = i; - arrayD[i] = i; - }); - - forall(gpu(), 0, 10, [=] __device__(int i) { - arrayI.incr(i); - arrayD.decr(i); - }); - - forall(sequential(), 0, 10, [=](int i) { - ASSERT_EQ(arrayI[i], i + 1); - ASSERT_EQ(arrayD[i], i - 1); - }); - - arrayI.free(); - arrayD.free(); - assert_empty_map(true); -} - -GPU_TEST(ManagedArray, IncrementDecrementFromHostOnDeviceUM) -{ - chai::ManagedArray array(10, chai::UM); - - forall(gpu(), 0, 10, [=] __device__(int i) { array[i] = i; }); - - array.incr(5); - array.decr(9); - - int temp; - temp = array.pick(5); - ASSERT_EQ(temp, 6); - - temp = array.pick(9); - ASSERT_EQ(temp, 8); - - array.free(); - assert_empty_map(true); -} - GPU_TEST(ManagedArray, PickandSetSliceDeviceToDeviceUM) { chai::ManagedArray array(10, chai::UM); chai::ManagedArray sl1 = array.slice(0,5); @@ -534,50 +439,7 @@ GPU_TEST(ManagedArray, SetHostToDevice) array.free(); assert_empty_map(true); } -GPU_TEST(ManagedArray, IncrementDecrementOnDevice) -{ - chai::ManagedArray arrayI(10); - chai::ManagedArray arrayD(10); - - forall(gpu(), 0, 10, [=] __device__(int i) { - arrayI[i] = i; - arrayD[i] = i; - }); - - forall(gpu(), 0, 10, [=] __device__(int i) { - arrayI.incr(i); - arrayD.decr(i); - }); - - forall(sequential(), 0, 10, [=](int i) { - ASSERT_EQ(arrayI[i], i + 1); - ASSERT_EQ(arrayD[i], i - 1); - }); - - arrayI.free(); - arrayD.free(); - assert_empty_map(true); -} - -GPU_TEST(ManagedArray, IncrementDecrementFromHostOnDevice) -{ - chai::ManagedArray array(10); - - forall(gpu(), 0, 10, [=] __device__(int i) { array[i] = i; }); - - array.incr(5); - array.decr(9); - - int temp; - temp = array.pick(5); - ASSERT_EQ(temp, 6); - - temp = array.pick(9); - ASSERT_EQ(temp, 8); - array.free(); - assert_empty_map(true); -} #endif #endif diff --git a/tests/integration/raja-chai-tests.cpp b/tests/integration/raja-chai-tests.cpp index 8fc7d587..f2391cb5 100644 --- a/tests/integration/raja-chai-tests.cpp +++ b/tests/integration/raja-chai-tests.cpp @@ -104,11 +104,14 @@ CUDA_TEST(ChaiTest, Views) v2_array.free(); } +#if defined(CHAI_ENABLE_MULTIVIEW_TEST) CUDA_TEST(ChaiTest, MultiView) { chai::ManagedArray v1_array(10); chai::ManagedArray v2_array(10); + // TODO: This stack array gets converted to a raw host pointer, which appears + // to be dereferenced on the device when accessing the multiview. chai::ManagedArray all_arrays[2]; all_arrays[0] = v1_array; all_arrays[1] = v2_array; @@ -148,3 +151,4 @@ CUDA_TEST(ChaiTest, MultiView) v1_array.free(); v2_array.free(); } +#endif // defined(CHAI_ENABLE_MULTIVIEW_TEST) From c43103c02c8931e9b0d437d0fba6089d23baf988 Mon Sep 17 00:00:00 2001 From: Alan Dayton <6393677+adayton1@users.noreply.github.com> Date: Tue, 28 Jan 2025 14:40:56 -0800 Subject: [PATCH 11/24] Always enable pick and set (#296) --- RELEASE_NOTES.md | 1 + src/chai/ArrayManager.hpp | 6 ++---- src/chai/ArrayManager.inl | 2 -- src/chai/ManagedArray.hpp | 4 ---- src/chai/ManagedArray.inl | 4 ---- src/chai/ManagedArray_thin.inl | 5 ----- src/chai/config.hpp.in | 1 - tests/integration/managed_array_tests.cpp | 5 ----- 8 files changed, 3 insertions(+), 25 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 3fad0368..dc911113 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -25,6 +25,7 @@ The format of this file is based on [Keep a Changelog](http://keepachangelog.com - Removes optional support for implicitly casting between raw pointers and ManagedArrays (CHAI\_ENABLE\_IMPLICIT\_CONVERSIONS). Use makeManagedArray and ManagedArray::data to perform explicit conversions instead. - Removes equality and inequality comparison operators between ManagedArrays and raw pointers. - Removes make\_managed\_from\_factory function for creating managed\_ptr objects from factory functions. This change will lead to safer adoption of allocators during construction and destruction of managed\_ptr objects. +- Removes CHAI\_ENABLE\_PICK CMake option. ManagedArray::pick and ManagedArray::set will always be available. ## [Version 2024.07.0] - Release date 2024-07-26 diff --git a/src/chai/ArrayManager.hpp b/src/chai/ArrayManager.hpp index b5aae2de..9041ee71 100644 --- a/src/chai/ArrayManager.hpp +++ b/src/chai/ArrayManager.hpp @@ -253,13 +253,11 @@ class ArrayManager */ CHAISHAREDDLL_API void free(PointerRecord* pointer, ExecutionSpace space = NONE); -#if defined(CHAI_ENABLE_PICK) template - T_non_const pick(T* src_ptr, size_t index); + T_non_const pick(T* src_ptr, size_t index); template - void set(T* dst_ptr, size_t index, const T& val); -#endif + void set(T* dst_ptr, size_t index, const T& val); /*! * \brief Get the size of the given pointer. diff --git a/src/chai/ArrayManager.inl b/src/chai/ArrayManager.inl index 12efb007..b416aa78 100644 --- a/src/chai/ArrayManager.inl +++ b/src/chai/ArrayManager.inl @@ -124,7 +124,6 @@ void* ArrayManager::reallocate(void* pointer, size_t elems, PointerRecord* point return pointer_record->m_pointers[my_space]; } -#if defined(CHAI_ENABLE_PICK) template CHAI_INLINE typename ArrayManager::T_non_const ArrayManager::pick(T* src_ptr, size_t index) @@ -144,7 +143,6 @@ void ArrayManager::set(T* dst_ptr, size_t index, const T& val) m_resource_manager.copy(const_cast*>(dst_ptr+index), const_cast*>(&val), sizeof(T)); m_resource_manager.deregisterAllocation(const_cast*>(&val)); } -#endif CHAI_INLINE void ArrayManager::copy(void * dst, void * src, size_t size) { diff --git a/src/chai/ManagedArray.hpp b/src/chai/ManagedArray.hpp index bf38b628..8b3c6ba8 100644 --- a/src/chai/ManagedArray.hpp +++ b/src/chai/ManagedArray.hpp @@ -268,8 +268,6 @@ class ManagedArray : public CHAICopyable CHAI_HOST_DEVICE explicit operator bool() const; - -#if defined(CHAI_ENABLE_PICK) /*! * \brief Return the value of element i in the ManagedArray. * ExecutionSpace space to the current one @@ -289,8 +287,6 @@ class ManagedArray : public CHAICopyable * \tparam T The type of data value in ManagedArray. */ CHAI_HOST_DEVICE void set(size_t i, T val) const; -#endif - #ifndef CHAI_DISABLE_RM /*! diff --git a/src/chai/ManagedArray.inl b/src/chai/ManagedArray.inl index 77bd79d5..369964d6 100644 --- a/src/chai/ManagedArray.inl +++ b/src/chai/ManagedArray.inl @@ -304,8 +304,6 @@ CHAI_HOST void ManagedArray::registerTouch(ExecutionSpace space) { m_resource_manager->registerTouch(m_pointer_record, space); } - -#if defined(CHAI_ENABLE_PICK) template CHAI_INLINE CHAI_HOST_DEVICE @@ -364,8 +362,6 @@ CHAI_HOST_DEVICE void ManagedArray::set(size_t i, T val) const { #endif // !defined(CHAI_DEVICE_COMPILE) } -#endif - template CHAI_INLINE CHAI_HOST diff --git a/src/chai/ManagedArray_thin.inl b/src/chai/ManagedArray_thin.inl index caa52d91..1270afd3 100644 --- a/src/chai/ManagedArray_thin.inl +++ b/src/chai/ManagedArray_thin.inl @@ -270,9 +270,6 @@ CHAI_INLINE CHAI_HOST void ManagedArray::reset() { } - -#if defined(CHAI_ENABLE_PICK) - template CHAI_INLINE CHAI_HOST_DEVICE typename ManagedArray::T_non_const ManagedArray< T>::pick(size_t i) const @@ -300,8 +297,6 @@ CHAI_INLINE CHAI_HOST_DEVICE void ManagedArray::set(size_t i, T val) const m_active_pointer[i] = val; } -#endif // CHAI_ENABLE_PICK - template CHAI_INLINE CHAI_HOST_DEVICE size_t ManagedArray::size() const { diff --git a/src/chai/config.hpp.in b/src/chai/config.hpp.in index fa656456..80eab12b 100644 --- a/src/chai/config.hpp.in +++ b/src/chai/config.hpp.in @@ -7,7 +7,6 @@ #ifndef CHAI_config_HPP #define CHAI_config_HPP -#cmakedefine CHAI_ENABLE_PICK #cmakedefine CHAI_ENABLE_CUDA #cmakedefine CHAI_ENABLE_HIP #cmakedefine CHAI_DISABLE_RM diff --git a/tests/integration/managed_array_tests.cpp b/tests/integration/managed_array_tests.cpp index 812944b5..4803b982 100644 --- a/tests/integration/managed_array_tests.cpp +++ b/tests/integration/managed_array_tests.cpp @@ -164,7 +164,6 @@ TEST(ManagedArray, ArrayOfSlices) { assert_empty_map(true); } -#if defined(CHAI_ENABLE_PICK) #if (!defined(CHAI_DISABLE_RM)) TEST(ManagedArray, PickHostFromHostConst) { chai::ManagedArray array(10); @@ -255,10 +254,7 @@ TEST(ManagedArray, SetHostToHostUM) #endif -#endif - #if defined(CHAI_ENABLE_CUDA) || defined(CHAI_ENABLE_HIP) -#if defined(CHAI_ENABLE_PICK) #if defined(CHAI_ENABLE_UM) GPU_TEST(ManagedArray, PickandSetDeviceToDeviceUM) @@ -440,7 +436,6 @@ GPU_TEST(ManagedArray, SetHostToDevice) assert_empty_map(true); } -#endif #endif GPU_TEST(ManagedArray, ArrayOfSlicesDevice) { From 799ce3697721bb904a79c3cbef02ae244bb2117d Mon Sep 17 00:00:00 2001 From: Alan Dayton <6393677+adayton1@users.noreply.github.com> Date: Tue, 4 Feb 2025 15:38:24 -0800 Subject: [PATCH 12/24] Document when XNACK is required (#297) * Add comment about using XNACK --- src/chai/ManagedArray.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/chai/ManagedArray.hpp b/src/chai/ManagedArray.hpp index 8b3c6ba8..9e402273 100644 --- a/src/chai/ManagedArray.hpp +++ b/src/chai/ManagedArray.hpp @@ -427,6 +427,9 @@ class ManagedArray : public CHAICopyable * \tparam T Type of the raw data. * * \return A new ManagedArray containing the raw data pointer. + * + * \note If using this method on HIP platforms, XNACK must be enabled + * (see https://rocm.docs.amd.com/projects/HIP/en/latest/how-to/hip_runtime_api/memory_management/unified_memory.html). */ template ManagedArray makeManagedArray(T* data, From 6588a537b5674cae96367f7a35c8c03e36b27b29 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Wed, 5 Feb 2025 09:47:00 -0800 Subject: [PATCH 13/24] Squash amdclang warnings. (#299) * Separate host-configs for amdclang w/o +xnack. * Squashing wanrings for amdclang HIP builds. * Add CHAI_UNUSED_VAR. --- .../amdclang-xnack.cmake | 26 +++++++++++++++++++ .../lc/toss_4_x86_64_ib_cray/amdclang.cmake | 4 +-- src/chai/ChaiMacros.hpp | 10 +++++++ src/chai/ManagedArray.inl | 1 + tests/integration/managed_array_tests.cpp | 20 +++++++++----- tests/integration/managed_ptr_tests.cpp | 12 ++++----- 6 files changed, 58 insertions(+), 15 deletions(-) create mode 100644 host-configs/lc/toss_4_x86_64_ib_cray/amdclang-xnack.cmake diff --git a/host-configs/lc/toss_4_x86_64_ib_cray/amdclang-xnack.cmake b/host-configs/lc/toss_4_x86_64_ib_cray/amdclang-xnack.cmake new file mode 100644 index 00000000..6ca103c1 --- /dev/null +++ b/host-configs/lc/toss_4_x86_64_ib_cray/amdclang-xnack.cmake @@ -0,0 +1,26 @@ +############################################################################## +# Copyright (c) 2025, Lawrence Livermore National Security, LLC and CHAI +# project contributors. See the CHAI LICENSE file for details. +# +# SPDX-License-Identifier: BSD-3-Clause +############################################################################## + +# Set up software versions +set(ROCM_VERSION "6.2.0" CACHE PATH "") +set(GCC_VERSION "12.2.1" CACHE PATH "") + +# Set up compilers +set(COMPILER_BASE "/usr/tce/packages/rocmcc/rocmcc-${ROCM_VERSION}-magic" CACHE PATH "") +set(CMAKE_C_COMPILER "${COMPILER_BASE}/bin/amdclang" CACHE PATH "") +set(CMAKE_CXX_COMPILER "${COMPILER_BASE}/bin/amdclang++" CACHE PATH "") + +# Set up compiler flags +set(GCC_HOME "/usr/tce/packages/gcc/gcc-${GCC_VERSION}" CACHE PATH "") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --gcc-toolchain=${GCC_HOME}" CACHE STRING "") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --gcc-toolchain=${GCC_HOME}" CACHE STRING "") + +# Set up HIP +set(ENABLE_HIP ON CACHE BOOL "") +set(ROCM_PATH "/usr/tce/packages/rocmcc/rocmcc-${ROCM_VERSION}-magic" CACHE PATH "") +set(CMAKE_HIP_ARCHITECTURES "gfx942:xnack+" CACHE STRING "") +set(AMDGPU_TARGETS "${CMAKE_HIP_ARCHITECTURES}" CACHE STRING "") diff --git a/host-configs/lc/toss_4_x86_64_ib_cray/amdclang.cmake b/host-configs/lc/toss_4_x86_64_ib_cray/amdclang.cmake index f7895e1c..1759f7c3 100644 --- a/host-configs/lc/toss_4_x86_64_ib_cray/amdclang.cmake +++ b/host-configs/lc/toss_4_x86_64_ib_cray/amdclang.cmake @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2024, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2025, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause @@ -22,5 +22,5 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --gcc-toolchain=${GCC_HOME}" CACHE STRIN # Set up HIP set(ENABLE_HIP ON CACHE BOOL "") set(ROCM_PATH "/usr/tce/packages/rocmcc/rocmcc-${ROCM_VERSION}-magic" CACHE PATH "") -set(CMAKE_HIP_ARCHITECTURES "gfx942:xnack+" CACHE STRING "") +set(CMAKE_HIP_ARCHITECTURES "gfx942" CACHE STRING "") set(AMDGPU_TARGETS "${CMAKE_HIP_ARCHITECTURES}" CACHE STRING "") diff --git a/src/chai/ChaiMacros.hpp b/src/chai/ChaiMacros.hpp index 0747040c..1d62ba84 100644 --- a/src/chai/ChaiMacros.hpp +++ b/src/chai/ChaiMacros.hpp @@ -11,6 +11,10 @@ #include "umpire/util/Macros.hpp" +#if defined(CHAI_ENABLE_CUDA) || defined(CHAI_ENABLE_HIP) +#define CHAI_ENABLE_DEVICE +#endif + #if defined(CHAI_ENABLE_CUDA) #include @@ -92,4 +96,10 @@ #endif #endif +namespace chai +{ +template +CHAI_HOST_DEVICE CHAI_INLINE void CHAI_UNUSED_VAR(T &&...) noexcept {} +} // namespace chai + #endif // CHAI_ChaiMacros_HPP diff --git a/src/chai/ManagedArray.inl b/src/chai/ManagedArray.inl index 369964d6..b7e78b44 100644 --- a/src/chai/ManagedArray.inl +++ b/src/chai/ManagedArray.inl @@ -55,6 +55,7 @@ CHAI_HOST_DEVICE ManagedArray::ManagedArray( ExecutionSpace space) : ManagedArray() { + CHAI_UNUSED_VAR(elems, space); #if !defined(CHAI_DEVICE_COMPILE) this->allocate(elems, space); #endif diff --git a/tests/integration/managed_array_tests.cpp b/tests/integration/managed_array_tests.cpp index 4803b982..49858db9 100644 --- a/tests/integration/managed_array_tests.cpp +++ b/tests/integration/managed_array_tests.cpp @@ -11,7 +11,13 @@ static void gpu_test_##X##Y() #ifdef NDEBUG -#define device_assert(EXP) if( !EXP ) asm ("trap;") + +#ifdef CHAI_ENABLE_CUDA +#define device_assert(EXP) if( !(EXP) ) asm ("trap;") +#else +#define device_assert(EXP) if( !(EXP) ) asm ("s_trap 1;") +#endif + #else #define device_assert(EXP) assert(EXP) #endif @@ -799,7 +805,7 @@ GPU_TEST(ManagedArray, dataGPU) chai::ManagedArray array; array.allocate(length, chai::GPU, - [&] (const chai::PointerRecord* record, chai::Action act, chai::ExecutionSpace s) { + [&] (const chai::PointerRecord*, chai::Action act, chai::ExecutionSpace s) { if (act == chai::ACTION_MOVE) { if (s == chai::CPU) { ++transfersD2H; @@ -827,7 +833,7 @@ GPU_TEST(ManagedArray, dataGPU) // Move data to device with touch forall(gpu(), 0, length, [=] __device__ (int i) { - int* d_data = array.data(); + array.data(); array[i] += 1; }); @@ -845,7 +851,7 @@ GPU_TEST(ManagedArray, dataGPU) // Access on device with touch (should not be moved) forall(gpu(), 0, length, [=] __device__ (int i) { - int* d_data = array.data(); + array.data(); array[i] += i; }); @@ -896,7 +902,7 @@ GPU_TEST(ManagedArray, cdataGPU) chai::ManagedArray array; array.allocate(length, chai::GPU, - [&] (const chai::PointerRecord* record, chai::Action act, chai::ExecutionSpace s) { + [&] (const chai::PointerRecord*, chai::Action act, chai::ExecutionSpace s) { if (act == chai::ACTION_MOVE) { if (s == chai::CPU) { ++transfersD2H; @@ -1791,11 +1797,11 @@ GPU_TEST(ManagedArray, CopyZero) array.allocate(0); ASSERT_EQ(array.size(), 0u); - forall(gpu(), 0, 1, [=] __device__ (int i) { + forall(gpu(), 0, 1, [=] __device__ (int) { (void) array; }); - forall(sequential(), 0, 1, [=] (int i) { + forall(sequential(), 0, 1, [=] (int) { (void) array; }); diff --git a/tests/integration/managed_ptr_tests.cpp b/tests/integration/managed_ptr_tests.cpp index 000e6210..7a017b74 100644 --- a/tests/integration/managed_ptr_tests.cpp +++ b/tests/integration/managed_ptr_tests.cpp @@ -522,7 +522,7 @@ GPU_TEST(managed_ptr, gpu_class_with_managed_array) chai::ManagedArray array(1, chai::CPU); - forall(sequential(), 0, 1, [=] (int i) { + forall(sequential(), 0, 1, [=] (int) { array[0] = expectedValue; }); @@ -549,7 +549,7 @@ GPU_TEST(managed_ptr, gpu_class_with_raw_ptr) chai::ManagedArray array(1, chai::CPU); - forall(sequential(), 0, 1, [=] (int i) { + forall(sequential(), 0, 1, [=] (int) { array[0] = expectedValue; }); @@ -642,7 +642,7 @@ GPU_TEST(managed_ptr, static_pointer_cast) chai::ManagedArray array(1, chai::CPU); - forall(sequential(), 0, 1, [=] (int i) { + forall(sequential(), 0, 1, [=] (int) { array[0] = expectedValue; }); @@ -675,7 +675,7 @@ GPU_TEST(managed_ptr, dynamic_pointer_cast) chai::ManagedArray array(1, chai::CPU); - forall(sequential(), 0, 1, [=] (int i) { + forall(sequential(), 0, 1, [=] (int) { array[0] = expectedValue; }); @@ -708,7 +708,7 @@ GPU_TEST(managed_ptr, const_pointer_cast) chai::ManagedArray array(1, chai::CPU); - forall(sequential(), 0, 1, [=] (int i) { + forall(sequential(), 0, 1, [=] (int) { array[0] = expectedValue; }); @@ -741,7 +741,7 @@ GPU_TEST(managed_ptr, reinterpret_pointer_cast) chai::ManagedArray array(1, chai::CPU); - forall(sequential(), 0, 1, [=] (int i) { + forall(sequential(), 0, 1, [=] (int) { array[0] = expectedValue; }); From 660d094fde253c1462de8e87a73b4028e75a0418 Mon Sep 17 00:00:00 2001 From: Alan Dayton <6393677+adayton1@users.noreply.github.com> Date: Wed, 5 Feb 2025 10:40:39 -0800 Subject: [PATCH 14/24] Update copyright to 2025 (#300) --- .gitlab-ci.yml | 2 +- .gitlab/custom-jobs-and-variables.yml | 2 +- .gitlab/jobs/corona.yml | 2 +- .gitlab/jobs/lassen.yml | 2 +- .gitlab/jobs/poodle.yml | 2 +- .gitlab/jobs/ruby.yml | 2 +- .gitlab/jobs/tioga.yml | 2 +- .gitlab/subscribed-pipelines.yml | 2 +- CMakeLists.txt | 2 +- LICENSE | 2 +- README.md | 2 +- benchmarks/CMakeLists.txt | 2 +- benchmarks/chai_arraymanager_benchmarks.cpp | 2 +- benchmarks/chai_benchmark_utils.hpp | 2 +- benchmarks/chai_managed_ptr_benchmarks.cpp | 2 +- benchmarks/chai_managedarray_benchmarks.cpp | 2 +- cmake/ChaiBasics.cmake | 2 +- cmake/SetupChaiOptions.cmake | 2 +- cmake/chai-config.cmake.in | 8 ++++---- cmake/thirdparty/SetupChaiThirdparty.cmake | 2 +- docs/CMakeLists.txt | 2 +- docs/doxygen/CMakeLists.txt | 2 +- docs/doxygen/Doxyfile.in | 2 +- docs/sphinx/CMakeLists.txt | 2 +- docs/sphinx/advanced_configuration.rst | 2 +- docs/sphinx/code_documentation.rst | 2 +- docs/sphinx/conf.py | 2 +- docs/sphinx/conf.py.in | 2 +- docs/sphinx/contribution_guide.rst | 2 +- docs/sphinx/developer/ci.rst | 2 +- docs/sphinx/developer/uberenv.rst | 2 +- docs/sphinx/developer_guide.rst | 2 +- docs/sphinx/getting_started.rst | 2 +- docs/sphinx/index.rst | 2 +- docs/sphinx/tutorial.rst | 2 +- docs/sphinx/user_guide.rst | 2 +- examples/CMakeLists.txt | 2 +- examples/chai-umpire-allocators.cpp | 2 +- examples/ex1.cpp | 2 +- examples/example.cpp | 2 +- examples/managed_ptr_example.cpp | 2 +- examples/pinned.cpp | 2 +- host-configs/lc/blueos_3_ppc64le_ib_p9/nvcc_clang.cmake | 2 +- host-configs/lc/toss_4_x86_64_ib/clang.cmake | 2 +- host-configs/lc/toss_4_x86_64_ib/intel.cmake | 2 +- .../lc/toss_4_x86_64_ib_cray/amdclang-xnack.cmake | 2 +- host-configs/lc/toss_4_x86_64_ib_cray/amdclang.cmake | 2 +- reproducers/CMakeLists.txt | 2 +- .../managed_ptr_multiple_inheritance_reproducer.cpp | 2 +- reproducers/managed_ptr_reproducer.cpp | 2 +- reproducers/virtual_function_complex_reproducer.cpp | 2 +- reproducers/virtual_function_simple_reproducer.cpp | 2 +- scripts/apply-license-info.sh | 2 +- scripts/check-license-info.sh | 2 +- scripts/format-source.sh | 2 +- scripts/gitlab/build_and_test.sh | 2 +- scripts/license.txt | 4 ++-- scripts/make_release_tarball.sh | 2 +- scripts/travis/build_and_test.sh | 2 +- scripts/travis/install_llvm.sh | 2 +- scripts/update-copyright.sh | 8 ++++---- src/CMakeLists.txt | 2 +- src/chai/ArrayManager.cpp | 2 +- src/chai/ArrayManager.hpp | 2 +- src/chai/ArrayManager.inl | 2 +- src/chai/CMakeLists.txt | 2 +- src/chai/ChaiMacros.hpp | 2 +- src/chai/ExecutionSpaces.hpp | 2 +- src/chai/ManagedArray.hpp | 2 +- src/chai/ManagedArray.inl | 2 +- src/chai/ManagedArrayView.hpp | 2 +- src/chai/ManagedArray_thin.inl | 2 +- src/chai/PointerRecord.hpp | 2 +- src/chai/RajaExecutionSpacePlugin.cpp | 2 +- src/chai/RajaExecutionSpacePlugin.hpp | 2 +- src/chai/Types.hpp | 2 +- src/chai/config.hpp.in | 2 +- src/chai/managed_array.hpp | 2 +- src/chai/managed_ptr.hpp | 2 +- src/chai/pluginLinker.hpp | 2 +- src/util/forall.hpp | 2 +- tests/CMakeLists.txt | 2 +- tests/install/CMakeLists.txt | 2 +- tests/install/using-with-cmake/CMakeLists.txt | 2 +- tests/install/using-with-cmake/host-config.cmake.in | 2 +- tests/install/using-with-cmake/using-with-cmake.cpp | 2 +- tests/integration/CMakeLists.txt | 2 +- tests/integration/managed_array_tests.cpp | 2 +- tests/integration/managed_ptr_tests.cpp | 2 +- tests/integration/raja-chai-launch.cpp | 2 +- tests/integration/raja-chai-nested.cpp | 2 +- tests/integration/raja-chai-tests.cpp | 2 +- tests/unit/CMakeLists.txt | 2 +- tests/unit/array_manager_unit_tests.cpp | 2 +- tests/unit/managed_array_unit_tests.cpp | 2 +- tests/unit/managed_ptr_unit_tests.cpp | 2 +- 96 files changed, 103 insertions(+), 103 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bd454e3e..37810036 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2022-24, Lawrence Livermore National Security, LLC and RADIUSS +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: (MIT) diff --git a/.gitlab/custom-jobs-and-variables.yml b/.gitlab/custom-jobs-and-variables.yml index 60f75b59..8abe1a25 100644 --- a/.gitlab/custom-jobs-and-variables.yml +++ b/.gitlab/custom-jobs-and-variables.yml @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2022-24, Lawrence Livermore National Security, LLC and RADIUSS +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: (MIT) diff --git a/.gitlab/jobs/corona.yml b/.gitlab/jobs/corona.yml index 774f29e6..d98d97d0 100644 --- a/.gitlab/jobs/corona.yml +++ b/.gitlab/jobs/corona.yml @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2022-24, Lawrence Livermore National Security, LLC and RADIUSS +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: (MIT) diff --git a/.gitlab/jobs/lassen.yml b/.gitlab/jobs/lassen.yml index 1c3100ee..11604cb5 100644 --- a/.gitlab/jobs/lassen.yml +++ b/.gitlab/jobs/lassen.yml @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2022-24, Lawrence Livermore National Security, LLC and RADIUSS +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: (MIT) diff --git a/.gitlab/jobs/poodle.yml b/.gitlab/jobs/poodle.yml index 345aaa3e..04cef7a9 100644 --- a/.gitlab/jobs/poodle.yml +++ b/.gitlab/jobs/poodle.yml @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2022-24, Lawrence Livermore National Security, LLC and RADIUSS +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: (MIT) diff --git a/.gitlab/jobs/ruby.yml b/.gitlab/jobs/ruby.yml index eccb6ac8..44fad39b 100644 --- a/.gitlab/jobs/ruby.yml +++ b/.gitlab/jobs/ruby.yml @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2022-24, Lawrence Livermore National Security, LLC and RADIUSS +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: (MIT) diff --git a/.gitlab/jobs/tioga.yml b/.gitlab/jobs/tioga.yml index 2d12f0a6..c4390aa6 100644 --- a/.gitlab/jobs/tioga.yml +++ b/.gitlab/jobs/tioga.yml @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2022-24, Lawrence Livermore National Security, LLC and RADIUSS +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: (MIT) diff --git a/.gitlab/subscribed-pipelines.yml b/.gitlab/subscribed-pipelines.yml index dd317a75..961328ba 100644 --- a/.gitlab/subscribed-pipelines.yml +++ b/.gitlab/subscribed-pipelines.yml @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2022-24, Lawrence Livermore National Security, LLC and RADIUSS +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: (MIT) diff --git a/CMakeLists.txt b/CMakeLists.txt index fbee03b0..0a834691 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/LICENSE b/LICENSE index 86509c8f..9ff1fff0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016-2024, Lawrence Livermore National Security, LLC. +Copyright (c) 2016-25, Lawrence Livermore National Security, LLC. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index 026ff3ff..d8b81314 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [comment]: # (#################################################################) -[comment]: # (Copyright 2016-24, Lawrence Livermore National Security, LLC) +[comment]: # (Copyright 2016-25, Lawrence Livermore National Security, LLC) [comment]: # (and CHAI project contributors. See the CHAI LICENSE file for) [comment]: # (details.) [comment]: # diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt index f7833707..acb248ed 100644 --- a/benchmarks/CMakeLists.txt +++ b/benchmarks/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/benchmarks/chai_arraymanager_benchmarks.cpp b/benchmarks/chai_arraymanager_benchmarks.cpp index 4670fa89..369e288c 100644 --- a/benchmarks/chai_arraymanager_benchmarks.cpp +++ b/benchmarks/chai_arraymanager_benchmarks.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/benchmarks/chai_benchmark_utils.hpp b/benchmarks/chai_benchmark_utils.hpp index 73809989..390a1ac8 100644 --- a/benchmarks/chai_benchmark_utils.hpp +++ b/benchmarks/chai_benchmark_utils.hpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/benchmarks/chai_managed_ptr_benchmarks.cpp b/benchmarks/chai_managed_ptr_benchmarks.cpp index 226fc742..ffa16962 100644 --- a/benchmarks/chai_managed_ptr_benchmarks.cpp +++ b/benchmarks/chai_managed_ptr_benchmarks.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/benchmarks/chai_managedarray_benchmarks.cpp b/benchmarks/chai_managedarray_benchmarks.cpp index 95834278..08f3a7fe 100644 --- a/benchmarks/chai_managedarray_benchmarks.cpp +++ b/benchmarks/chai_managedarray_benchmarks.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/cmake/ChaiBasics.cmake b/cmake/ChaiBasics.cmake index f0168158..9b5b587d 100644 --- a/cmake/ChaiBasics.cmake +++ b/cmake/ChaiBasics.cmake @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/cmake/SetupChaiOptions.cmake b/cmake/SetupChaiOptions.cmake index e653f007..d7b69ac6 100644 --- a/cmake/SetupChaiOptions.cmake +++ b/cmake/SetupChaiOptions.cmake @@ -1,5 +1,5 @@ ############################################################################ -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/cmake/chai-config.cmake.in b/cmake/chai-config.cmake.in index 525ea610..a1bde19b 100644 --- a/cmake/chai-config.cmake.in +++ b/cmake/chai-config.cmake.in @@ -1,9 +1,9 @@ -############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI -# project contributors. See the COPYRIGHT file for details. +############################################################################ +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI +# project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause -############################################################################## +############################################################################ @PACKAGE_INIT@ diff --git a/cmake/thirdparty/SetupChaiThirdparty.cmake b/cmake/thirdparty/SetupChaiThirdparty.cmake index aae229f2..bab76abc 100644 --- a/cmake/thirdparty/SetupChaiThirdparty.cmake +++ b/cmake/thirdparty/SetupChaiThirdparty.cmake @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 338cdfcd..88201048 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/docs/doxygen/CMakeLists.txt b/docs/doxygen/CMakeLists.txt index dee5911a..3ab80929 100644 --- a/docs/doxygen/CMakeLists.txt +++ b/docs/doxygen/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/docs/doxygen/Doxyfile.in b/docs/doxygen/Doxyfile.in index 1646cd60..4bb1ca62 100644 --- a/docs/doxygen/Doxyfile.in +++ b/docs/doxygen/Doxyfile.in @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/docs/sphinx/CMakeLists.txt b/docs/sphinx/CMakeLists.txt index f819c905..c5708f45 100644 --- a/docs/sphinx/CMakeLists.txt +++ b/docs/sphinx/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/docs/sphinx/advanced_configuration.rst b/docs/sphinx/advanced_configuration.rst index 7893304f..e7eb3b58 100644 --- a/docs/sphinx/advanced_configuration.rst +++ b/docs/sphinx/advanced_configuration.rst @@ -1,5 +1,5 @@ .. - # Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI + # Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/docs/sphinx/code_documentation.rst b/docs/sphinx/code_documentation.rst index b17c93f1..60754e9c 100644 --- a/docs/sphinx/code_documentation.rst +++ b/docs/sphinx/code_documentation.rst @@ -1,5 +1,5 @@ .. - # Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI + # Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/docs/sphinx/conf.py b/docs/sphinx/conf.py index 9bdd981c..68973c14 100644 --- a/docs/sphinx/conf.py +++ b/docs/sphinx/conf.py @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/docs/sphinx/conf.py.in b/docs/sphinx/conf.py.in index 489da110..1c11e11e 100644 --- a/docs/sphinx/conf.py.in +++ b/docs/sphinx/conf.py.in @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/docs/sphinx/contribution_guide.rst b/docs/sphinx/contribution_guide.rst index cdcbf190..2c7b8be6 100644 --- a/docs/sphinx/contribution_guide.rst +++ b/docs/sphinx/contribution_guide.rst @@ -1,5 +1,5 @@ .. - # Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI + # Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/docs/sphinx/developer/ci.rst b/docs/sphinx/developer/ci.rst index be42733b..0c50e99f 100644 --- a/docs/sphinx/developer/ci.rst +++ b/docs/sphinx/developer/ci.rst @@ -1,5 +1,5 @@ .. - # Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI + # Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/docs/sphinx/developer/uberenv.rst b/docs/sphinx/developer/uberenv.rst index 0c8440e3..5e8d622a 100644 --- a/docs/sphinx/developer/uberenv.rst +++ b/docs/sphinx/developer/uberenv.rst @@ -1,5 +1,5 @@ .. - # Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI + # Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/docs/sphinx/developer_guide.rst b/docs/sphinx/developer_guide.rst index 615e2191..b034efc6 100644 --- a/docs/sphinx/developer_guide.rst +++ b/docs/sphinx/developer_guide.rst @@ -1,5 +1,5 @@ .. - # Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI + # Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/docs/sphinx/getting_started.rst b/docs/sphinx/getting_started.rst index a0aa7e4b..37131192 100644 --- a/docs/sphinx/getting_started.rst +++ b/docs/sphinx/getting_started.rst @@ -1,5 +1,5 @@ .. - # Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI + # Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/docs/sphinx/index.rst b/docs/sphinx/index.rst index 94e3a584..225f83b4 100644 --- a/docs/sphinx/index.rst +++ b/docs/sphinx/index.rst @@ -1,5 +1,5 @@ .. - # Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI + # Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/docs/sphinx/tutorial.rst b/docs/sphinx/tutorial.rst index 1aa441d6..74a182de 100644 --- a/docs/sphinx/tutorial.rst +++ b/docs/sphinx/tutorial.rst @@ -1,5 +1,5 @@ .. - # Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI + # Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/docs/sphinx/user_guide.rst b/docs/sphinx/user_guide.rst index 85817b25..95ecf16f 100644 --- a/docs/sphinx/user_guide.rst +++ b/docs/sphinx/user_guide.rst @@ -1,5 +1,5 @@ .. - # Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI + # Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index fef82b96..fd7ef705 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/examples/chai-umpire-allocators.cpp b/examples/chai-umpire-allocators.cpp index 63c2c8e2..a67e2b9e 100644 --- a/examples/chai-umpire-allocators.cpp +++ b/examples/chai-umpire-allocators.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/examples/ex1.cpp b/examples/ex1.cpp index ab7d0d29..10811cb1 100644 --- a/examples/ex1.cpp +++ b/examples/ex1.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/examples/example.cpp b/examples/example.cpp index b46b18ea..355368f7 100644 --- a/examples/example.cpp +++ b/examples/example.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/examples/managed_ptr_example.cpp b/examples/managed_ptr_example.cpp index e65081a1..afee1eed 100644 --- a/examples/managed_ptr_example.cpp +++ b/examples/managed_ptr_example.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/examples/pinned.cpp b/examples/pinned.cpp index dccd2ef3..7fbc2dc8 100644 --- a/examples/pinned.cpp +++ b/examples/pinned.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/host-configs/lc/blueos_3_ppc64le_ib_p9/nvcc_clang.cmake b/host-configs/lc/blueos_3_ppc64le_ib_p9/nvcc_clang.cmake index 4a03099a..4b2ae845 100644 --- a/host-configs/lc/blueos_3_ppc64le_ib_p9/nvcc_clang.cmake +++ b/host-configs/lc/blueos_3_ppc64le_ib_p9/nvcc_clang.cmake @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2024, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/host-configs/lc/toss_4_x86_64_ib/clang.cmake b/host-configs/lc/toss_4_x86_64_ib/clang.cmake index e9feda97..2d97d400 100644 --- a/host-configs/lc/toss_4_x86_64_ib/clang.cmake +++ b/host-configs/lc/toss_4_x86_64_ib/clang.cmake @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2024, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/host-configs/lc/toss_4_x86_64_ib/intel.cmake b/host-configs/lc/toss_4_x86_64_ib/intel.cmake index 644d97d2..73c78fa9 100644 --- a/host-configs/lc/toss_4_x86_64_ib/intel.cmake +++ b/host-configs/lc/toss_4_x86_64_ib/intel.cmake @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2024, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/host-configs/lc/toss_4_x86_64_ib_cray/amdclang-xnack.cmake b/host-configs/lc/toss_4_x86_64_ib_cray/amdclang-xnack.cmake index 6ca103c1..cba57505 100644 --- a/host-configs/lc/toss_4_x86_64_ib_cray/amdclang-xnack.cmake +++ b/host-configs/lc/toss_4_x86_64_ib_cray/amdclang-xnack.cmake @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2025, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/host-configs/lc/toss_4_x86_64_ib_cray/amdclang.cmake b/host-configs/lc/toss_4_x86_64_ib_cray/amdclang.cmake index 1759f7c3..db1dafbd 100644 --- a/host-configs/lc/toss_4_x86_64_ib_cray/amdclang.cmake +++ b/host-configs/lc/toss_4_x86_64_ib_cray/amdclang.cmake @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2025, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/reproducers/CMakeLists.txt b/reproducers/CMakeLists.txt index e8a39f58..d8d31c30 100644 --- a/reproducers/CMakeLists.txt +++ b/reproducers/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/reproducers/managed_ptr_multiple_inheritance_reproducer.cpp b/reproducers/managed_ptr_multiple_inheritance_reproducer.cpp index fb638ef2..5a357cf0 100644 --- a/reproducers/managed_ptr_multiple_inheritance_reproducer.cpp +++ b/reproducers/managed_ptr_multiple_inheritance_reproducer.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/reproducers/managed_ptr_reproducer.cpp b/reproducers/managed_ptr_reproducer.cpp index 67255818..8a4df2b3 100644 --- a/reproducers/managed_ptr_reproducer.cpp +++ b/reproducers/managed_ptr_reproducer.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/reproducers/virtual_function_complex_reproducer.cpp b/reproducers/virtual_function_complex_reproducer.cpp index ee70ed07..31fd924f 100644 --- a/reproducers/virtual_function_complex_reproducer.cpp +++ b/reproducers/virtual_function_complex_reproducer.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/reproducers/virtual_function_simple_reproducer.cpp b/reproducers/virtual_function_simple_reproducer.cpp index 7bbb8587..ab2fea4a 100644 --- a/reproducers/virtual_function_simple_reproducer.cpp +++ b/reproducers/virtual_function_simple_reproducer.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/scripts/apply-license-info.sh b/scripts/apply-license-info.sh index 1a52eb3f..73e738b0 100755 --- a/scripts/apply-license-info.sh +++ b/scripts/apply-license-info.sh @@ -1,6 +1,6 @@ #!/usr/bin/env zsh ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/scripts/check-license-info.sh b/scripts/check-license-info.sh index 9dfae9c1..515d00c9 100755 --- a/scripts/check-license-info.sh +++ b/scripts/check-license-info.sh @@ -1,6 +1,6 @@ #!/usr/bin/env zsh ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: (MIT) diff --git a/scripts/format-source.sh b/scripts/format-source.sh index 7e1d3c0b..1f534590 100755 --- a/scripts/format-source.sh +++ b/scripts/format-source.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/scripts/gitlab/build_and_test.sh b/scripts/gitlab/build_and_test.sh index 8bd54375..6436c925 100755 --- a/scripts/gitlab/build_and_test.sh +++ b/scripts/gitlab/build_and_test.sh @@ -7,7 +7,7 @@ then fi ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/scripts/license.txt b/scripts/license.txt index 5c49bc90..a686e913 100644 --- a/scripts/license.txt +++ b/scripts/license.txt @@ -1,10 +1,10 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause ############################################################################## -Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI project contributors. See the CHAI LICENSE file for details. SPDX-License-Identifier: BSD-3-Clause diff --git a/scripts/make_release_tarball.sh b/scripts/make_release_tarball.sh index 0a336b7f..06e05810 100755 --- a/scripts/make_release_tarball.sh +++ b/scripts/make_release_tarball.sh @@ -1,6 +1,6 @@ #!/bin/bash ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/scripts/travis/build_and_test.sh b/scripts/travis/build_and_test.sh index eb9879fd..06a6fb88 100755 --- a/scripts/travis/build_and_test.sh +++ b/scripts/travis/build_and_test.sh @@ -1,6 +1,6 @@ #!/bin/bash ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/scripts/travis/install_llvm.sh b/scripts/travis/install_llvm.sh index 79db6804..f0d142ed 100755 --- a/scripts/travis/install_llvm.sh +++ b/scripts/travis/install_llvm.sh @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/scripts/update-copyright.sh b/scripts/update-copyright.sh index 870b6d66..48c611b6 100755 --- a/scripts/update-copyright.sh +++ b/scripts/update-copyright.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: (MIT) @@ -47,18 +47,18 @@ for i in `cat files2change` do echo $i cp $i $i.sed.bak - sed "s/Copyright (c) \([0-9]\{4\}\)-[0-9]\{2\},/Copyright (c) \1-24,/" $i.sed.bak > $i + sed "s/Copyright (c) \([0-9]\{4\}\)-[0-9]\{2\},/Copyright (c) 2016-25,/" $i.sed.bak > $i done echo LICENSE cp LICENSE LICENSE.sed.bak -sed "s/Copyright (c) \([0-9]\{4\}\)-[0-9]\{4\}/Copyright (c) \1-2024/" LICENSE.sed.bak > LICENSE +sed "s/Copyright (c) \([0-9]\{4\}\)-[0-9]\{4\}/Copyright (c) 2016-25/" LICENSE.sed.bak > LICENSE for i in README.md CONTRIBUTING.md do echo $i cp $i $i.sed.bak - sed "s/\([0-9]\{4\}\)-[0-9]\{2\}/\1-24/" $i.sed.bak > $i + sed "s/\([0-9]\{4\}\)-[0-9]\{2\}/2016-25/" $i.sed.bak > $i done #============================================================================= diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3691d2cd..e42b7391 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/ArrayManager.cpp b/src/chai/ArrayManager.cpp index 64c55037..daa6124d 100644 --- a/src/chai/ArrayManager.cpp +++ b/src/chai/ArrayManager.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/ArrayManager.hpp b/src/chai/ArrayManager.hpp index 9041ee71..9dd68285 100644 --- a/src/chai/ArrayManager.hpp +++ b/src/chai/ArrayManager.hpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/ArrayManager.inl b/src/chai/ArrayManager.inl index b416aa78..84ae9909 100644 --- a/src/chai/ArrayManager.inl +++ b/src/chai/ArrayManager.inl @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/CMakeLists.txt b/src/chai/CMakeLists.txt index 2285c544..faab5481 100644 --- a/src/chai/CMakeLists.txt +++ b/src/chai/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/ChaiMacros.hpp b/src/chai/ChaiMacros.hpp index 1d62ba84..5cf0daa8 100644 --- a/src/chai/ChaiMacros.hpp +++ b/src/chai/ChaiMacros.hpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/ExecutionSpaces.hpp b/src/chai/ExecutionSpaces.hpp index bdc56492..ed8ef960 100644 --- a/src/chai/ExecutionSpaces.hpp +++ b/src/chai/ExecutionSpaces.hpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/ManagedArray.hpp b/src/chai/ManagedArray.hpp index 9e402273..7c04e3fc 100644 --- a/src/chai/ManagedArray.hpp +++ b/src/chai/ManagedArray.hpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/ManagedArray.inl b/src/chai/ManagedArray.inl index b7e78b44..50e720cf 100644 --- a/src/chai/ManagedArray.inl +++ b/src/chai/ManagedArray.inl @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/ManagedArrayView.hpp b/src/chai/ManagedArrayView.hpp index 4791931f..e253fec5 100644 --- a/src/chai/ManagedArrayView.hpp +++ b/src/chai/ManagedArrayView.hpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/ManagedArray_thin.inl b/src/chai/ManagedArray_thin.inl index 1270afd3..8fdf1e13 100644 --- a/src/chai/ManagedArray_thin.inl +++ b/src/chai/ManagedArray_thin.inl @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/PointerRecord.hpp b/src/chai/PointerRecord.hpp index e46ea899..5510ff94 100644 --- a/src/chai/PointerRecord.hpp +++ b/src/chai/PointerRecord.hpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/RajaExecutionSpacePlugin.cpp b/src/chai/RajaExecutionSpacePlugin.cpp index 42db1e66..b41a452e 100644 --- a/src/chai/RajaExecutionSpacePlugin.cpp +++ b/src/chai/RajaExecutionSpacePlugin.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/RajaExecutionSpacePlugin.hpp b/src/chai/RajaExecutionSpacePlugin.hpp index 9ea3cbce..304bed6b 100644 --- a/src/chai/RajaExecutionSpacePlugin.hpp +++ b/src/chai/RajaExecutionSpacePlugin.hpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/Types.hpp b/src/chai/Types.hpp index 300bb12c..5894a562 100644 --- a/src/chai/Types.hpp +++ b/src/chai/Types.hpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/config.hpp.in b/src/chai/config.hpp.in index 80eab12b..81dcf659 100644 --- a/src/chai/config.hpp.in +++ b/src/chai/config.hpp.in @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/managed_array.hpp b/src/chai/managed_array.hpp index f21056a7..3094e07f 100644 --- a/src/chai/managed_array.hpp +++ b/src/chai/managed_array.hpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/managed_ptr.hpp b/src/chai/managed_ptr.hpp index b5f4d7de..4239a44a 100644 --- a/src/chai/managed_ptr.hpp +++ b/src/chai/managed_ptr.hpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/src/chai/pluginLinker.hpp b/src/chai/pluginLinker.hpp index e7af9a76..1b336093 100644 --- a/src/chai/pluginLinker.hpp +++ b/src/chai/pluginLinker.hpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/src/util/forall.hpp b/src/util/forall.hpp index c90b944d..dce8a81d 100644 --- a/src/util/forall.hpp +++ b/src/util/forall.hpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 97e5c4eb..58c759df 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/tests/install/CMakeLists.txt b/tests/install/CMakeLists.txt index 7b1616d5..b3ed310a 100644 --- a/tests/install/CMakeLists.txt +++ b/tests/install/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC # and CHAI project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: (BSD-3-Clause) diff --git a/tests/install/using-with-cmake/CMakeLists.txt b/tests/install/using-with-cmake/CMakeLists.txt index 8c43e078..d49d4bac 100644 --- a/tests/install/using-with-cmake/CMakeLists.txt +++ b/tests/install/using-with-cmake/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC # and CHAI project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: (BSD-3-Clause) diff --git a/tests/install/using-with-cmake/host-config.cmake.in b/tests/install/using-with-cmake/host-config.cmake.in index ea36a492..637fcaeb 100644 --- a/tests/install/using-with-cmake/host-config.cmake.in +++ b/tests/install/using-with-cmake/host-config.cmake.in @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC # and CHAI project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: (BSD-3-Clause) diff --git a/tests/install/using-with-cmake/using-with-cmake.cpp b/tests/install/using-with-cmake/using-with-cmake.cpp index 6effe7f9..585cdc56 100644 --- a/tests/install/using-with-cmake/using-with-cmake.cpp +++ b/tests/install/using-with-cmake/using-with-cmake.cpp @@ -1,5 +1,5 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC // and CHAI project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: (BSD-3-Clause) diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt index c8338b0c..ca5dbb88 100644 --- a/tests/integration/CMakeLists.txt +++ b/tests/integration/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/tests/integration/managed_array_tests.cpp b/tests/integration/managed_array_tests.cpp index 49858db9..8812d5d2 100644 --- a/tests/integration/managed_array_tests.cpp +++ b/tests/integration/managed_array_tests.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/tests/integration/managed_ptr_tests.cpp b/tests/integration/managed_ptr_tests.cpp index 7a017b74..d69d97e8 100644 --- a/tests/integration/managed_ptr_tests.cpp +++ b/tests/integration/managed_ptr_tests.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/tests/integration/raja-chai-launch.cpp b/tests/integration/raja-chai-launch.cpp index 2033a0e8..6ada0f7b 100644 --- a/tests/integration/raja-chai-launch.cpp +++ b/tests/integration/raja-chai-launch.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/tests/integration/raja-chai-nested.cpp b/tests/integration/raja-chai-nested.cpp index edffd064..7702dcc5 100644 --- a/tests/integration/raja-chai-nested.cpp +++ b/tests/integration/raja-chai-nested.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/tests/integration/raja-chai-tests.cpp b/tests/integration/raja-chai-tests.cpp index f2391cb5..c85850ae 100644 --- a/tests/integration/raja-chai-tests.cpp +++ b/tests/integration/raja-chai-tests.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index c453bc67..1831dfe9 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +# Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI # project contributors. See the CHAI LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause diff --git a/tests/unit/array_manager_unit_tests.cpp b/tests/unit/array_manager_unit_tests.cpp index abc4197a..341ff576 100644 --- a/tests/unit/array_manager_unit_tests.cpp +++ b/tests/unit/array_manager_unit_tests.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/tests/unit/managed_array_unit_tests.cpp b/tests/unit/managed_array_unit_tests.cpp index 628096f0..2a65d2b2 100644 --- a/tests/unit/managed_array_unit_tests.cpp +++ b/tests/unit/managed_array_unit_tests.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause diff --git a/tests/unit/managed_ptr_unit_tests.cpp b/tests/unit/managed_ptr_unit_tests.cpp index d6c6a60d..907a1c9a 100644 --- a/tests/unit/managed_ptr_unit_tests.cpp +++ b/tests/unit/managed_ptr_unit_tests.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016-24, Lawrence Livermore National Security, LLC and CHAI +// Copyright (c) 2016-25, Lawrence Livermore National Security, LLC and CHAI // project contributors. See the CHAI LICENSE file for details. // // SPDX-License-Identifier: BSD-3-Clause From 91ec5047cd55b14c86f89f0245bb4c73d529f6f1 Mon Sep 17 00:00:00 2001 From: Alan Dayton <6393677+adayton1@users.noreply.github.com> Date: Fri, 7 Feb 2025 15:55:28 -0800 Subject: [PATCH 15/24] Support allocators in thin mode (#301) * Support allocators in thin mode * Fixes a hang when eviction is used --- RELEASE_NOTES.md | 2 + src/chai/ArrayManager.cpp | 43 ++++++--- src/chai/ArrayManager.hpp | 9 ++ src/chai/ArrayManager.inl | 31 +++--- src/chai/ManagedArray.hpp | 22 ++++- src/chai/ManagedArray.inl | 37 +++----- src/chai/ManagedArray_thin.inl | 169 +++++++++++++++++---------------- 7 files changed, 176 insertions(+), 137 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index dc911113..863b626f 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -18,6 +18,8 @@ The format of this file is based on [Keep a Changelog](http://keepachangelog.com ### Fixed - Fixes reallocate when using pinned or unified memory. - Adds missing synchronize when using pinned memory. +- Fixes possible hangs when evicting data. +- Now respects allocators passed to ManagedArray constructors when CHAI\_DISABLE\_RM=TRUE. ### Removed - Removes deprecated ManagedArray::getPointer method. Use ManagedArray::data instead. diff --git a/src/chai/ArrayManager.cpp b/src/chai/ArrayManager.cpp index daa6124d..792cc33e 100644 --- a/src/chai/ArrayManager.cpp +++ b/src/chai/ArrayManager.cpp @@ -37,7 +37,14 @@ ArrayManager::ArrayManager() : { m_pointer_map.clear(); m_current_execution_space = NONE; +#if defined(CHAI_THIN_GPU_ALLOCATE) + m_default_allocation_space = GPU; +#else m_default_allocation_space = CPU; +#endif + + m_allocators[NONE] = + new umpire::Allocator(m_resource_manager.getAllocator("HOST")); m_allocators[CPU] = new umpire::Allocator(m_resource_manager.getAllocator("HOST")); @@ -330,6 +337,7 @@ void ArrayManager::allocate( auto alloc = m_resource_manager.getAllocator(pointer_record->m_allocators[space]); pointer_record->m_pointers[space] = alloc.allocate(size); + callback(pointer_record, ACTION_ALLOC, space); registerPointer(pointer_record, space); @@ -481,8 +489,8 @@ PointerRecord* ArrayManager::makeManaged(void* pointer, pointer_record->m_size = size; pointer_record->m_user_callback = [] (const PointerRecord*, Action, ExecutionSpace) {}; - for (int space = CPU; space < NUM_EXECUTION_SPACES; ++space) { - pointer_record->m_allocators[space] = getAllocatorId(ExecutionSpace(space)); + for (int iSpace = CPU; iSpace < NUM_EXECUTION_SPACES; ++iSpace) { + pointer_record->m_allocators[iSpace] = getAllocatorId(ExecutionSpace(iSpace)); } if (pointer && size > 0) { @@ -600,22 +608,29 @@ void ArrayManager::evict(ExecutionSpace space, ExecutionSpace destinationSpace) // Get the pointer record auto record = *entry.second; - // Move the data and register the touches - move(record, destinationSpace); - registerTouch(record, destinationSpace); - - // If the destinationSpace is ever allowed to be NONE, then we will need to - // update the touch in the eviction space and make sure the last space is not - // the eviction space. - - // Mark record for eviction later in this routine - pointersToEvict.push_back(record); + // only evict if the pointers are different, same pointers + // implies UM or PINNED + if (record->m_pointers[space] != record->m_pointers[destinationSpace]) { + // Mark record for eviction later in this routine + pointersToEvict.push_back(record); + } } } - // This must be done in a second pass because free erases from m_pointer_map, - // which would invalidate the iterator in the above loop + // This must be done in a second pass because free erases from m_pointer_map + // and move has the potential to allocate, both of which which would + // invalidate the iterator in the above loop. Additionally, m_pointer_map + // is guarded by a mutex, so modifying it in the above loop (via move and/or + // free) creates deadlock. for (const auto& entry : pointersToEvict) { + // Move the data and register the touches + move(entry, destinationSpace); + registerTouch(entry, destinationSpace); + + // If the destinationSpace is ever allowed to be NONE, then we will need to + // update the touch in the eviction space and make sure the last space is not + // the eviction space. + free(entry, space); } } diff --git a/src/chai/ArrayManager.hpp b/src/chai/ArrayManager.hpp index 9dd68285..5fb23824 100644 --- a/src/chai/ArrayManager.hpp +++ b/src/chai/ArrayManager.hpp @@ -391,6 +391,15 @@ class ArrayManager * \return The allocator for the given space. */ umpire::Allocator getAllocator(ExecutionSpace space); + + /*! + * \brief Get the allocator for an allocator id + * + * \param allocator_id id for the allocator + * + * \return The allocator for the given allocator id. + */ + umpire::Allocator getAllocator(int allocator_id); /*! * \brief Turn callbacks on. diff --git a/src/chai/ArrayManager.inl b/src/chai/ArrayManager.inl index 84ae9909..f7811271 100644 --- a/src/chai/ArrayManager.inl +++ b/src/chai/ArrayManager.inl @@ -30,24 +30,24 @@ void* ArrayManager::reallocate(void* pointer, size_t elems, PointerRecord* point { ExecutionSpace my_space = CPU; - for (int space = CPU; space < NUM_EXECUTION_SPACES; ++space) { - if (pointer_record->m_pointers[space] == pointer) { - my_space = static_cast(space); + for (int iSpace = CPU; iSpace < NUM_EXECUTION_SPACES; ++iSpace) { + if (pointer_record->m_pointers[iSpace] == pointer) { + my_space = static_cast(iSpace); break; } } - for (int space = CPU; space < NUM_EXECUTION_SPACES; ++space) { - if (!pointer_record->m_owned[space]) { + for (int iSpace = CPU; iSpace < NUM_EXECUTION_SPACES; ++iSpace) { + if (!pointer_record->m_owned[iSpace]) { CHAI_LOG(Debug, "Cannot reallocate unowned pointer"); return pointer_record->m_pointers[my_space]; } } // Call callback with ACTION_FREE before changing the size - for (int space = CPU; space < NUM_EXECUTION_SPACES; ++space) { - void* space_ptr = pointer_record->m_pointers[space]; - int actualSpace = space; + for (int iSpace = CPU; iSpace < NUM_EXECUTION_SPACES; ++iSpace) { + void* space_ptr = pointer_record->m_pointers[iSpace]; + int actualSpace = iSpace; if (space_ptr) { #if defined(CHAI_ENABLE_UM) if (space_ptr == pointer_record->m_pointers[UM]) { @@ -75,10 +75,10 @@ void* ArrayManager::reallocate(void* pointer, size_t elems, PointerRecord* point // only copy however many bytes overlap size_t num_bytes_to_copy = std::min(old_size, new_size); - for (int space = CPU; space < NUM_EXECUTION_SPACES; ++space) { - void* space_ptr = pointer_record->m_pointers[space]; - auto alloc = m_resource_manager.getAllocator(pointer_record->m_allocators[space]); - int actualSpace = space; + for (int iSpace = CPU; iSpace < NUM_EXECUTION_SPACES; ++iSpace) { + void* space_ptr = pointer_record->m_pointers[iSpace]; + auto alloc = m_resource_manager.getAllocator(pointer_record->m_allocators[iSpace]); + int actualSpace = iSpace; if (space_ptr) { #if defined(CHAI_ENABLE_UM) @@ -94,7 +94,7 @@ void* ArrayManager::reallocate(void* pointer, size_t elems, PointerRecord* point } else #endif { - alloc = m_resource_manager.getAllocator(pointer_record->m_allocators[space]); + alloc = m_resource_manager.getAllocator(pointer_record->m_allocators[iSpace]); } void* new_ptr = alloc.allocate(new_size); #if CHAI_ENABLE_ZERO_INITIALIZED_MEMORY @@ -154,6 +154,11 @@ umpire::Allocator ArrayManager::getAllocator(ExecutionSpace space) { return *m_allocators[space]; } +CHAI_INLINE +umpire::Allocator ArrayManager::getAllocator(int allocator_id) { + return m_resource_manager.getAllocator(allocator_id); +} + CHAI_INLINE void ArrayManager::setAllocator(ExecutionSpace space, umpire::Allocator &allocator) { *m_allocators[space] = allocator; diff --git a/src/chai/ManagedArray.hpp b/src/chai/ManagedArray.hpp index 7c04e3fc..1a1a9878 100644 --- a/src/chai/ManagedArray.hpp +++ b/src/chai/ManagedArray.hpp @@ -112,14 +112,12 @@ class ManagedArray : public CHAICopyable /*! * \brief Allocate data for the ManagedArray in the specified space. * - * The default space for allocations is the CPU. - * * \param elems Number of elements to allocate. * \param space Execution space in which to allocate data. * \param cback User defined callback for memory events (alloc, free, move) */ CHAI_HOST void allocate(size_t elems, - ExecutionSpace space = CPU, + ExecutionSpace space = NONE, const UserCallback& cback = [] (const PointerRecord*, Action, ExecutionSpace) {}); @@ -128,7 +126,7 @@ class ManagedArray : public CHAICopyable /*! * \brief Reallocate data for the ManagedArray. * - * Reallocation will happen in all spaces the data exists + * Reallocation will happen in all spaces the data exists. * * \param elems Number of elements to allocate. */ @@ -344,6 +342,7 @@ class ManagedArray : public CHAICopyable m_size = other.m_size; m_offset = other.m_offset; m_pointer_record = other.m_pointer_record; + m_allocator_id = other.m_allocator_id; m_is_slice = other.m_is_slice; #ifndef CHAI_DISABLE_RM #if !defined(CHAI_DEVICE_COMPILE) @@ -409,6 +408,8 @@ class ManagedArray : public CHAICopyable */ mutable PointerRecord* m_pointer_record = nullptr; + mutable int m_allocator_id = -1; + mutable bool m_is_slice = false; }; @@ -471,6 +472,18 @@ ManagedArray makeManagedArray(T* data, return array; } +template +CHAI_HOST_DEVICE T* ManagedArray::getActiveBasePointer() const +{ + return m_active_base_pointer; +} + +template +CHAI_HOST_DEVICE T* ManagedArray::getActivePointer() const +{ + return m_active_pointer; +} + /*! * \brief Create a copy of the given ManagedArray with a single allocation in * the active space of the given array. @@ -510,6 +523,7 @@ CHAI_INLINE CHAI_HOST_DEVICE ManagedArray ManagedArray::slice( size_t offs #endif } else { slice.m_pointer_record = m_pointer_record; + slice.m_allocator_id = m_allocator_id; slice.m_active_base_pointer = m_active_base_pointer; slice.m_offset = offset + m_offset; slice.m_active_pointer = m_active_base_pointer + slice.m_offset; diff --git a/src/chai/ManagedArray.inl b/src/chai/ManagedArray.inl index 50e720cf..ed37c47b 100644 --- a/src/chai/ManagedArray.inl +++ b/src/chai/ManagedArray.inl @@ -21,6 +21,7 @@ CHAI_HOST_DEVICE ManagedArray::ManagedArray(): m_size(0), m_offset(0), m_pointer_record(nullptr), + m_allocator_id(-1), m_is_slice(false) { #if !defined(CHAI_DEVICE_COMPILE) @@ -89,6 +90,7 @@ CHAI_HOST ManagedArray::ManagedArray(PointerRecord* record, ExecutionSpace sp m_size(record->m_size), m_offset(0), m_pointer_record(record), + m_allocator_id(-1), m_is_slice(false) { m_resource_manager = ArrayManager::getInstance(); @@ -107,6 +109,7 @@ CHAI_HOST_DEVICE ManagedArray::ManagedArray(ManagedArray const& other): m_size(other.m_size), m_offset(other.m_offset), m_pointer_record(other.m_pointer_record), + m_allocator_id(-1), m_is_slice(other.m_is_slice) { #if !defined(CHAI_DEVICE_COMPILE) @@ -129,6 +132,7 @@ CHAI_HOST_DEVICE ManagedArray::ManagedArray(T* data, ArrayManager* array_mana m_size(elems*sizeof(T)), m_offset(0), m_pointer_record(pointer_record), + m_allocator_id(-1), m_is_slice(false) { #if !defined(CHAI_DEVICE_COMPILE) @@ -171,14 +175,11 @@ CHAI_HOST void ManagedArray::allocate( m_pointer_record->m_user_callback = cback; m_size = elems*sizeof(T); m_pointer_record->m_size = m_size; - - if (space != NONE) { - m_resource_manager->allocate(m_pointer_record, space); - m_active_base_pointer = static_cast(m_pointer_record->m_pointers[space]); - } else { - m_active_base_pointer = nullptr; - m_pointer_record->m_pointers[space] = nullptr; + if (space == NONE) { + space = chai::ArrayManager::getInstance()->getDefaultAllocationSpace(); } + m_resource_manager->allocate(m_pointer_record, space); + m_active_base_pointer = static_cast(m_pointer_record->m_pointers[space]); m_active_pointer = m_active_base_pointer; // Cannot be a slice // if T is a CHAICopyable, then it is important to initialize all the @@ -231,8 +232,7 @@ CHAI_HOST void ManagedArray::reallocate(size_t elems) m_size = elems*sizeof(T); m_active_base_pointer = - static_cast(m_resource_manager->reallocate(m_active_base_pointer, elems, - m_pointer_record)); + static_cast(m_resource_manager->reallocate(m_active_base_pointer, elems, m_pointer_record)); m_active_pointer = m_active_base_pointer; // Cannot be a slice // if T is a CHAICopyable, then it is important to initialize all the new @@ -271,11 +271,12 @@ CHAI_HOST void ManagedArray::free(ExecutionSpace space) m_active_pointer = nullptr; m_active_base_pointer = nullptr; - m_size = 0; - m_offset = 0; // The call to m_resource_manager::free, above, has deallocated m_pointer_record if space == NONE. + // It's also freed all pointers, so our size and offset should be reset if (space == NONE) { m_pointer_record = &ArrayManager::s_null_record; + m_size = 0; + m_offset = 0; } } else { CHAI_LOG(Debug, "Cannot free a slice!"); @@ -411,20 +412,6 @@ CHAI_HOST_DEVICE T& ManagedArray::operator[](const Idx i) const { return m_active_pointer[i]; } -template -CHAI_HOST_DEVICE T* -ManagedArray::getActiveBasePointer() const -{ - return m_active_base_pointer; -} - -template -CHAI_HOST_DEVICE T* -ManagedArray::getActivePointer() const -{ - return m_active_pointer; -} - template CHAI_INLINE CHAI_HOST_DEVICE diff --git a/src/chai/ManagedArray_thin.inl b/src/chai/ManagedArray_thin.inl index 8fdf1e13..ce912fdf 100644 --- a/src/chai/ManagedArray_thin.inl +++ b/src/chai/ManagedArray_thin.inl @@ -23,12 +23,14 @@ CHAI_INLINE ManagedArray::ManagedArray( std::initializer_list allocators) : ManagedArray() { - if (m_pointer_record) { - int i = 0; - - for (const auto& space : spaces) { - m_pointer_record->m_allocators[space] = allocators.begin()[i++].getId(); - } + int i = 0; + auto allocators_begin = allocators.begin(); + auto default_space = chai::ArrayManager::getInstance()->getDefaultAllocationSpace(); + for (const auto& space : spaces) { + if (space == default_space) { + m_allocator_id = allocators_begin[i].getId(); + } + ++i; } } @@ -42,7 +44,15 @@ ManagedArray::ManagedArray( ManagedArray(spaces, allocators) { m_size = elems*sizeof(T); - this->allocate(elems, space); + int i = 0; + auto allocators_begin = allocators.begin(); + for (const auto& s : spaces) { + if (s == space) { + m_allocator_id = allocators_begin[i].getId(); + } + ++i; + } + this->allocate(elems); } template @@ -68,6 +78,7 @@ CHAI_INLINE CHAI_HOST_DEVICE ManagedArray::ManagedArray(std::nullptr_t) m_size(0), m_offset(0), m_pointer_record(nullptr), + m_allocator_id(-1), m_is_slice(false) { } @@ -82,6 +93,7 @@ CHAI_HOST ManagedArray::ManagedArray(PointerRecord* record, ExecutionSpace sp m_size(record->m_size), m_offset(0), m_pointer_record(nullptr), + m_allocator_id(-1), m_is_slice(!record->m_owned[space]) { } @@ -100,21 +112,14 @@ CHAI_HOST_DEVICE ManagedArray::ManagedArray(T* data, m_active_base_pointer(data), m_resource_manager(array_manager), m_size(elems*sizeof(T)), - m_pointer_record(pointer_record) + m_pointer_record(pointer_record), + m_allocator_id(-1) { + if (pointer_record) { + m_allocator_id = pointer_record->m_allocators[pointer_record->m_last_space]; + } } -template -CHAI_HOST_DEVICE T* ManagedArray::getActiveBasePointer() const -{ - return m_active_base_pointer; -} - -template -CHAI_HOST_DEVICE T* ManagedArray::getActivePointer() const -{ - return m_active_pointer; -} template CHAI_HOST_DEVICE T* ManagedArray::data() const @@ -163,24 +168,31 @@ CHAI_HOST void ManagedArray::allocate(size_t elems, ExecutionSpace space, const UserCallback&) { if (!m_is_slice) { + if (m_allocator_id == -1) { +#if defined(CHAI_THIN_GPU_ALLOCATE) + if (space == NONE) { + space = chai::ArrayManager::getInstance()->getDefaultAllocationSpace(); + } + +#elif defined(CHAI_ENABLE_UM) + space = chai::UM; +#else + space = chai::CPU; +#endif + + m_allocator_id = chai::ArrayManager::getInstance()->getAllocatorId(space); + } + if (elems > 0) { - (void) space; // Quiet compiler warning when CHAI_LOG does nothing CHAI_LOG(Debug, "Allocating array of size " << elems << " in space " << space); + auto allocator = chai::ArrayManager::getInstance()->getAllocator(m_allocator_id); m_size = elems*sizeof(T); - - #if defined(CHAI_THIN_GPU_ALLOCATE) - m_active_pointer = (T*) chai::ArrayManager::getInstance()->getAllocator(chai::GPU).allocate(m_size); - #elif defined(CHAI_ENABLE_UM) - gpuMallocManaged(&m_active_pointer, m_size); - #else // not CHAI_ENABLE_UM - m_active_pointer = static_cast(malloc(sizeof(T) * elems)); - #endif + m_active_pointer = (T*) allocator.allocate(m_size); CHAI_LOG(Debug, "m_active_ptr allocated at address: " << m_active_pointer); - } else { m_active_pointer = nullptr; @@ -190,6 +202,7 @@ CHAI_HOST void ManagedArray::allocate(size_t elems, else { CHAI_LOG(Debug, "Attempted to allocate slice!"); } + m_active_base_pointer = m_active_pointer; } @@ -198,41 +211,36 @@ CHAI_INLINE CHAI_HOST void ManagedArray::reallocate(size_t new_elems) { if (!m_is_slice) { - CHAI_LOG(Debug, "Reallocating array of size " << m_size*sizeof(T) - << " with new size" - << new_elems*sizeof(T)); - - T* new_ptr = nullptr; - - #if defined(CHAI_THIN_GPU_ALLOCATE) - auto allocator = chai::ArrayManager::getInstance()->getAllocator(chai::GPU); - if (new_elems > 0) { - new_ptr = (T*) allocator.allocate(sizeof(T) * new_elems); - ArrayManager::getInstance()->syncIfNeeded(); - chai::gpuMemcpy(new_ptr, m_active_pointer, std::min(m_size, new_elems*sizeof(T)), gpuMemcpyDefault); - registerTouch(chai::GPU); - } - allocator.deallocate(m_active_pointer); - #elif defined(CHAI_ENABLE_UM) - if (new_elems > 0) { - gpuMallocManaged(&new_ptr, sizeof(T) * new_elems); - gpuMemcpy(new_ptr, m_active_pointer, std::min(new_elems*sizeof(T), m_size), gpuMemcpyDefault); + // reallocating a nullptr is equivalent to an allocate + if (m_size == 0 && m_active_base_pointer == nullptr) { + return allocate(new_elems); } - gpuFree(m_active_pointer); - #else // not CHAI_ENABLE_UM - if (new_elems > 0) { - new_ptr = static_cast(realloc(m_active_pointer, sizeof(T) * new_elems)); - } - else { - ::free((void *)m_active_pointer); - } - #endif - m_size= new_elems*sizeof(T); - m_active_pointer = new_ptr; - m_active_base_pointer = m_active_pointer; + if (m_size != new_elems*sizeof(T)) { + CHAI_LOG(Debug, "Reallocating array of size " << m_size*sizeof(T) + << " with new size" + << new_elems*sizeof(T)); + + T* new_ptr = nullptr; - CHAI_LOG(Debug, "m_active_ptr reallocated at address: " << m_active_pointer); + auto arrayManager = ArrayManager::getInstance(); + auto allocator = arrayManager->getAllocator(m_allocator_id); + + if (new_elems > 0) { + new_ptr = (T*) allocator.allocate(sizeof(T) * new_elems); + arrayManager->syncIfNeeded(); + arrayManager->copy(new_ptr, m_active_pointer, std::min(m_size, new_elems*sizeof(T))); + registerTouch(chai::GPU); + } + + allocator.deallocate(m_active_pointer); + + m_size = new_elems*sizeof(T); + m_active_pointer = new_ptr; + m_active_base_pointer = m_active_pointer; + + CHAI_LOG(Debug, "m_active_ptr reallocated at address: " << m_active_pointer); + } } else { CHAI_LOG(Debug, "Attempted to realloc slice!"); @@ -240,27 +248,25 @@ CHAI_HOST void ManagedArray::reallocate(size_t new_elems) } template -CHAI_INLINE CHAI_HOST void ManagedArray::free(ExecutionSpace space) +CHAI_INLINE CHAI_HOST void ManagedArray::free(ExecutionSpace /*space*/ ) { - if (!m_is_slice) { - if (space == CPU || space == NONE) { -#if defined(CHAI_THIN_GPU_ALLOCATE) - if (m_active_pointer) { - auto allocator = chai::ArrayManager::getInstance()->getAllocator(chai::GPU); - allocator.deallocate((void *)m_active_pointer); - } -#elif defined(CHAI_ENABLE_UM) - chai::gpuFree(m_active_pointer); -#else - ::free((void *)m_active_pointer); -#endif - m_active_pointer = nullptr; - m_active_base_pointer = nullptr; - m_size = 0; - } - } - else { - CHAI_LOG(Debug, "tried to free slice!"); + if (m_allocator_id != -1) { + if (!m_is_slice) { + auto arrayManager = ArrayManager::getInstance(); + + if (m_active_pointer) { + auto allocator = arrayManager->getAllocator(m_allocator_id); + allocator.deallocate((void *)m_active_pointer); + } + + m_active_pointer = nullptr; + m_active_base_pointer = nullptr; + m_size = 0; + m_allocator_id = -1; + } + else { + CHAI_LOG(Debug, "tried to free slice!"); + } } } @@ -353,6 +359,7 @@ CHAI_INLINE CHAI_HOST_DEVICE ManagedArray& ManagedArray::operator=(std::nu m_active_base_pointer = from; m_size = 0; m_is_slice = false; + m_allocator_id = -1; return *this; } From a3c1915ad72e9a141b54e15237d3acb44fab6b37 Mon Sep 17 00:00:00 2001 From: Alan Dayton <6393677+adayton1@users.noreply.github.com> Date: Tue, 11 Feb 2025 08:45:11 -0800 Subject: [PATCH 16/24] Remove ManagedArray::getActiveBasePointer (#302) * Remove getActiveBasePointer * Add ManagedArray::clone function * Deprecate chai::deepCopy free function --- RELEASE_NOTES.md | 4 +++ src/chai/ManagedArray.hpp | 31 ++++++++--------------- src/chai/ManagedArray.inl | 9 +++++++ src/chai/ManagedArray_thin.inl | 13 ++++++++++ tests/integration/managed_array_tests.cpp | 13 ++++------ 5 files changed, 41 insertions(+), 29 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 863b626f..fe27f3c0 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -15,6 +15,9 @@ The format of this file is based on [Keep a Changelog](http://keepachangelog.com ## [Unreleased] - Release date yyyy-mm-dd +### Added +- Added a ManagedArray::clone function and deprecated chai::deepCopy. + ### Fixed - Fixes reallocate when using pinned or unified memory. - Adds missing synchronize when using pinned memory. @@ -22,6 +25,7 @@ The format of this file is based on [Keep a Changelog](http://keepachangelog.com - Now respects allocators passed to ManagedArray constructors when CHAI\_DISABLE\_RM=TRUE. ### Removed +- Removes ManagedArray::getActiveBasePointer method. - Removes deprecated ManagedArray::getPointer method. Use ManagedArray::data instead. - Removes ManagedArray::incr and ManagedArray::decr methods. Use ManagedArray::pick and ManagedArray::set instead. - Removes optional support for implicitly casting between raw pointers and ManagedArrays (CHAI\_ENABLE\_IMPLICIT\_CONVERSIONS). Use makeManagedArray and ManagedArray::data to perform explicit conversions instead. diff --git a/src/chai/ManagedArray.hpp b/src/chai/ManagedArray.hpp index 1a1a9878..402135db 100644 --- a/src/chai/ManagedArray.hpp +++ b/src/chai/ManagedArray.hpp @@ -102,6 +102,14 @@ class ManagedArray : public CHAICopyable */ CHAI_HOST_DEVICE ManagedArray(ManagedArray const& other); + /*! + * \brief Create a deep copy of the current ManagedArray with a single + * allocation in the active space of the current ManagedArray. + * + * \return A deep copy of the current ManagedArray. + */ + ManagedArray clone(); + /*! * \brief Construct a ManagedArray from a nullptr. */ @@ -174,12 +182,6 @@ class ManagedArray : public CHAICopyable template CHAI_HOST_DEVICE T& operator[](const Idx i) const; - /*! - * \brief get access to m_active_pointer - * @return a copy of m_active_base_pointer - */ - CHAI_HOST_DEVICE T* getActiveBasePointer() const; - /*! * \brief get access to m_active_pointer * @return a copy of m_active_pointer @@ -472,12 +474,6 @@ ManagedArray makeManagedArray(T* data, return array; } -template -CHAI_HOST_DEVICE T* ManagedArray::getActiveBasePointer() const -{ - return m_active_base_pointer; -} - template CHAI_HOST_DEVICE T* ManagedArray::getActivePointer() const { @@ -495,17 +491,10 @@ CHAI_HOST_DEVICE T* ManagedArray::getActivePointer() const * \return A copy of the given ManagedArray. */ template +[[deprecated("Use ManagedArray::clone instead.")]] ManagedArray deepCopy(ManagedArray const& array) { - T* data_ptr = array.getActiveBasePointer(); - - ArrayManager* manager = ArrayManager::getInstance(); - - PointerRecord const* record = manager->getPointerRecord(data_ptr); - - PointerRecord* copy_record = manager->deepCopyRecord(record); - - return ManagedArray(copy_record, copy_record->m_last_space); + return array.clone(); } template diff --git a/src/chai/ManagedArray.inl b/src/chai/ManagedArray.inl index ed37c47b..534e0207 100644 --- a/src/chai/ManagedArray.inl +++ b/src/chai/ManagedArray.inl @@ -151,6 +151,15 @@ CHAI_HOST_DEVICE ManagedArray::ManagedArray(T* data, ArrayManager* array_mana #endif } +template +CHAI_INLINE +ManagedArray ManagedArray::clone() +{ + ArrayManager* manager = ArrayManager::getInstance(); + const PointerRecord* record = manager->getPointerRecord(m_active_base_pointer); + PointerRecord* copy_record = manager->deepCopyRecord(record); + return ManagedArray(copy_record, copy_record->m_last_space); +} template CHAI_INLINE diff --git a/src/chai/ManagedArray_thin.inl b/src/chai/ManagedArray_thin.inl index ce912fdf..d90f50a5 100644 --- a/src/chai/ManagedArray_thin.inl +++ b/src/chai/ManagedArray_thin.inl @@ -120,6 +120,19 @@ CHAI_HOST_DEVICE ManagedArray::ManagedArray(T* data, } } +template +CHAI_INLINE +ManagedArray ManagedArray::clone() +{ + ManagedArray result; + result.m_allocator_id = m_allocator_id; + result.allocate(size()); + auto arrayManager = ArrayManager::getInstance(); + arrayManager->syncIfNeeded(); + arrayManager->copy(result.m_active_pointer, m_active_pointer, m_size); + result.registerTouch(chai::GPU); + return result; +} template CHAI_HOST_DEVICE T* ManagedArray::data() const diff --git a/tests/integration/managed_array_tests.cpp b/tests/integration/managed_array_tests.cpp index 8812d5d2..71aea7d5 100644 --- a/tests/integration/managed_array_tests.cpp +++ b/tests/integration/managed_array_tests.cpp @@ -1703,16 +1703,14 @@ GPU_TEST(ManagedArray, MoveInnerToDeviceAgain) #endif // CHAI_DISABLE_RM #endif // defined(CHAI_ENABLE_CUDA) || defined(CHAI_ENABLE_HIP) - -#ifndef CHAI_DISABLE_RM -TEST(ManagedArray, DeepCopy) +TEST(ManagedArray, Clone) { chai::ManagedArray array(10); ASSERT_EQ(array.size(), 10u); forall(sequential(), 0, 10, [=](int i) { array[i] = i; }); - chai::ManagedArray copy = chai::deepCopy(array); + chai::ManagedArray copy = array.clone(); ASSERT_EQ(copy.size(), 10u); forall(sequential(), 0, 10, [=](int i) { array[i] = -5.5 * i; }); @@ -1726,18 +1724,16 @@ TEST(ManagedArray, DeepCopy) copy.free(); assert_empty_map(true); } -#endif #if defined(CHAI_ENABLE_CUDA) || defined(CHAI_ENABLE_HIP) -#ifndef CHAI_DISABLE_RM -GPU_TEST(ManagedArray, DeviceDeepCopy) +GPU_TEST(ManagedArray, DeviceClone) { chai::ManagedArray array(10, chai::GPU); ASSERT_EQ(array.size(), 10u); forall(gpu(), 0, 10, [=] __device__(int i) { array[i] = i; }); - chai::ManagedArray copy = chai::deepCopy(array); + chai::ManagedArray copy = array.clone(); ASSERT_EQ(copy.size(), 10u); forall(gpu(), 0, 10, [=] __device__(int i) { array[i] = -5.5 * i; }); @@ -1752,6 +1748,7 @@ GPU_TEST(ManagedArray, DeviceDeepCopy) assert_empty_map(true); } +#ifndef CHAI_DISABLE_RM GPU_TEST(ManagedArray, CopyConstruct) { const int expectedValue = rand(); From a989bd27e9bfcea6257bcc6a9cead3a412d0ab6b Mon Sep 17 00:00:00 2001 From: Adrien Bernede <51493078+adrienbernede@users.noreply.github.com> Date: Thu, 13 Feb 2025 20:45:34 +0100 Subject: [PATCH 17/24] Various updates in RADIUSS Spack Configs (#290) * Spack environments split in separate files so that users can access packages.yaml and compilers.yaml directly * Update externals, add new externals to support building other projects (axom) * Make sure we do not reuse specs already installed (concretization is not influenced by what's already built) * Update rocm tioga toolchain * Update with improved job command handling * Export host config as artifacts * More uniform CI specs (build raja without examples) --------- Co-authored-by: Alan Dayton <6393677+adayton1@users.noreply.github.com> --- .gitlab-ci.yml | 4 ++-- .gitlab/custom-jobs-and-variables.yml | 3 +++ .gitlab/jobs/lassen.yml | 12 ++++++------ .gitlab/jobs/poodle.yml | 8 +------- .gitlab/jobs/ruby.yml | 8 +------- .uberenv_config.json | 3 +-- scripts/gitlab/build_and_test.sh | 4 ---- scripts/radiuss-spack-configs | 2 +- scripts/uberenv | 2 +- 9 files changed, 16 insertions(+), 30 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 37810036..47261d03 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -73,7 +73,7 @@ stages: include: - local: '.gitlab/custom-jobs-and-variables.yml' - project: 'radiuss/radiuss-shared-ci' - ref: 'v2024.04.0' + ref: 'v2024.12.0' file: 'pipelines/${CI_MACHINE}.yml' - artifact: '${CI_MACHINE}-jobs.yml' job: 'generate-job-lists' @@ -86,7 +86,7 @@ include: file: 'id_tokens.yml' # [Optional] checks preliminary to running the actual CI test #- project: 'radiuss/radiuss-shared-ci' - # ref: 'v2024.04.0' + # ref: 'v2024.12.0' # file: 'preliminary-ignore-draft-pr.yml' # pipelines subscribed by the project - local: '.gitlab/subscribed-pipelines.yml' diff --git a/.gitlab/custom-jobs-and-variables.yml b/.gitlab/custom-jobs-and-variables.yml index 8abe1a25..24949caf 100644 --- a/.gitlab/custom-jobs-and-variables.yml +++ b/.gitlab/custom-jobs-and-variables.yml @@ -71,6 +71,9 @@ variables: artifacts: reports: junit: junit.xml + name: "${CI_PROJECT_NAME}-${CI_MACHINE}-${CI_JOB_NAME}-${CI_PIPELINE_ID}" + paths: + - ./*.cmake .reproducer_vars: script: diff --git a/.gitlab/jobs/lassen.yml b/.gitlab/jobs/lassen.yml index 11604cb5..79901054 100644 --- a/.gitlab/jobs/lassen.yml +++ b/.gitlab/jobs/lassen.yml @@ -36,32 +36,32 @@ gcc_11_2_1_cuda_11_8_0: clang_12_0_1_libcpp: extends: .job_on_lassen variables: - SPEC: "~shared +raja tests=basic %clang@12.0.1 cflags==\"-DGTEST_HAS_CXXABI_H_=0\" cxxflags==\"-stdlib=libc++ -DGTEST_HAS_CXXABI_H_=0\"" + SPEC: "~shared +raja tests=basic %clang@12.0.1 cflags==\"-DGTEST_HAS_CXXABI_H_=0\" cxxflags==\"-stdlib=libc++ -DGTEST_HAS_CXXABI_H_=0\" ^raja~examples~exercises" clang_16_0_6_libcpp: extends: .job_on_lassen variables: - SPEC: "~shared +raja tests=basic %clang@16.0.6 cflags==\"-DGTEST_HAS_CXXABI_H_=0\" cxxflags==\"-stdlib=libc++ -DGTEST_HAS_CXXABI_H_=0\"" + SPEC: "~shared +raja tests=basic %clang@16.0.6 cflags==\"-DGTEST_HAS_CXXABI_H_=0\" cxxflags==\"-stdlib=libc++ -DGTEST_HAS_CXXABI_H_=0\" ^raja~examples~exercises" clang_12_0_1_gcc_8_3_1_memleak: extends: .job_on_lassen variables: - SPEC: "~shared +raja tests=basic %clang@12.0.1.gcc.8.3.1 cxxflags==\"-fsanitize=address\"" + SPEC: "~shared +raja tests=basic %clang@12.0.1.gcc.8.3.1 cxxflags==\"-fsanitize=address\" ^raja~examples~exercises" ASAN_OPTIONS: "detect_leaks=1" clang_16_0_6_gcc_8_3_1_memleak: extends: .job_on_lassen variables: - SPEC: "~shared +raja tests=basic %clang@16.0.6.gcc.8.3.1 cxxflags==\"-fsanitize=address\"" + SPEC: "~shared +raja tests=basic %clang@16.0.6.gcc.8.3.1 cxxflags==\"-fsanitize=address\" ^raja~examples~exercises" ASAN_OPTIONS: "detect_leaks=1" clang_12_0_1_datarace: extends: .job_on_lassen variables: - SPEC: "~shared +raja tests=basic %clang@12.0.1 cxxflags==\"-fsanitize=thread\"" + SPEC: "~shared +raja tests=basic %clang@12.0.1 cxxflags==\"-fsanitize=thread\" ^raja~examples~exercises" clang_16_0_6_datarace: extends: .job_on_lassen variables: - SPEC: "~shared +raja tests=basic %clang@16.0.6 cxxflags==\"-fsanitize=thread\"" + SPEC: "~shared +raja tests=basic %clang@16.0.6 cxxflags==\"-fsanitize=thread\" ^raja~examples~exercises" diff --git a/.gitlab/jobs/poodle.yml b/.gitlab/jobs/poodle.yml index 04cef7a9..387d835c 100644 --- a/.gitlab/jobs/poodle.yml +++ b/.gitlab/jobs/poodle.yml @@ -28,12 +28,6 @@ clang_14_0_6_develop_tpls: variables: - SPEC: " %clang@14.0.6 ^umpire@develop ^raja@develop ^camp@main" - extends: .job_on_poodle - allow_failure: true - -clang_16_0_6_develop_tpls: - variables: - SPEC: " %clang@16.0.6 ^umpire@develop ^raja@develop ^camp@main" + SPEC: " ~shared +raja tests=basic %clang@=14.0.6 ^umpire@develop ^raja@develop~examples~exercises ^camp@main" extends: .job_on_poodle allow_failure: true diff --git a/.gitlab/jobs/ruby.yml b/.gitlab/jobs/ruby.yml index 44fad39b..df28ccf1 100644 --- a/.gitlab/jobs/ruby.yml +++ b/.gitlab/jobs/ruby.yml @@ -28,12 +28,6 @@ clang_14_0_6_develop_tpls: variables: - SPEC: " %clang@14.0.6 ^umpire@develop ^raja@develop ^camp@main" - extends: .job_on_ruby - allow_failure: true - -clang_16_0_6_develop_tpls: - variables: - SPEC: " %clang@16.0.6 ^umpire@develop ^raja@develop ^camp@main" + SPEC: " ~shared +raja tests=basic %clang@14.0.6 ^umpire@develop ^raja@develop~examples~exercises ^camp@main" extends: .job_on_ruby allow_failure: true diff --git a/.uberenv_config.json b/.uberenv_config.json index 1c348e5d..61e1737b 100644 --- a/.uberenv_config.json +++ b/.uberenv_config.json @@ -4,8 +4,7 @@ "package_final_phase" : "initconfig", "package_source_dir" : "../..", "spack_url": "https://github.com/spack/spack.git", -"spack_branch": "develop-2024-10-06", -"spack_activate" : {}, +"spack_branch": "develop-2025-02-09", "spack_configs_path": "scripts/radiuss-spack-configs", "spack_packages_path": "scripts/radiuss-spack-configs/packages", "spack_concretizer": "clingo", diff --git a/scripts/gitlab/build_and_test.sh b/scripts/gitlab/build_and_test.sh index 6436c925..bc8dc7f2 100755 --- a/scripts/gitlab/build_and_test.sh +++ b/scripts/gitlab/build_and_test.sh @@ -222,10 +222,6 @@ then mkdir -p ${build_dir} && cd ${build_dir} timed_message "Building CHAI" - if [[ "${truehostname}" == "corona" || "${truehostname}" == "tioga" ]] - then - module unload rocm - fi $cmake_exe \ -C ${hostconfig_path} \ -DCMAKE_INSTALL_PREFIX=${install_dir} \ diff --git a/scripts/radiuss-spack-configs b/scripts/radiuss-spack-configs index 00c06c2d..5d16f366 160000 --- a/scripts/radiuss-spack-configs +++ b/scripts/radiuss-spack-configs @@ -1 +1 @@ -Subproject commit 00c06c2d0258802fbf4a57ff987314d4acd9f629 +Subproject commit 5d16f366c1ee1e0db4491f856e82c3c600fef0a1 diff --git a/scripts/uberenv b/scripts/uberenv index 205672b8..6ba67dcb 160000 --- a/scripts/uberenv +++ b/scripts/uberenv @@ -1 +1 @@ -Subproject commit 205672b8b2520d7dc69acefe8738960cd5db0937 +Subproject commit 6ba67dcbd7ccbb9c03920b89de19ac959e2c3bdd From 214d6ff9d4afbd132898499da6afc486466bc76a Mon Sep 17 00:00:00 2001 From: Alan Dayton <6393677+adayton1@users.noreply.github.com> Date: Tue, 11 Mar 2025 11:23:38 -0700 Subject: [PATCH 18/24] Restore getActiveBasePointer (#303) --- RELEASE_NOTES.md | 1 - src/chai/ManagedArray.hpp | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index fe27f3c0..ee9f1b8c 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -25,7 +25,6 @@ The format of this file is based on [Keep a Changelog](http://keepachangelog.com - Now respects allocators passed to ManagedArray constructors when CHAI\_DISABLE\_RM=TRUE. ### Removed -- Removes ManagedArray::getActiveBasePointer method. - Removes deprecated ManagedArray::getPointer method. Use ManagedArray::data instead. - Removes ManagedArray::incr and ManagedArray::decr methods. Use ManagedArray::pick and ManagedArray::set instead. - Removes optional support for implicitly casting between raw pointers and ManagedArrays (CHAI\_ENABLE\_IMPLICIT\_CONVERSIONS). Use makeManagedArray and ManagedArray::data to perform explicit conversions instead. diff --git a/src/chai/ManagedArray.hpp b/src/chai/ManagedArray.hpp index 402135db..f76592a6 100644 --- a/src/chai/ManagedArray.hpp +++ b/src/chai/ManagedArray.hpp @@ -182,6 +182,12 @@ class ManagedArray : public CHAICopyable template CHAI_HOST_DEVICE T& operator[](const Idx i) const; + /*! + * \brief get access to m_active_base_pointer + * @return a copy of m_active_base_pointer + */ + CHAI_HOST_DEVICE T* getActiveBasePointer() const; + /*! * \brief get access to m_active_pointer * @return a copy of m_active_pointer @@ -474,6 +480,12 @@ ManagedArray makeManagedArray(T* data, return array; } +template +CHAI_HOST_DEVICE T* ManagedArray::getActiveBasePointer() const +{ + return m_active_base_pointer; +} + template CHAI_HOST_DEVICE T* ManagedArray::getActivePointer() const { From ce37124fcc265a5c11bb9266058016ef2395cdeb Mon Sep 17 00:00:00 2001 From: Alan Dayton Date: Tue, 11 Mar 2025 12:44:41 -0700 Subject: [PATCH 19/24] Update release number --- CMakeLists.txt | 2 +- README.md | 2 +- RELEASE_NOTES.md | 2 +- docs/sphinx/conf.py | 4 ++-- docs/sphinx/conf.py.in | 4 ++-- scripts/make_release_tarball.sh | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a834691..9883c415 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ cmake_policy(SET CMP0025 NEW) include(CMakeDependentOption) include(CMakePackageConfigHelpers) -project(Chai LANGUAGES C CXX VERSION 2024.07.0) +project(Chai LANGUAGES C CXX VERSION 2025.03.0) cmake_minimum_required(VERSION 3.23) include(cmake/SetupChaiOptions.cmake) diff --git a/README.md b/README.md index d8b81314..33755ac9 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [comment]: # (# SPDX-License-Identifier: BSD-3-Clause) [comment]: # (#################################################################) -# CHAI v2024.07.0 +# CHAI v2025.03.0 [![Azure Build Status](https://dev.azure.com/davidbeckingsale/CHAI/_apis/build/status/LLNL.CHAI?branchName=develop)](https://dev.azure.com/davidbeckingsale/CHAI/_build/latest?definitionId=2&branchName=develop) [![Build Status](https://travis-ci.org/LLNL/CHAI.svg?branch=develop)](https://travis-ci.org/LLNL/CHAI) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index ee9f1b8c..3b647cc7 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -13,7 +13,7 @@ in this file. The format of this file is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). -## [Unreleased] - Release date yyyy-mm-dd +## [Version 2025.03.0] - Release date 2025-03-?? ### Added - Added a ManagedArray::clone function and deprecated chai::deepCopy. diff --git a/docs/sphinx/conf.py b/docs/sphinx/conf.py index 68973c14..6292d8af 100644 --- a/docs/sphinx/conf.py +++ b/docs/sphinx/conf.py @@ -61,9 +61,9 @@ # built documents. # # The short X.Y version. -version = u'2024.07' +version = u'2025.03' # The full version, including alpha/beta/rc tags. -release = u'2024.07.0' +release = u'2025.03.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/sphinx/conf.py.in b/docs/sphinx/conf.py.in index 1c11e11e..639ca97b 100644 --- a/docs/sphinx/conf.py.in +++ b/docs/sphinx/conf.py.in @@ -60,9 +60,9 @@ author = u'' # built documents. # # The short X.Y version. -version = u'2024.07' +version = u'2025.03' # The full version, including alpha/beta/rc tags. -release = u'2024.07.0' +release = u'2025.03.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/scripts/make_release_tarball.sh b/scripts/make_release_tarball.sh index 06e05810..4c4f5018 100755 --- a/scripts/make_release_tarball.sh +++ b/scripts/make_release_tarball.sh @@ -7,7 +7,7 @@ ############################################################################## TAR_CMD=gtar -VERSION=2024.07.0 +VERSION=2025.03.0 git archive --prefix=chai-${VERSION}/ -o chai-${VERSION}.tar HEAD 2> /dev/null From 30c86b1d6a132489813fd68035be4a1743e12e3a Mon Sep 17 00:00:00 2001 From: Alan Dayton Date: Tue, 11 Mar 2025 14:41:05 -0700 Subject: [PATCH 20/24] Update to BLT v0.7.0 --- blt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blt b/blt index 9ff77344..fb4246b8 160000 --- a/blt +++ b/blt @@ -1 +1 @@ -Subproject commit 9ff77344f0b2a6ee345e452bddd6bfd46cbbfa35 +Subproject commit fb4246b8bae74c3d7291bef9698fd38863844680 From 58c1331f21421f3b82a5488f5059bd6b9c8db1e4 Mon Sep 17 00:00:00 2001 From: Alan Dayton Date: Tue, 18 Mar 2025 10:25:51 -0700 Subject: [PATCH 21/24] Update to RAJA v2025.03.0-RC --- src/tpl/raja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tpl/raja b/src/tpl/raja index 4d7fcba5..1d70abf1 160000 --- a/src/tpl/raja +++ b/src/tpl/raja @@ -1 +1 @@ -Subproject commit 4d7fcba55ebc7cb972b7cc9f6778b48e43792ea1 +Subproject commit 1d70abf171474d331f1409908bdf1b1c3fe19222 From 453488c75cdf90ff2801fba8c0610e38cff13b12 Mon Sep 17 00:00:00 2001 From: Alan Dayton Date: Tue, 18 Mar 2025 10:27:12 -0700 Subject: [PATCH 22/24] Update to Umpire v2025.03.0 --- src/tpl/umpire | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tpl/umpire b/src/tpl/umpire index abd729f4..1ed0669c 160000 --- a/src/tpl/umpire +++ b/src/tpl/umpire @@ -1 +1 @@ -Subproject commit abd729f40064175e999a83d11d6b073dac4c01d2 +Subproject commit 1ed0669c57f041baa1f1070693991c3a7a43e7ee From d75a0845df0a15c63932e8907622ca3cb2f4f6ae Mon Sep 17 00:00:00 2001 From: Alan Dayton Date: Tue, 18 Mar 2025 10:28:30 -0700 Subject: [PATCH 23/24] Update release date --- RELEASE_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 3b647cc7..ea58579f 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -13,7 +13,7 @@ in this file. The format of this file is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). -## [Version 2025.03.0] - Release date 2025-03-?? +## [Version 2025.03.0] - Release date 2025-03-18 ### Added - Added a ManagedArray::clone function and deprecated chai::deepCopy. From a433d27fe9891d1af6d6e8534a21e1d127435015 Mon Sep 17 00:00:00 2001 From: Alan Dayton Date: Wed, 19 Mar 2025 14:37:52 -0700 Subject: [PATCH 24/24] Update release date --- RELEASE_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index ea58579f..4bd2f58d 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -13,7 +13,7 @@ in this file. The format of this file is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). -## [Version 2025.03.0] - Release date 2025-03-18 +## [Version 2025.03.0] - Release date 2025-03-19 ### Added - Added a ManagedArray::clone function and deprecated chai::deepCopy.