Skip to content

Commit ab0d302

Browse files
authored
0.2.0 release (#231)
* Added Spack config for Summit. * Added allocator construction to ChaiBuffer and buffer construction to Array. * Added half precision math functions. * Updated RAJA to 0.13.0 * Added type conversion to ArrayView. * Improved CUDA error macro messages. * Added memcpy and memset functions. * Use camp Platform for MemorySpace. * Copyright update. * Spack and release changes. * Removed need for matrix output macro. * Memcpy changes. * Uncrustify changes. * Removed constexpr from math functions. * Changes for CUDA 11. * Updated release date.
1 parent c0af7bf commit ab0d302

217 files changed

Lines changed: 4143 additions & 863 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
###################################################################################################
2+
# Copyright (c) 2021, Lawrence Livermore National Security, LLC and LvArray contributors.
3+
# All rights reserved.
4+
# See the LICENSE file for details.
5+
# SPDX-License-Identifier: (BSD-3-Clause)
6+
###################################################################################################
7+
18
cmake_minimum_required( VERSION 3.9 )
29

310
# Set version number
411
set( LVARRAY_VERSION_MAJOR 0 )
5-
set( LVARRAY_VERSION_MINOR 1 )
12+
set( LVARRAY_VERSION_MINOR 2 )
613
set( LVARRAY_VERSION_PATCHLEVEL 0 )
714

815
# check if LvArray is build as a submodule or a separate project
@@ -32,33 +39,49 @@ if( NOT is_submodule )
3239
option( ENABLE_CHAI "Build with CHAI" OFF )
3340
option( ENABLE_CALIPER "Build with Caliper" OFF )
3441

35-
include( cmake/blt/SetupBLT.cmake )
42+
if( NOT BLT_LOADED )
43+
if( DEFINED BLT_SOURCE_DIR )
44+
if( NOT EXISTS ${BLT_SOURCE_DIR}/SetupBLT.cmake )
45+
message( FATAL_ERROR "Given BLT_SOURCE_DIR does not contain SetupBLT.cmake" )
46+
endif()
47+
else ()
48+
set( BLT_SOURCE_DIR ${PROJECT_SOURCE_DIR}/cmake/blt CACHE PATH "" )
49+
50+
if( NOT EXISTS ${BLT_SOURCE_DIR}/SetupBLT.cmake )
51+
message( FATAL_ERROR "The BLT submodule is not present. If in git repository run the following two commands:\n \
52+
git submodule init\n \
53+
git submodule update" )
54+
endif ()
55+
endif ()
56+
57+
include( ${BLT_SOURCE_DIR}/SetupBLT.cmake )
58+
endif()
59+
3660
include( cmake/CMakeBasics.cmake )
3761
include( cmake/SetupTPL.cmake )
3862
else()
63+
if( NOT BLT_LOADED )
64+
message( FATAL_ERROR "When using LvArray as a submodule you must have already loaded BLT." )
65+
endif()
66+
3967
include( cmake/CMakeBasics.cmake )
4068
endif()
4169

42-
include(cmake/Macros.cmake)
43-
include(cmake/Config.cmake)
70+
include( cmake/Macros.cmake )
71+
include( cmake/Config.cmake )
4472

4573
set( lvarray_dependencies dl )
4674

47-
if( ENABLE_CHAI )
48-
set( lvarray_dependencies ${lvarray_dependencies} chai umpire )
49-
endif()
75+
blt_list_append( TO lvarray_dependencies ELEMENTS camp RAJA )
5076

51-
if( ENABLE_CUDA )
52-
set( lvarray_dependencies ${lvarray_dependencies} cuda )
53-
endif()
77+
blt_list_append( TO lvarray_dependencies ELEMENTS umpire IF ENABLE_UMPIRE )
5478

55-
if( ENABLE_RAJA )
56-
set( lvarray_dependencies ${lvarray_dependencies} RAJA )
57-
endif()
79+
blt_list_append( TO lvarray_dependencies ELEMENTS chai IF ENABLE_CHAI )
80+
81+
blt_list_append( TO lvarray_dependencies ELEMENTS cuda IF ENABLE_CUDA )
82+
83+
blt_list_append( TO lvarray_dependencies ELEMENTS caliper IF ENABLE_CALIPER )
5884

59-
if( ENABLE_CALIPER )
60-
set( lvarray_dependencies ${lvarray_dependencies} caliper )
61-
endif()
6285

6386
add_subdirectory( src )
6487

RELEASE_NOTES.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,33 @@ Version vxx.yy.zz -- Release date 20yy-mm-dd
22
============================================
33

44
* New features:
5-
* Added various tensorOps functions.
6-
* Added a Python interface to most container classes.
5+
6+
* API Changes:
7+
8+
* Build changes/improvements:
9+
10+
* Bug fixes:
11+
12+
Version v0.2.0 -- Release date 2020-05-05
13+
============================================
14+
15+
* New features:
16+
* Various tensorOps functions.
17+
* A Python library with interfaces to most container classes.
18+
* Can create an `Array` that begins life on the device.
19+
* Can create an `Array` with specific Umpire allocators.
20+
* Math functions for CUDA's `__half` and `__half2`.
21+
* Better CUDA error messages.
22+
* Added in wrappers around Umpire's `memcpy` and `memset`.
723

824
* API Changes:
925
* You will now get a compilation error when performing certain undefined operations on rvalues, for example calling `toView` on an `Array` rvalue.
26+
* Now use `camp::resources::Platform` for `MemorySpace`.
1027

1128
* Build changes/improvements:
29+
* config-build.py works with Python3.
30+
* Support for object libraries via the CMake variable `LVARRAY_BUILD_OBJ_LIBS`.
31+
* Support for RAJA 0.13.
1232

1333
* Bug fixes:
1434
* Fixed an indexing bug that produced a compilation error with GCC 10.

benchmarks/CMakeLists.txt

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
1+
###################################################################################################
2+
# Copyright (c) 2021, Lawrence Livermore National Security, LLC and LvArray contributors.
3+
# All rights reserved.
4+
# See the LICENSE file for details.
5+
# SPDX-License-Identifier: (BSD-3-Clause)
6+
###################################################################################################
7+
18
#
2-
# Specify list of tests
9+
# Specify list of benchmarks
310
#
4-
set(benchmarkSources
5-
benchmarkReduce.cpp
6-
benchmarkInnerProduct.cpp
7-
benchmarkOuterProduct.cpp
8-
benchmarkMatrixVector.cpp
9-
benchmarkMatrixMatrix.cpp
10-
benchmarkArray1DR2TensorMultiplication.cpp
11-
benchmarkSparsityGeneration.cpp
12-
benchmarkArrayOfArraysReduce.cpp
13-
benchmarkArrayOfArraysNodeToElementMapConstruction.cpp
14-
benchmarkEigendecomposition.cpp
11+
set( benchmarkSources
12+
benchmarkReduce.cpp
13+
benchmarkInnerProduct.cpp
14+
benchmarkOuterProduct.cpp
15+
benchmarkMatrixVector.cpp
16+
benchmarkMatrixMatrix.cpp
17+
benchmarkArray1DR2TensorMultiplication.cpp
18+
benchmarkSparsityGeneration.cpp
19+
benchmarkArrayOfArraysReduce.cpp
20+
benchmarkArrayOfArraysNodeToElementMapConstruction.cpp
21+
benchmarkEigendecomposition.cpp
1522
)
1623

17-
if (NOT ${ENABLE_BENCHMARKS})
24+
if( NOT ${ENABLE_BENCHMARKS} )
1825
message(FATAL_ERROR "Benchmarks not enabled!")
1926
endif()
2027

2128
#
22-
# Add gtest C++ based tests
29+
# Add benchmarks
2330
#
24-
foreach(benchmark ${benchmarkSources})
31+
foreach( benchmark ${benchmarkSources} )
2532
get_filename_component( benchmark_name ${benchmark} NAME_WE )
2633
blt_add_executable( NAME ${benchmark_name}
2734
SOURCES ${benchmark} ${benchmark_name}Kernels.cpp
@@ -33,10 +40,10 @@ foreach(benchmark ${benchmarkSources})
3340
# blt_add_target_compile_flags( TO ${benchmark_name}
3441
# FLAGS -fsave-optimization-record )
3542

36-
blt_add_benchmark(NAME ${benchmark_name}
37-
COMMAND ${benchmark_name})
43+
blt_add_benchmark( NAME ${benchmark_name}
44+
COMMAND ${benchmark_name} )
3845

39-
install(TARGETS ${benchmark_name}
40-
DESTINATION bin)
46+
install( TARGETS ${benchmark_name}
47+
DESTINATION bin )
4148

4249
endforeach()

benchmarks/benchmarkArray1DR2TensorMultiplication.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, Lawrence Livermore National Security, LLC and LvArray contributors.
2+
* Copyright (c) 2021, Lawrence Livermore National Security, LLC and LvArray contributors.
33
* All rights reserved.
44
* See the LICENSE file for details.
55
* SPDX-License-Identifier: (BSD-3-Clause)

benchmarks/benchmarkArray1DR2TensorMultiplicationKernels.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, Lawrence Livermore National Security, LLC and LvArray contributors.
2+
* Copyright (c) 2021, Lawrence Livermore National Security, LLC and LvArray contributors.
33
* All rights reserved.
44
* See the LICENSE file for details.
55
* SPDX-License-Identifier: (BSD-3-Clause)
@@ -156,7 +156,7 @@ void ArrayOfR2TensorsNative< PERMUTATION >::
156156
RAJAViewKernel( RajaView< VALUE_TYPE const, PERMUTATION > const & a,
157157
RajaView< VALUE_TYPE const, PERMUTATION > const & b,
158158
RajaView< VALUE_TYPE, PERMUTATION > const & c )
159-
{ KERNEL( a.layout.sizes[ 0 ], a( i, j, l ), b( i, l, k ), c( i, j, k ) ); }
159+
{ KERNEL( getRAJAViewLayout( a ).sizes[ 0 ], a( i, j, l ), b( i, l, k ), c( i, j, k ) ); }
160160

161161
template<>
162162
void ArrayOfR2TensorsNative< RAJA::PERM_IJK >::
@@ -245,7 +245,7 @@ void ArrayOfR2TensorsRAJA< PERMUTATION, POLICY >::
245245
RAJAViewKernel( RajaView< VALUE_TYPE const, PERMUTATION > const & a,
246246
RajaView< VALUE_TYPE const, PERMUTATION > const & b,
247247
RajaView< VALUE_TYPE, PERMUTATION > const & c )
248-
{ RAJA_KERNEL( a.layout.sizes[ 0 ], a( i, j, l ), b( i, l, k ), c( i, j, k ) ); }
248+
{ RAJA_KERNEL( getRAJAViewLayout( a ).sizes[ 0 ], a( i, j, l ), b( i, l, k ), c( i, j, k ) ); }
249249

250250
template< typename POLICY >
251251
void pointerRajaHelper( RAJA::PERM_IJK,

benchmarks/benchmarkArray1DR2TensorMultiplicationKernels.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, Lawrence Livermore National Security, LLC and LvArray contributors.
2+
* Copyright (c) 2021, Lawrence Livermore National Security, LLC and LvArray contributors.
33
* All rights reserved.
44
* See the LICENSE file for details.
55
* SPDX-License-Identifier: (BSD-3-Clause)
@@ -240,7 +240,7 @@ class ArrayOfR2TensorsRAJA : private ArrayOfR2TensorsNative< PERMUTATION >
240240
}
241241

242242
~ArrayOfR2TensorsRAJA()
243-
{ this->m_c.move( MemorySpace::CPU ); }
243+
{ this->m_c.move( MemorySpace::host ); }
244244

245245
void fortranView() const
246246
{

benchmarks/benchmarkArrayOfArraysNodeToElementMapConstruction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, Lawrence Livermore National Security, LLC and LvArray contributors.
2+
* Copyright (c) 2021, Lawrence Livermore National Security, LLC and LvArray contributors.
33
* All rights reserved.
44
* See the LICENSE file for details.
55
* SPDX-License-Identifier: (BSD-3-Clause)

benchmarks/benchmarkArrayOfArraysNodeToElementMapConstructionKernels.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, Lawrence Livermore National Security, LLC and LvArray contributors.
2+
* Copyright (c) 2021, Lawrence Livermore National Security, LLC and LvArray contributors.
33
* All rights reserved.
44
* See the LICENSE file for details.
55
* SPDX-License-Identifier: (BSD-3-Clause)

benchmarks/benchmarkArrayOfArraysNodeToElementMapConstructionKernels.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, Lawrence Livermore National Security, LLC and LvArray contributors.
2+
* Copyright (c) 2021, Lawrence Livermore National Security, LLC and LvArray contributors.
33
* All rights reserved.
44
* See the LICENSE file for details.
55
* SPDX-License-Identifier: (BSD-3-Clause)

benchmarks/benchmarkArrayOfArraysReduce.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, Lawrence Livermore National Security, LLC and LvArray contributors.
2+
* Copyright (c) 2021, Lawrence Livermore National Security, LLC and LvArray contributors.
33
* All rights reserved.
44
* See the LICENSE file for details.
55
* SPDX-License-Identifier: (BSD-3-Clause)

0 commit comments

Comments
 (0)