Skip to content

Commit

Permalink
Merge branch 'task/rhornung67/split-azure-ghactions' of github.com:LL…
Browse files Browse the repository at this point in the history
…NL/RAJA into task/rhornung67/split-azure-ghactions
  • Loading branch information
rhornung67 committed Aug 14, 2024
2 parents c99b902 + 3e422bc commit 8e550ca
Show file tree
Hide file tree
Showing 12 changed files with 366 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ if (RAJA_ENABLE_CUDA)
message(STATUS "CUDA compute architecture set to RAJA default 35 since it was not specified")
set(CMAKE_CUDA_ARCHITECTURES "35" CACHE STRING "Set CMAKE_CUDA_ARCHITECTURES to RAJA minimum supported" FORCE)
endif()
message(STATUS "CMAKE_CUDA_ARCHITECTURES set to ${CMAKE_CUDA_ARCHITECTURES}")
message(STATUS "CMAKE_CUDA_ARCHITECTURES set to ${CMAKE_CUDA_ARCHITECTURES}")
if ( (CMAKE_CXX_COMPILER_ID MATCHES GNU) AND (CMAKE_SYSTEM_PROCESSOR MATCHES ppc64le) )
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
set (CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler -mno-float128")
Expand Down Expand Up @@ -221,6 +221,7 @@ if (RAJA_ENABLE_SYCL)
sycl)
endif ()


message(STATUS "Desul Atomics support is ${RAJA_ENABLE_DESUL_ATOMICS}")
if (RAJA_ENABLE_DESUL_ATOMICS)
# NOTE: ENABLE_OPENMP in Desul implies OpenMP OFFLOAD
Expand Down
4 changes: 4 additions & 0 deletions benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ if (RAJA_ENABLE_CUDA)
SOURCES host-device-lambda-benchmark.cpp)
endif()

raja_add_benchmark(
NAME benchmark-atomic
SOURCES benchmark-atomic.cpp)

raja_add_benchmark(
NAME ltimes
SOURCES ltimes.cpp)
346 changes: 346 additions & 0 deletions benchmark/benchmark-atomic.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/sphinx/user_guide/feature/policies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ GPU Policies for SYCL
x dimension for CUDA and HIP.

Similarly, ``RAJA::kernel`` uses a three-dimensional work-group
configuration. SYCL imension 2 always exists and should be used as
configuration. SYCL dimension 2 always exists and should be used as
one would use the x dimension in CUDA and HIP.

======================================== ============= ==============================
Expand Down
2 changes: 2 additions & 0 deletions examples/forall_multi-reductions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

#include "RAJA/RAJA.hpp"

#include "camp/tuple.hpp"

/*
* MultiReduction Example using RAJA forall
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ void ForallReduceBitAndBasicTestImpl(const SEG_TYPE& seg,

ASSERT_EQ(static_cast<DATA_TYPE>(simpand.get()), 5);

//

//
// And now a randomized test that pushes zeros around
//
//

const int modval = 100;

Expand All @@ -72,6 +72,7 @@ void ForallReduceBitAndBasicTestImpl(const SEG_TYPE& seg,
RAJA::forall<EXEC_POLICY>(seg,
RAJA::expt::Reduce<RAJA::operators::bit_and>(&redand),
RAJA::expt::Reduce<RAJA::operators::bit_and>(&redand2),
RAJA::expt::KernelName("RAJA Reduce BitAnd"),
[=] RAJA_HOST_DEVICE(IDX_TYPE idx, DATA_TYPE &r1, DATA_TYPE &r2) {
r1 &= working_array[idx];
r2 &= working_array[idx];
Expand All @@ -92,7 +93,7 @@ void ForallReduceBitAndBasicTestImpl(const SEG_TYPE& seg,
}

ASSERT_EQ(static_cast<DATA_TYPE>(redand), ref_and);


deallocateForallTestData<DATA_TYPE>(working_res,
working_array,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ void ForallReduceBitOrBasicTestImpl(const SEG_TYPE& seg,
RAJA::forall<EXEC_POLICY>(seg,
RAJA::expt::Reduce<RAJA::operators::bit_or>(&redor),
RAJA::expt::Reduce<RAJA::operators::bit_or>(&redor2),
RAJA::expt::KernelName("RAJA Reduce BitOr"),
[=] RAJA_HOST_DEVICE(IDX_TYPE idx, DATA_TYPE &r1, DATA_TYPE &r2) {
r1 |= working_array[idx];
r2 |= working_array[idx];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ void ForallReduceMaxBasicTestImpl(const SEG_TYPE& seg,
RAJA::forall<EXEC_POLICY>(seg,
RAJA::expt::Reduce<RAJA::operators::maximum>(&maxinit),
RAJA::expt::Reduce<RAJA::operators::maximum>(&max),
RAJA::expt::KernelName("RAJA Reduce Max"),
[=] RAJA_HOST_DEVICE(IDX_TYPE idx, DATA_TYPE &mi, DATA_TYPE &m) {
mi = RAJA_MAX(working_array[idx], mi);
m = RAJA_MAX(working_array[idx], m);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ void ForallReduceMaxLocBasicTestImpl(const SEG_TYPE& seg,
RAJA::forall<EXEC_POLICY>(seg,
RAJA::expt::Reduce<RAJA::operators::maximum>(&maxinit),
RAJA::expt::Reduce<RAJA::operators::maximum>(&max),
RAJA::expt::KernelName("RAJA Reduce MaxLoc"),
[=] RAJA_HOST_DEVICE(IDX_TYPE idx, VL_TYPE &mi, VL_TYPE &m) {
mi.max( working_array[idx], idx );
m.max( working_array[idx], idx );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ void ForallReduceMinBasicTestImpl(const SEG_TYPE& seg,
RAJA::forall<EXEC_POLICY>(seg,
RAJA::expt::Reduce<RAJA::operators::minimum>(&mininit),
RAJA::expt::Reduce<RAJA::operators::minimum>(&min),
RAJA::expt::KernelName("RAJA Reduce Min"),
[=] RAJA_HOST_DEVICE(IDX_TYPE idx, DATA_TYPE &mi, DATA_TYPE &m) {
mi = RAJA_MIN(working_array[idx], mi);
m = RAJA_MIN(working_array[idx], m);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ void ForallReduceMinLocBasicTestImpl(const SEG_TYPE& seg,
RAJA::forall<EXEC_POLICY>(seg,
RAJA::expt::Reduce<RAJA::operators::minimum>(&mininit),
RAJA::expt::Reduce<RAJA::operators::minimum>(&min),
RAJA::expt::KernelName("RAJA Reduce MinLoc"),
[=] RAJA_HOST_DEVICE(IDX_TYPE idx, VL_TYPE &mi, VL_TYPE &m) {
mi.min( working_array[idx], idx );
m.min( working_array[idx], idx );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ void ForallReduceSumBasicTestImpl(const SEG_TYPE& seg,
RAJA::forall<EXEC_POLICY>(seg,
RAJA::expt::Reduce<RAJA::operators::plus>(&sum),
RAJA::expt::Reduce<RAJA::operators::plus>(&sum2),
RAJA::expt::KernelName("RAJA Reduce Sum"),
[=] RAJA_HOST_DEVICE(IDX_TYPE idx, DATA_TYPE &s1, DATA_TYPE &s2) {
s1 += working_array[idx];
s2 += working_array[idx];
Expand Down

0 comments on commit 8e550ca

Please sign in to comment.