Skip to content

Commit

Permalink
Try removing _kokkos_pgi_compiler_bug_workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
masterleinad committed Apr 6, 2023
1 parent 39c35a8 commit 29826df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
12 changes: 0 additions & 12 deletions core/src/impl/Kokkos_Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1253,15 +1253,3 @@ void Kokkos::print_configuration(std::ostream& os, bool verbose) {
bool Kokkos::show_warnings() noexcept { return g_show_warnings; }

bool Kokkos::tune_internals() noexcept { return g_tune_internals; }

namespace Kokkos {

#ifdef KOKKOS_COMPILER_NVHPC
namespace Impl {
// Bizzarely, an extra jump instruction forces the PGI compiler to not have a
// bug related to (probably?) empty base optimization and/or aggregate
// construction.
void _kokkos_pgi_compiler_bug_workaround() {}
} // end namespace Impl
#endif
} // namespace Kokkos
18 changes: 2 additions & 16 deletions core/src/impl/Kokkos_TaskNode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@
namespace Kokkos {
namespace Impl {

#ifdef KOKKOS_COMPILER_NVHPC
// Bizzarely, an extra jump instruction forces the PGI compiler to not have a
// bug related to (probably?) empty base optimization and/or aggregate
// construction. This must be defined out-of-line to generate a jump
// jump instruction
void _kokkos_pgi_compiler_bug_workaround();
#endif

enum TaskType : int16_t {
TaskTeam = 0,
TaskSingle = 1,
Expand Down Expand Up @@ -101,17 +93,11 @@ class ReferenceCountedBase {

public:
KOKKOS_INLINE_FUNCTION
#ifndef KOKKOS_COMPILER_NVHPC
constexpr
#endif
explicit ReferenceCountedBase(
reference_count_size_type initial_reference_count)
constexpr explicit ReferenceCountedBase(
reference_count_size_type initial_reference_count)
: m_ref_count(initial_reference_count) {
// This can't be here because it breaks constexpr
// KOKKOS_EXPECTS(initial_reference_count > 0);
#ifdef KOKKOS_COMPILER_NVHPC
Impl::_kokkos_pgi_compiler_bug_workaround();
#endif
}

/** Decrement the reference count,
Expand Down

0 comments on commit 29826df

Please sign in to comment.