Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
d840b32
clean up pass
artv3 Apr 26, 2023
6b42a92
add sycl test
artv3 Apr 26, 2023
ef654cb
add sycl run-time exec policy test
artv3 Apr 26, 2023
af7636d
add launch reduce test
artv3 Apr 26, 2023
0a5d0e7
remove buffer
artv3 Apr 26, 2023
d6eb6df
add a couple more reduction tests for launch
artv3 Apr 26, 2023
8d61b5a
clean up pass on reduction tests
artv3 Apr 26, 2023
a308dcf
revert sycl guard
artv3 Apr 26, 2023
d43e2ec
release dynamic shared memory
artv3 May 2, 2023
a6bac18
add 3D thread team policies
artv3 May 5, 2023
6bbe4da
add nested loop tests
artv3 May 11, 2023
3b82b9e
fix gpu test
artv3 May 11, 2023
20ed6f4
add _loop and _direct nested tests
artv3 May 11, 2023
4dea0af
Merge branch 'develop' into artv3/more-launch-test
artv3 May 11, 2023
ef0256a
add nested tile functional tests
artv3 May 15, 2023
0417abe
add test for icount tile code
artv3 May 16, 2023
758accf
add itile_loop tests
artv3 May 16, 2023
29a8864
update camp
artv3 May 16, 2023
b43745b
rename files to _icount
artv3 May 16, 2023
7314416
clean up pass
artv3 May 16, 2023
1bf1f68
fix policy usage
artv3 May 16, 2023
ac5d065
fix policy ordering
artv3 May 17, 2023
90f488b
bug fix in omp tile_icount
artv3 May 17, 2023
8574480
tile_icount ->tile_tcount to be consistent with kernel
artv3 May 17, 2023
a4366a1
check output on 0 sized segments
artv3 May 19, 2023
cc00003
Merge branch 'develop' into artv3/more-launch-test
rhornung67 May 29, 2023
40de8bd
use same camp as develop
artv3 Jun 1, 2023
55b3989
Merge branch 'artv3/more-launch-test' of github.com:LLNL/RAJA into ar…
artv3 Jun 1, 2023
0f2862e
loop_ -> seq_
artv3 Jun 6, 2023
3aa5392
Update test/functional/launch/shared_mem/CMakeLists.txt
artv3 Jun 7, 2023
1d10c2a
TileICount->TileTCount
artv3 Jun 7, 2023
1ae9c1f
add missing sycl policies
artv3 Jun 7, 2023
a0ea172
Merge branch 'develop' into artv3/more-launch-test
rhornung67 Jun 8, 2023
dd39187
remove unessary strip index type calls
artv3 Jun 9, 2023
ae9592c
Merge branch 'develop' into artv3/more-launch-test
rhornung67 Jun 12, 2023
35b12bb
fix formatting
artv3 Jun 12, 2023
4c24f27
fix formatting and file name
artv3 Jun 12, 2023
0d0aba7
fix formatting on launch_direct_threads_3D_execpol.hpp
artv3 Jun 12, 2023
baaf718
clean up pass
artv3 Jun 12, 2023
820e6fd
clean up pass
artv3 Jun 12, 2023
fa8d602
rename files for consistency
artv3 Jun 12, 2023
34861dd
update include name
artv3 Jun 12, 2023
107c7ff
clean up pass
artv3 Jun 12, 2023
9acd8bf
renaming
artv3 Jun 12, 2023
5d94244
clean up pass
artv3 Jun 12, 2023
f0b312d
clean up formatting for readibility
artv3 Jun 12, 2023
8a4bf0d
clean up pass
artv3 Jun 12, 2023
12e520d
formatting pass
artv3 Jun 12, 2023
3710da0
commit clean up pass
artv3 Jun 12, 2023
8ba4a28
vertical alignment clean up pass
artv3 Jun 12, 2023
b1cbf48
add missing sycl policies + fix omp sycl policies
artv3 Jun 13, 2023
0fdb87f
Merge branch 'develop' into artv3/more-launch-test
artv3 Jun 14, 2023
96207ab
Merge branch 'develop' into artv3/more-launch-test
rhornung67 Jun 15, 2023
7d4f7c3
Merge branch 'develop' into artv3/more-launch-test
artv3 Jun 15, 2023
7ec690d
Merge branch 'develop' into artv3/more-launch-test
rhornung67 Jun 19, 2023
9d220b3
Merge branch 'develop' into artv3/more-launch-test
rhornung67 Jun 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/raja-launch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ int main(int RAJA_UNUSED_ARG(argc), char **RAJA_UNUSED_ARG(argv[]))

if (select_cpu_or_gpu == RAJA::ExecPlace::HOST){
std::cout << "\n Running upper triangular pattern example on the host...\n";
}else {
} else {
std::cout << "\n Running upper triangular pattern example on the device...\n";
}

Expand Down
2 changes: 1 addition & 1 deletion examples/resource-dynamic-forall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ int main(int argc, char *argv[])
RAJA::ExecPlace select_cpu_or_gpu;
if(pol < 2) {
select_cpu_or_gpu = RAJA::ExecPlace::HOST;
}else {
} else {
select_cpu_or_gpu = RAJA::ExecPlace::DEVICE;
}

Expand Down
14 changes: 7 additions & 7 deletions include/RAJA/pattern/launch/launch_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* \file
*
* \brief RAJA header file containing the core components of RAJA::Teams
* \brief RAJA header file containing the core components of RAJA::launch
*
******************************************************************************
*/
Expand Down Expand Up @@ -311,7 +311,7 @@ launch(RAJA::resources::Resource res, LaunchParams const &params, const char *ke
ExecPlace place;
if(res.get_platform() == RAJA::Platform::host) {
place = RAJA::ExecPlace::HOST;
}else{
} else {
place = RAJA::ExecPlace::DEVICE;
}

Expand Down Expand Up @@ -445,7 +445,7 @@ template <typename POLICY, typename SEGMENT>
struct TileExecute;

template <typename POLICY, typename SEGMENT>
struct TileICountExecute;
struct TileTCountExecute;

template <typename POLICY_LIST,
typename CONTEXT,
Expand All @@ -469,12 +469,12 @@ template <typename POLICY_LIST,
typename TILE_T,
typename SEGMENT,
typename BODY>
RAJA_HOST_DEVICE RAJA_INLINE void tile_icount(CONTEXT const &ctx,
RAJA_HOST_DEVICE RAJA_INLINE void tile_tcount(CONTEXT const &ctx,
TILE_T tile_size,
SEGMENT const &segment,
BODY const &body)
{
TileICountExecute<loop_policy<POLICY_LIST>, SEGMENT>::exec(ctx,
TileTCountExecute<loop_policy<POLICY_LIST>, SEGMENT>::exec(ctx,
tile_size,
segment,
body);
Expand Down Expand Up @@ -509,15 +509,15 @@ template <typename POLICY_LIST,
typename TILE_T,
typename SEGMENT,
typename BODY>
RAJA_HOST_DEVICE RAJA_INLINE void tile_icount(CONTEXT const &ctx,
RAJA_HOST_DEVICE RAJA_INLINE void tile_tcount(CONTEXT const &ctx,
TILE_T tile_size0,
TILE_T tile_size1,
SEGMENT const &segment0,
SEGMENT const &segment1,
BODY const &body)
{

TileICountExecute<loop_policy<POLICY_LIST>, SEGMENT>::exec(ctx,
TileTCountExecute<loop_policy<POLICY_LIST>, SEGMENT>::exec(ctx,
tile_size0,
tile_size1,
segment0,
Expand Down
8 changes: 4 additions & 4 deletions include/RAJA/policy/cuda/launch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ struct TileExecute<cuda_block_xyz_direct<DIM>, SEGMENT> {

//Tile execute + return index
template <typename SEGMENT, int DIM>
struct TileICountExecute<cuda_thread_xyz_loop<DIM>, SEGMENT> {
struct TileTCountExecute<cuda_thread_xyz_loop<DIM>, SEGMENT> {

template <typename TILE_T, typename BODY>
static RAJA_INLINE RAJA_DEVICE void exec(
Expand All @@ -980,7 +980,7 @@ struct TileICountExecute<cuda_thread_xyz_loop<DIM>, SEGMENT> {


template <typename SEGMENT, int DIM>
struct TileICountExecute<cuda_thread_xyz_direct<DIM>, SEGMENT> {
struct TileTCountExecute<cuda_thread_xyz_direct<DIM>, SEGMENT> {

template <typename TILE_T, typename BODY>
static RAJA_INLINE RAJA_DEVICE void exec(
Expand All @@ -1002,7 +1002,7 @@ struct TileICountExecute<cuda_thread_xyz_direct<DIM>, SEGMENT> {


template <typename SEGMENT, int DIM>
struct TileICountExecute<cuda_block_xyz_loop<DIM>, SEGMENT> {
struct TileTCountExecute<cuda_block_xyz_loop<DIM>, SEGMENT> {

template <typename TILE_T, typename BODY>
static RAJA_INLINE RAJA_DEVICE void exec(
Expand All @@ -1027,7 +1027,7 @@ struct TileICountExecute<cuda_block_xyz_loop<DIM>, SEGMENT> {


template <typename SEGMENT, int DIM>
struct TileICountExecute<cuda_block_xyz_direct<DIM>, SEGMENT> {
struct TileTCountExecute<cuda_block_xyz_direct<DIM>, SEGMENT> {

template <typename TILE_T, typename BODY>
static RAJA_INLINE RAJA_DEVICE void exec(
Expand Down
8 changes: 4 additions & 4 deletions include/RAJA/policy/hip/launch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ struct TileExecute<hip_block_xyz_direct<DIM>, SEGMENT> {

//Tile execute + return index
template <typename SEGMENT, int DIM>
struct TileICountExecute<hip_thread_xyz_loop<DIM>, SEGMENT> {
struct TileTCountExecute<hip_thread_xyz_loop<DIM>, SEGMENT> {

template <typename TILE_T, typename BODY>
static RAJA_INLINE RAJA_DEVICE void exec(
Expand All @@ -967,7 +967,7 @@ struct TileICountExecute<hip_thread_xyz_loop<DIM>, SEGMENT> {


template <typename SEGMENT, int DIM>
struct TileICountExecute<hip_thread_xyz_direct<DIM>, SEGMENT> {
struct TileTCountExecute<hip_thread_xyz_direct<DIM>, SEGMENT> {

template <typename TILE_T, typename BODY>
static RAJA_INLINE RAJA_DEVICE void exec(
Expand All @@ -989,7 +989,7 @@ struct TileICountExecute<hip_thread_xyz_direct<DIM>, SEGMENT> {


template <typename SEGMENT, int DIM>
struct TileICountExecute<hip_block_xyz_loop<DIM>, SEGMENT> {
struct TileTCountExecute<hip_block_xyz_loop<DIM>, SEGMENT> {

template <typename TILE_T, typename BODY>
static RAJA_INLINE RAJA_DEVICE void exec(
Expand All @@ -1014,7 +1014,7 @@ struct TileICountExecute<hip_block_xyz_loop<DIM>, SEGMENT> {


template <typename SEGMENT, int DIM>
struct TileICountExecute<hip_block_xyz_direct<DIM>, SEGMENT> {
struct TileTCountExecute<hip_block_xyz_direct<DIM>, SEGMENT> {

template <typename TILE_T, typename BODY>
static RAJA_INLINE RAJA_DEVICE void exec(
Expand Down
6 changes: 3 additions & 3 deletions include/RAJA/policy/openmp/launch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ struct TileExecute<omp_parallel_for_exec, SEGMENT> {
};

template <typename SEGMENT>
struct TileICountExecute<omp_parallel_for_exec, SEGMENT> {
struct TileTCountExecute<omp_parallel_for_exec, SEGMENT> {

template <typename BODY, typename TILE_T>
static RAJA_INLINE RAJA_HOST_DEVICE void exec(
Expand Down Expand Up @@ -470,7 +470,7 @@ struct TileExecute<omp_for_exec, SEGMENT> {
};

template <typename SEGMENT>
struct TileICountExecute<omp_for_exec, SEGMENT> {
struct TileTCountExecute<omp_for_exec, SEGMENT> {

template <typename BODY, typename TILE_T>
static RAJA_INLINE RAJA_HOST_DEVICE void exec(
Expand All @@ -486,7 +486,7 @@ struct TileICountExecute<omp_for_exec, SEGMENT> {
#pragma omp for
for (int i = 0; i < numTiles; i++) {
const int i_tile_size = i * tile_size;
body.get_priv()(segment.slice(i_tile_size, tile_size), i);
body(segment.slice(i_tile_size, tile_size), i);
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion include/RAJA/policy/sequential/launch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ struct TileExecute<seq_exec, SEGMENT> {
};

template <typename SEGMENT>
struct TileICountExecute<seq_exec, SEGMENT> {
struct TileTCountExecute<seq_exec, SEGMENT> {

template <typename TILE_T, typename BODY>
static RAJA_HOST_DEVICE RAJA_INLINE void exec(
Expand Down
8 changes: 4 additions & 4 deletions include/RAJA/policy/sycl/launch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ struct TileExecute<sycl_group_012_direct<DIM>, SEGMENT> {

//Tile execute + return index
template <typename SEGMENT, int DIM>
struct TileICountExecute<sycl_local_012_loop<DIM>, SEGMENT> {
struct TileTCountExecute<sycl_local_012_loop<DIM>, SEGMENT> {

template <typename TILE_T, typename BODY>
static RAJA_INLINE RAJA_DEVICE void exec(
Expand All @@ -975,7 +975,7 @@ struct TileICountExecute<sycl_local_012_loop<DIM>, SEGMENT> {


template <typename SEGMENT, int DIM>
struct TileICountExecute<sycl_local_012_direct<DIM>, SEGMENT> {
struct TileTCountExecute<sycl_local_012_direct<DIM>, SEGMENT> {

template <typename TILE_T, typename BODY>
static RAJA_INLINE RAJA_DEVICE void exec(
Expand All @@ -997,7 +997,7 @@ struct TileICountExecute<sycl_local_012_direct<DIM>, SEGMENT> {


template <typename SEGMENT, int DIM>
struct TileICountExecute<sycl_group_012_loop<DIM>, SEGMENT> {
struct TileTCountExecute<sycl_group_012_loop<DIM>, SEGMENT> {

template <typename TILE_T, typename BODY>
static RAJA_INLINE RAJA_DEVICE void exec(
Expand All @@ -1020,7 +1020,7 @@ struct TileICountExecute<sycl_group_012_loop<DIM>, SEGMENT> {


template <typename SEGMENT, int DIM>
struct TileICountExecute<sycl_group_012_direct<DIM>, SEGMENT> {
struct TileTCountExecute<sycl_group_012_direct<DIM>, SEGMENT> {

template <typename TILE_T, typename BODY>
static RAJA_INLINE RAJA_DEVICE void exec(
Expand Down
19 changes: 19 additions & 0 deletions test/functional/launch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,29 @@ if(RAJA_ENABLE_HIP)
list(APPEND LAUNCH_BACKENDS Hip)
endif()

if(RAJA_ENABLE_SYCL)
list(APPEND LAUNCH_BACKENDS Sycl)
endif()

add_subdirectory(run-time-switch)

#Adapted from forall test
add_subdirectory(reduce-basic)

add_subdirectory(segment)

add_subdirectory(shared_mem)

add_subdirectory(nested_loop)

add_subdirectory(nested_direct)

add_subdirectory(tile_icount_direct)

add_subdirectory(tile_icount_loop)

add_subdirectory(nested_tile_direct)

add_subdirectory(nested_tile_loop)

unset( LAUNCH_BACKENDS )
30 changes: 30 additions & 0 deletions test/functional/launch/nested_direct/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
###############################################################################
# Copyright (c) 2016-23, Lawrence Livermore National Security, LLC
# and RAJA project contributors. See the RAJA/LICENSE file for details.
#
# SPDX-License-Identifier: (BSD-3-Clause)
###############################################################################

#
# List of segment types for generating test files.
#
set(NESTEDTYPES Direct)

#
# Generate tests for each enabled RAJA back-end.
#
#

foreach( BACKEND ${LAUNCH_BACKENDS} )
foreach( NESTEDTYPES ${NESTEDTYPES} )
configure_file( test-launch-nested.cpp.in
test-launch-nested-${NESTEDTYPES}-${BACKEND}.cpp )
raja_add_test( NAME test-launch-nested-${NESTEDTYPES}-${BACKEND}
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/test-launch-nested-${NESTEDTYPES}-${BACKEND}.cpp )

target_include_directories(test-launch-nested-${NESTEDTYPES}-${BACKEND}.exe
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
endforeach()
endforeach()

unset( NESTEDTYPES )
39 changes: 39 additions & 0 deletions test/functional/launch/nested_direct/test-launch-nested.cpp.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
// Copyright (c) 2016-23, Lawrence Livermore National Security, LLC
// and RAJA project contributors. See the RAJA/LICENSE file for details.
//
// SPDX-License-Identifier: (BSD-3-Clause)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

//
// test/include headers
//
#include "RAJA_test-base.hpp"
#include "RAJA_test-camp.hpp"
#include "RAJA_test-index-types.hpp"

#include "RAJA_test-forall-data.hpp"
#include "RAJA_test-launch-direct-teams-threads-3D-execpol.hpp"

//
// Header for tests in ./tests directory
//
// Note: CMake adds ./tests as an include dir for these tests.
//
#include "test-launch-nested-@[email protected]"


//
// Cartesian product of types used in parameterized tests
//
using @BACKEND@LaunchNestedTypes =
Test< camp::cartesian_product<IdxTypeList,
@BACKEND@ResourceList,
@BACKEND@_launch_policies>>::Types;

//
// Instantiate parameterized test
//
INSTANTIATE_TYPED_TEST_SUITE_P(@BACKEND@,
LaunchNested@NESTEDTYPES@Test,
@BACKEND@LaunchNestedTypes);
Loading