Skip to content

Commit

Permalink
Fixup Cuda/HIP graph header includes and pointer casting
Browse files Browse the repository at this point in the history
  • Loading branch information
dalg24 committed Jan 21, 2024
1 parent 237475e commit 88bcf13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions core/src/Cuda/Kokkos_Cuda_GraphNodeKernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class GraphNodeKernelImpl<Kokkos::Cuda, PolicyType, Functor, PatternTag,

~GraphNodeKernelImpl() {
if (m_driver_storage) {
Kokkos::kokkos_free<Kokkos::CudaSpace>(m_driver_storage);
Kokkos::CudaSpace().deallocate(m_driver_storage, sizeof(base_t));
}
}

Expand All @@ -92,8 +92,8 @@ class GraphNodeKernelImpl<Kokkos::Cuda, PolicyType, Functor, PatternTag,

Kokkos::ObservingRawPtr<base_t> allocate_driver_memory_buffer() const {
KOKKOS_EXPECTS(m_driver_storage == nullptr)
m_driver_storage = Kokkos::kokkos_malloc<Kokkos::CudaSpace>(
"GraphNodeKernel global memory functor storage", sizeof(base_t));
m_driver_storage = static_cast<base_t*>(Kokkos::CudaSpace().allocate(
"GraphNodeKernel global memory functor storage", sizeof(base_t)));
KOKKOS_ENSURES(m_driver_storage != nullptr)
return m_driver_storage;
}
Expand Down
6 changes: 3 additions & 3 deletions core/src/HIP/Kokkos_HIP_GraphNodeKernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class GraphNodeKernelImpl<Kokkos::HIP, PolicyType, Functor, PatternTag, Args...>

~GraphNodeKernelImpl() {
if (m_driver_storage) {
Kokkos::kokkos_free<Kokkos::HIPSpace>(m_driver_storage);
Kokkos::HIPSpace().deallocate(m_driver_storage, sizeof(base_t));
}
}

Expand All @@ -76,8 +76,8 @@ class GraphNodeKernelImpl<Kokkos::HIP, PolicyType, Functor, PatternTag, Args...>

Kokkos::ObservingRawPtr<base_t> allocate_driver_memory_buffer() const {
KOKKOS_EXPECTS(m_driver_storage == nullptr);
Kokkos::kokkos_malloc<Kokkos::HIPSpace>(
"GraphNodeKernel global memory functor storage", sizeof(base_t));
m_driver_storage = static_cast<base_t*>(Kokkos::HIPSpace().allocate(
"GraphNodeKernel global memory functor storage", sizeof(base_t)));
KOKKOS_ENSURES(m_driver_storage != nullptr);
return m_driver_storage;
}
Expand Down

0 comments on commit 88bcf13

Please sign in to comment.