Skip to content

Commit

Permalink
Fix reviewer's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Rombur committed Aug 28, 2023
1 parent 277e4a6 commit 9fde326
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
8 changes: 1 addition & 7 deletions core/src/HIP/Kokkos_HIP_GraphNodeKernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@
namespace Kokkos {
namespace Impl {

template <class CombinedFunctorReducer, class PolicyType>
struct PatternImplSpecializationFromTag<
Kokkos::ParallelReduceTag, CombinedFunctorReducer, PolicyType, Kokkos::HIP>
: type_identity<
ParallelReduce<CombinedFunctorReducer, PolicyType, Kokkos::HIP>> {};

template <typename PolicyType, typename Functor, typename PatternTag,
typename... Args>
class GraphNodeKernelImpl<Kokkos::HIP, PolicyType, Functor, PatternTag, Args...>
Expand Down Expand Up @@ -105,7 +99,7 @@ struct HIPGraphNodeAggregateKernel {
using graph_kernel = HIPGraphNodeAggregateKernel;

// Aggregates don't need a policy, but for the purposes of checking the static
// assertions about graph kerenls,
// assertions about graph kernels,
struct Policy {
using is_graph_kernel = std::true_type;
};
Expand Down
5 changes: 0 additions & 5 deletions core/src/HIP/Kokkos_HIP_Graph_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@

#include <Kokkos_Macros.hpp>

#if defined(KOKKOS_ENABLE_HIP)
#if (HIP_VERSION_MAJOR == 5) && (HIP_VERSION_MINOR > 2)

#include <Kokkos_Graph_fwd.hpp>

#include <impl/Kokkos_GraphImpl.hpp>
Expand Down Expand Up @@ -188,5 +185,3 @@ auto GraphImpl<Kokkos::HIP>::create_aggregate_ptr(PredecessorRefs&&...) {
} // namespace Kokkos

#endif
#endif
#endif
8 changes: 4 additions & 4 deletions core/src/HIP/Kokkos_HIP_KernelLaunch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <HIP/Kokkos_HIP_Instance.hpp>
#include <HIP/Kokkos_HIP_Space.hpp>

#if (HIP_VERSION_MAJOR == 5) && (HIP_VERSION_MINOR > 2)
#if !((HIP_VERSION_MAJOR == 5) && (HIP_VERSION_MINOR == 2))
#include <HIP/Kokkos_HIP_GraphNodeKernel.hpp>
#include <impl/Kokkos_GraphImpl_fwd.hpp>
#endif
Expand Down Expand Up @@ -380,7 +380,7 @@ struct HIPParallelLaunchKernelInvoker<DriverType, LaunchBounds,
driver);
}

#if (HIP_VERSION_MAJOR == 5) && (HIP_VERSION_MINOR > 2)
#if !((HIP_VERSION_MAJOR == 5) && (HIP_VERSION_MINOR == 2))
static void create_parallel_launch_graph_node(
DriverType const &driver, dim3 const &grid, dim3 const &block, int shmem,
HIPInternal const * /*hip_instance*/) {
Expand Down Expand Up @@ -438,7 +438,7 @@ struct HIPParallelLaunchKernelInvoker<DriverType, LaunchBounds,
driver_ptr);
}

#if (HIP_VERSION_MAJOR == 5) && (HIP_VERSION_MINOR > 2)
#if !((HIP_VERSION_MAJOR == 5) && (HIP_VERSION_MINOR == 2))
static void create_parallel_launch_graph_node(
DriverType const &driver, dim3 const &grid, dim3 const &block, int shmem,
HIPInternal const *hip_instance) {
Expand Down Expand Up @@ -581,7 +581,7 @@ void hip_parallel_launch(const DriverType &driver, const dim3 &grid,
const dim3 &block, const int shmem,
const HIPInternal *hip_instance,
const bool prefer_shmem) {
#if (HIP_VERSION_MAJOR == 5) && (HIP_VERSION_MINOR > 2)
#if !((HIP_VERSION_MAJOR == 5) && (HIP_VERSION_MINOR == 2))
if constexpr (DoGraph) {
// Graph launch
using base_t = HIPParallelLaunchKernelInvoker<DriverType, LaunchBounds,
Expand Down
4 changes: 4 additions & 0 deletions core/src/Kokkos_Graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ Graph<ExecutionSpace> create_graph(Closure&& arg_closure) {
#include <impl/Kokkos_GraphNodeImpl.hpp>
#include <impl/Kokkos_Default_Graph_Impl.hpp>
#include <Cuda/Kokkos_Cuda_Graph_Impl.hpp>
#if defined(KOKKOS_ENABLE_HIP)
#if !((HIP_VERSION_MAJOR == 5) && (HIP_VERSION_MINOR == 2))
#include <HIP/Kokkos_HIP_Graph_Impl.hpp>
#endif
#endif
#ifdef KOKKOS_IMPL_PUBLIC_INCLUDE_NOTDEFINED_GRAPH
#undef KOKKOS_IMPL_PUBLIC_INCLUDE
#undef KOKKOS_IMPL_PUBLIC_INCLUDE_NOTDEFINED_GRAPH
Expand Down

0 comments on commit 9fde326

Please sign in to comment.