Skip to content

Commit

Permalink
NVHPC 23.7 update: address reviewer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
crtrott committed Aug 25, 2023
1 parent cc278c4 commit 7a8f553
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 43 deletions.
8 changes: 6 additions & 2 deletions algorithms/src/sorting/Kokkos_BinSortPublicAPI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@ class BinSort {
Kokkos::is_view<SrcViewType>::value,
Kokkos::View<typename SrcViewType::const_data_type,
typename SrcViewType::array_layout,
typename SrcViewType::device_type,
Kokkos::MemoryTraits<Kokkos::RandomAccess> >,
typename SrcViewType::device_type
#if !defined(KOKKOS_COMPILER_NVHPC) || (KOKKOS_COMPILER_NVHPC >= 230700)
,
Kokkos::MemoryTraits<Kokkos::RandomAccess>
#endif
>,
typename SrcViewType::const_type>;

using perm_view_type = typename PermuteViewType::const_type;
Expand Down
8 changes: 6 additions & 2 deletions core/src/impl/Kokkos_HostThreadTeam.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ class HostThreadTeamData {

//----------------------------------------

constexpr HostThreadTeamData() noexcept
#if !defined(KOKKOS_COMPILER_NVHPC) || (KOKKOS_COMPILER_NVHPC >= 230700)
constexpr
#endif
HostThreadTeamData() noexcept
: m_work_range(-1, -1),
m_work_end(0),
m_scratch(nullptr),
Expand All @@ -176,7 +179,8 @@ class HostThreadTeamData {
m_work_chunk(0),
m_steal_rank(0),
m_pool_rendezvous_step(0),
m_team_rendezvous_step(0) {}
m_team_rendezvous_step(0) {
}

//----------------------------------------
// Organize array of members into a pool.
Expand Down
39 changes: 22 additions & 17 deletions core/unit_test/TestLocalDeepCopy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -906,12 +906,13 @@ void impl_test_local_deepcopy_rangepolicy_rank_7(const int N) {

#if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA)
TEST(TEST_CATEGORY, local_deepcopy_teampolicy_layoutleft) {
#ifdef KOKKOS_COMPILER_NVHPC // FIXME_NVHPC 23.7
GTEST_SKIP() << "FIXME_NVHPC (?)";
#endif

using ExecSpace = TEST_EXECSPACE;
using ViewType = Kokkos::View<double********, Kokkos::LayoutLeft, ExecSpace>;
#if defined(KOKKOS_ENABLE_CUDA) && \
defined(KOKKOS_COMPILER_NVHPC) // FIXME_NVHPC 23.7
if (std::is_same_v<ExecSpace, Kokkos::Cuda>)
GTEST_SKIP() << "FIXME_NVHPC (?)";
#endif
using ViewType = Kokkos::View<double********, Kokkos::LayoutLeft, ExecSpace>;

{ // Rank-1
impl_test_local_deepcopy_teampolicy_rank_1<ExecSpace, ViewType>(8);
Expand All @@ -937,12 +938,13 @@ TEST(TEST_CATEGORY, local_deepcopy_teampolicy_layoutleft) {
}
//-------------------------------------------------------------------------------------------------------------
TEST(TEST_CATEGORY, local_deepcopy_rangepolicy_layoutleft) {
#ifdef KOKKOS_COMPILER_NVHPC // FIXME_NVHPC 23.7
GTEST_SKIP() << "FIXME_NVHPC (?)";
#endif

using ExecSpace = TEST_EXECSPACE;
using ViewType = Kokkos::View<double********, Kokkos::LayoutLeft, ExecSpace>;
#if defined(KOKKOS_ENABLE_CUDA) && \
defined(KOKKOS_COMPILER_NVHPC) // FIXME_NVHPC 23.7
if (std::is_same_v<ExecSpace, Kokkos::Cuda>)
GTEST_SKIP() << "FIXME_NVHPC (?)";
#endif
using ViewType = Kokkos::View<double********, Kokkos::LayoutLeft, ExecSpace>;

{ // Rank-1
impl_test_local_deepcopy_rangepolicy_rank_1<ExecSpace, ViewType>(8);
Expand All @@ -968,11 +970,12 @@ TEST(TEST_CATEGORY, local_deepcopy_rangepolicy_layoutleft) {
}
//-------------------------------------------------------------------------------------------------------------
TEST(TEST_CATEGORY, local_deepcopy_teampolicy_layoutright) {
#ifdef KOKKOS_COMPILER_NVHPC // FIXME_NVHPC 23.7
GTEST_SKIP() << "FIXME_NVHPC (?)";
#endif

using ExecSpace = TEST_EXECSPACE;
#if defined(KOKKOS_ENABLE_CUDA) && \
defined(KOKKOS_COMPILER_NVHPC) // FIXME_NVHPC 23.7
if (std::is_same_v<ExecSpace, Kokkos::Cuda>)
GTEST_SKIP() << "FIXME_NVHPC (?)";
#endif
using ViewType = Kokkos::View<double********, Kokkos::LayoutRight, ExecSpace>;

{ // Rank-1
Expand All @@ -999,11 +1002,13 @@ TEST(TEST_CATEGORY, local_deepcopy_teampolicy_layoutright) {
}
//-------------------------------------------------------------------------------------------------------------
TEST(TEST_CATEGORY, local_deepcopy_rangepolicy_layoutright) {
#ifdef KOKKOS_COMPILER_NVHPC // FIXME_NVHPC 23.7
GTEST_SKIP() << "FIXME_NVHPC (?)";
using ExecSpace = TEST_EXECSPACE;
#if defined(KOKKOS_ENABLE_CUDA) && \
defined(KOKKOS_COMPILER_NVHPC) // FIXME_NVHPC 23.7
if (std::is_same_v<ExecSpace, Kokkos::Cuda>)
GTEST_SKIP() << "FIXME_NVHPC (?)";
#endif

using ExecSpace = TEST_EXECSPACE;
using ViewType = Kokkos::View<double********, Kokkos::LayoutRight, ExecSpace>;

{ // Rank-1
Expand Down
48 changes: 26 additions & 22 deletions core/unit_test/TestNumericTraits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ struct extrema {
DEFINE_EXTREMA(float, -FLT_MAX, FLT_MAX);
DEFINE_EXTREMA(double, -DBL_MAX, DBL_MAX);

// FIXME_NVHPC: with 23.3 using long double in KOKKOS_FUNCTION is hard error
#if !defined(KOKKOS_ENABLE_CUDA) || \
!defined(KOKKOS_COMPILER_NVHPC) // 23.7 long double
DEFINE_EXTREMA(long double, -LDBL_MAX, LDBL_MAX);
Expand Down Expand Up @@ -208,7 +207,8 @@ TEST(TEST_CATEGORY, numeric_traits_infinity) {
TestNumericTraits<TEST_EXECSPACE, float, Infinity>();
TestNumericTraits<TEST_EXECSPACE, double, Infinity>();
// FIXME_NVHPC long double not supported
#ifndef KOKKOS_COMPILER_NVHPC // 23.7 long double
#if !defined(KOKKOS_ENABLE_CUDA) || \
!defined(KOKKOS_COMPILER_NVHPC) // 23.7 long double
TestNumericTraits<TEST_EXECSPACE, long double, Infinity>();
#endif
}
Expand All @@ -217,7 +217,8 @@ TEST(TEST_CATEGORY, numeric_traits_epsilon) {
TestNumericTraits<TEST_EXECSPACE, float, Epsilon>();
TestNumericTraits<TEST_EXECSPACE, double, Epsilon>();
// FIXME_NVHPC long double not supported
#ifndef KOKKOS_COMPILER_NVHPC // 23.7 long double:
#if !defined(KOKKOS_ENABLE_CUDA) || \
!defined(KOKKOS_COMPILER_NVHPC) // 23.7 long double:
TestNumericTraits<TEST_EXECSPACE, long double, Epsilon>();
#endif
}
Expand All @@ -226,7 +227,8 @@ TEST(TEST_CATEGORY, numeric_traits_round_error) {
TestNumericTraits<TEST_EXECSPACE, float, RoundError>();
TestNumericTraits<TEST_EXECSPACE, double, RoundError>();
// FIXME_NVHPC long double not supported
#ifndef KOKKOS_COMPILER_NVHPC // 23.7 long double:
#if !defined(KOKKOS_ENABLE_CUDA) || \
!defined(KOKKOS_COMPILER_NVHPC) // 23.7 long double:
TestNumericTraits<TEST_EXECSPACE, long double, RoundError>();
#endif
}
Expand All @@ -235,7 +237,8 @@ TEST(TEST_CATEGORY, numeric_traits_norm_min) {
TestNumericTraits<TEST_EXECSPACE, float, NormMin>();
TestNumericTraits<TEST_EXECSPACE, double, NormMin>();
// FIXME_NVHPC long double not supported
#ifndef KOKKOS_COMPILER_NVHPC // 23.7 long double:
#if !defined(KOKKOS_ENABLE_CUDA) || \
!defined(KOKKOS_COMPILER_NVHPC) // 23.7 long double:
TestNumericTraits<TEST_EXECSPACE, long double, NormMin>();
#endif
}
Expand All @@ -244,7 +247,8 @@ TEST(TEST_CATEGORY, numeric_traits_denorm_min) {
TestNumericTraits<TEST_EXECSPACE, float, DenormMin>();
TestNumericTraits<TEST_EXECSPACE, double, DenormMin>();
// FIXME_NVHPC long double not supported
#ifndef KOKKOS_COMPILER_NVHPC // 23.7 long double:
#if !defined(KOKKOS_ENABLE_CUDA) || \
!defined(KOKKOS_COMPILER_NVHPC) // 23.7 long double:
TestNumericTraits<TEST_EXECSPACE, long double, DenormMin>();
#endif
}
Expand Down Expand Up @@ -281,8 +285,8 @@ TEST(TEST_CATEGORY, numeric_traits_finite_min_max) {
TestNumericTraits<TEST_EXECSPACE, float, FiniteMax>();
TestNumericTraits<TEST_EXECSPACE, double, FiniteMin>();
TestNumericTraits<TEST_EXECSPACE, double, FiniteMax>();
// FIXME_NVHPC long double not supported
#ifndef KOKKOS_COMPILER_NVHPC // 23.7 long double:
#if !defined(KOKKOS_ENABLE_CUDA) || \
!defined(KOKKOS_COMPILER_NVHPC) // 23.7 long double:
TestNumericTraits<TEST_EXECSPACE, long double, FiniteMin>();
TestNumericTraits<TEST_EXECSPACE, long double, FiniteMax>();
#endif
Expand All @@ -303,8 +307,8 @@ TEST(TEST_CATEGORY, numeric_traits_digits) {
TestNumericTraits<TEST_EXECSPACE, unsigned long long int, Digits>();
TestNumericTraits<TEST_EXECSPACE, float, Digits>();
TestNumericTraits<TEST_EXECSPACE, double, Digits>();
// FIXME_NVHPC long double not supported
#ifndef KOKKOS_COMPILER_NVHPC // 23.7 long double:
#if !defined(KOKKOS_ENABLE_CUDA) || \
!defined(KOKKOS_COMPILER_NVHPC) // 23.7 long double:
TestNumericTraits<TEST_EXECSPACE, long double, Digits>();
#endif
}
Expand All @@ -324,17 +328,17 @@ TEST(TEST_CATEGORY, numeric_traits_digits10) {
TestNumericTraits<TEST_EXECSPACE, unsigned long long int, Digits10>();
TestNumericTraits<TEST_EXECSPACE, float, Digits10>();
TestNumericTraits<TEST_EXECSPACE, double, Digits10>();
// FIXME_NVHPC long double not supported
#ifndef KOKKOS_COMPILER_NVHPC // 23.7 long double:
#if !defined(KOKKOS_ENABLE_CUDA) || \
!defined(KOKKOS_COMPILER_NVHPC) // 23.7 long double:
TestNumericTraits<TEST_EXECSPACE, long double, Digits10>();
#endif
}

TEST(TEST_CATEGORY, numeric_traits_max_digits10) {
TestNumericTraits<TEST_EXECSPACE, float, MaxDigits10>();
TestNumericTraits<TEST_EXECSPACE, double, MaxDigits10>();
// FIXME_NVHPC long double not supported
#ifndef KOKKOS_COMPILER_NVHPC // 23.7 long double:
#if !defined(KOKKOS_ENABLE_CUDA) || \
!defined(KOKKOS_COMPILER_NVHPC) // 23.7 long double:
TestNumericTraits<TEST_EXECSPACE, long double, MaxDigits10>();
#endif
}
Expand All @@ -353,8 +357,8 @@ TEST(TEST_CATEGORY, numeric_traits_radix) {
TestNumericTraits<TEST_EXECSPACE, unsigned long long int, Radix>();
TestNumericTraits<TEST_EXECSPACE, float, Radix>();
TestNumericTraits<TEST_EXECSPACE, double, Radix>();
// FIXME_NVHPC long double not supported
#ifndef KOKKOS_COMPILER_NVHPC // 23.7 long double:
#if !defined(KOKKOS_ENABLE_CUDA) || \
!defined(KOKKOS_COMPILER_NVHPC) // 23.7 long double:
TestNumericTraits<TEST_EXECSPACE, long double, Radix>();
#endif
}
Expand All @@ -364,8 +368,8 @@ TEST(TEST_CATEGORY, numeric_traits_min_max_exponent) {
TestNumericTraits<TEST_EXECSPACE, float, MaxExponent>();
TestNumericTraits<TEST_EXECSPACE, double, MinExponent>();
TestNumericTraits<TEST_EXECSPACE, double, MaxExponent>();
// FIXME_NVHPC long double not supported
#ifndef KOKKOS_COMPILER_NVHPC // 23.7 long double:
#if !defined(KOKKOS_ENABLE_CUDA) || \
!defined(KOKKOS_COMPILER_NVHPC) // 23.7 long double:
TestNumericTraits<TEST_EXECSPACE, long double, MinExponent>();
TestNumericTraits<TEST_EXECSPACE, long double, MaxExponent>();
#endif
Expand All @@ -376,8 +380,8 @@ TEST(TEST_CATEGORY, numeric_traits_min_max_exponent10) {
TestNumericTraits<TEST_EXECSPACE, float, MaxExponent10>();
TestNumericTraits<TEST_EXECSPACE, double, MinExponent10>();
TestNumericTraits<TEST_EXECSPACE, double, MaxExponent10>();
// FIXME_NVHPC long double not supported
#ifndef KOKKOS_COMPILER_NVHPC // 23.7 long double:
#if !defined(KOKKOS_ENABLE_CUDA) || \
!defined(KOKKOS_COMPILER_NVHPC) // 23.7 long double:
TestNumericTraits<TEST_EXECSPACE, long double, MinExponent10>();
TestNumericTraits<TEST_EXECSPACE, long double, MaxExponent10>();
#endif
Expand All @@ -387,8 +391,8 @@ TEST(TEST_CATEGORY, numeric_traits_quiet_and_signaling_nan) {
TestNumericTraits<TEST_EXECSPACE, float, SignalingNaN>();
TestNumericTraits<TEST_EXECSPACE, double, QuietNaN>();
TestNumericTraits<TEST_EXECSPACE, double, SignalingNaN>();
// FIXME_NVHPC long double not supported
#ifndef KOKKOS_COMPILER_NVHPC // 23.7 long double:
#if !defined(KOKKOS_ENABLE_CUDA) || \
!defined(KOKKOS_COMPILER_NVHPC) // 23.7 long double:
TestNumericTraits<TEST_EXECSPACE, long double, QuietNaN>();
TestNumericTraits<TEST_EXECSPACE, long double, SignalingNaN>();
#endif
Expand Down

0 comments on commit 7a8f553

Please sign in to comment.