Skip to content

Commit

Permalink
Rename KOKKOS_{ -> IMPL_}ARCH_NVIDIA_GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
dalg24 committed Mar 8, 2023
1 parent f670cae commit b4de0ac
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion core/src/OpenACC/Kokkos_OpenACC_Traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
namespace Kokkos::Experimental::Impl {

struct OpenACC_Traits {
#if defined(KOKKOS_ARCH_NVIDIA_GPU)
#if defined(KOKKOS_IMPL_ARCH_NVIDIA_GPU)
static constexpr acc_device_t dev_type = acc_device_nvidia;
static constexpr bool may_fallback_to_host = false;
#else
Expand Down
2 changes: 1 addition & 1 deletion core/src/OpenMPTarget/Kokkos_OpenMPTarget_Instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void OpenMPTargetInternal::impl_initialize() {

// FIXME_OPENMPTARGET: Only fix the number of teams for NVIDIA architectures
// from Pascal and upwards.
#if defined(KOKKOS_ARCH_NVIDIA_GPU) && defined(KOKKOS_COMPILER_CLANG) && \
#if defined(KOKKOS_IMPL_ARCH_NVIDIA_GPU) && defined(KOKKOS_COMPILER_CLANG) && \
(KOKKOS_COMPILER_CLANG >= 1300)
omp_set_num_teams(512);
#endif
Expand Down
2 changes: 1 addition & 1 deletion core/src/SYCL/Kokkos_SYCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void SYCL::impl_initialize(InitializationSettings const& settings) {
// If the device id is not specified and there are no GPUs, sidestep Kokkos
// device selection and use whatever is available (if no GPU architecture is
// specified).
#if !defined(KOKKOS_ARCH_INTEL_GPU) && !defined(KOKKOS_ARCH_NVIDIA_GPU)
#if !defined(KOKKOS_ARCH_INTEL_GPU) && !defined(KOKKOS_IMPL_ARCH_NVIDIA_GPU)
if (!settings.has_device_id() && gpu_devices.empty()) {
Impl::SYCLInternal::singleton().initialize(sycl::device());
Impl::SYCLInternal::m_syclDev = 0;
Expand Down
4 changes: 2 additions & 2 deletions core/src/SYCL/Kokkos_SYCL_Parallel_Team.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ class TeamPolicyInternal<Kokkos::Experimental::SYCL, Properties...>
return std::min({
int(m_space.impl_internal_space_instance()->m_maxWorkgroupSize),
// FIXME_SYCL Avoid requesting to many registers on NVIDIA GPUs.
#if defined(KOKKOS_ARCH_NVIDIA_GPU)
#if defined(KOKKOS_IMPL_ARCH_NVIDIA_GPU)
256,
#endif
max_threads_for_memory
Expand Down Expand Up @@ -334,7 +334,7 @@ class TeamPolicyInternal<Kokkos::Experimental::SYCL, Properties...>
return std::min<int>({
int(m_space.impl_internal_space_instance()->m_maxWorkgroupSize),
// FIXME_SYCL Avoid requesting to many registers on NVIDIA GPUs.
#if defined(KOKKOS_ARCH_NVIDIA_GPU)
#if defined(KOKKOS_IMPL_ARCH_NVIDIA_GPU)
256,
#endif
max_threads_for_memory
Expand Down
32 changes: 16 additions & 16 deletions core/src/setup/Kokkos_Setup_Cuda.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,37 +70,37 @@
#define KOKKOS_IMPL_DEVICE_FUNCTION __device__

#if defined(KOKKOS_ARCH_KEPLER30)
#define KOKKOS_ARCH_NVIDIA_GPU 30
#define KOKKOS_IMPL_ARCH_NVIDIA_GPU 30
#elif defined(KOKKOS_ARCH_KEPLER32)
#define KOKKOS_ARCH_NVIDIA_GPU 32
#define KOKKOS_IMPL_ARCH_NVIDIA_GPU 32
#elif defined(KOKKOS_ARCH_KEPLER35)
#define KOKKOS_ARCH_NVIDIA_GPU 35
#define KOKKOS_IMPL_ARCH_NVIDIA_GPU 35
#elif defined(KOKKOS_ARCH_KEPLER37)
#define KOKKOS_ARCH_NVIDIA_GPU 37
#define KOKKOS_IMPL_ARCH_NVIDIA_GPU 37
#elif defined(KOKKOS_ARCH_MAXWELL50)
#define KOKKOS_ARCH_NVIDIA_GPU 50
#define KOKKOS_IMPL_ARCH_NVIDIA_GPU 50
#elif defined(KOKKOS_ARCH_MAXWELL52)
#define KOKKOS_ARCH_NVIDIA_GPU 52
#define KOKKOS_IMPL_ARCH_NVIDIA_GPU 52
#elif defined(KOKKOS_ARCH_MAXWELL53)
#define KOKKOS_ARCH_NVIDIA_GPU 53
#define KOKKOS_IMPL_ARCH_NVIDIA_GPU 53
#elif defined(KOKKOS_ARCH_PASCAL60)
#define KOKKOS_ARCH_NVIDIA_GPU 60
#define KOKKOS_IMPL_ARCH_NVIDIA_GPU 60
#elif defined(KOKKOS_ARCH_PASCAL61)
#define KOKKOS_ARCH_NVIDIA_GPU 61
#define KOKKOS_IMPL_ARCH_NVIDIA_GPU 61
#elif defined(KOKKOS_ARCH_VOLTA70)
#define KOKKOS_ARCH_NVIDIA_GPU 70
#define KOKKOS_IMPL_ARCH_NVIDIA_GPU 70
#elif defined(KOKKOS_ARCH_VOLTA72)
#define KOKKOS_ARCH_NVIDIA_GPU 72
#define KOKKOS_IMPL_ARCH_NVIDIA_GPU 72
#elif defined(KOKKOS_ARCH_TURING75)
#define KOKKOS_ARCH_NVIDIA_GPU 75
#define KOKKOS_IMPL_ARCH_NVIDIA_GPU 75
#elif defined(KOKKOS_ARCH_AMPERE80)
#define KOKKOS_ARCH_NVIDIA_GPU 80
#define KOKKOS_IMPL_ARCH_NVIDIA_GPU 80
#elif defined(KOKKOS_ARCH_AMPERE86)
#define KOKKOS_ARCH_NVIDIA_GPU 86
#define KOKKOS_IMPL_ARCH_NVIDIA_GPU 86
#elif defined(KOKKOS_ARCH_ADA89)
#define KOKKOS_ARCH_NVIDIA_GPU 89
#define KOKKOS_IMPL_ARCH_NVIDIA_GPU 89
#elif defined(KOKKOS_ARCH_HOPPER90)
#define KOKKOS_ARCH_NVIDIA_GPU 90
#define KOKKOS_IMPL_ARCH_NVIDIA_GPU 90
#else
#error NVIDIA GPU arch not recognized
#endif
Expand Down

0 comments on commit b4de0ac

Please sign in to comment.