Skip to content

Commit

Permalink
Fix atomic accessor for pre-volta GPU architectures (kokkos#7189)
Browse files Browse the repository at this point in the history
* Make sure to include Desul atomics configuration helper

* Revert "Make sure to include Desul atomics configuration helper"

This reverts commit 23f97b2.

* Include Desul atomics config from Kokkos_Macros.hpp
  • Loading branch information
dalg24 authored Aug 2, 2024
1 parent f96d5b5 commit 86a3ab6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
1 change: 0 additions & 1 deletion core/src/Kokkos_Atomics_Desul_Volatile_Wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ static_assert(false,
#ifndef KOKKOS_DESUL_ATOMICS_VOLATILE_WRAPPER_HPP_
#define KOKKOS_DESUL_ATOMICS_VOLATILE_WRAPPER_HPP_
#include <Kokkos_Macros.hpp>
#include <Kokkos_Atomics_Desul_Config.hpp>
#include <desul/atomics.hpp>

#ifdef KOKKOS_ENABLE_ATOMICS_BYPASS
Expand Down
2 changes: 0 additions & 2 deletions core/src/Kokkos_Atomics_Desul_Wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ static_assert(false,
#ifndef KOKKOS_DESUL_ATOMICS_WRAPPER_HPP_
#define KOKKOS_DESUL_ATOMICS_WRAPPER_HPP_
#include <Kokkos_Macros.hpp>

#include <Kokkos_Atomics_Desul_Config.hpp>
#include <desul/atomics.hpp>

#include <impl/Kokkos_Volatile_Load.hpp>
Expand Down
1 change: 1 addition & 0 deletions core/src/Kokkos_Macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@

#ifndef KOKKOS_DONT_INCLUDE_CORE_CONFIG_H
#include <KokkosCore_config.h>
#include <impl/Kokkos_DesulAtomicsConfig.hpp>
#include <impl/Kokkos_NvidiaGpuArchitectures.hpp>
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,9 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//@HEADER
#ifndef KOKKOS_IMPL_PUBLIC_INCLUDE
#include <Kokkos_Macros.hpp>
static_assert(false,
"Including non-public Kokkos header files is not allowed.");
#endif
#ifndef KOKKOS_ATOMICS_DESUL_CONFIG_HPP
#define KOKKOS_ATOMICS_DESUL_CONFIG_HPP

#include <Kokkos_Macros.hpp>
#ifndef KOKKOS_DESUL_ATOMICS_CONFIG_HPP
#define KOKKOS_DESUL_ATOMICS_CONFIG_HPP

#if defined(KOKKOS_ARCH_KEPLER) || defined(KOKKOS_ARCH_MAXWELL)
#define DESUL_CUDA_ARCH_IS_PRE_PASCAL
Expand All @@ -32,4 +26,4 @@ static_assert(false,
#define DESUL_CUDA_ARCH_IS_PRE_VOLTA
#endif

#endif // KOKKOS_ATOMICS_DESUL_CONFIG_HPP
#endif

0 comments on commit 86a3ab6

Please sign in to comment.