Skip to content

Commit

Permalink
Fix format and wording
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricchevalier19 authored and Christian Robert Trott committed May 23, 2024
1 parent 4d31a75 commit 34547c2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/src/Cuda/Kokkos_CudaSpace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <algorithm>
#include <atomic>

//#include <Cuda/Kokkos_Cuda_BlockSize_Deduction.hpp>
// #include <Cuda/Kokkos_Cuda_BlockSize_Deduction.hpp>
#include <impl/Kokkos_Error.hpp>

#include <impl/Kokkos_Tools.hpp>
Expand Down Expand Up @@ -190,13 +190,15 @@ void *impl_allocate_common(const int device_id,
KOKKOS_IMPL_CUDA_SAFE_CALL(cudaDeviceSynchronize());
#elif defined(KOKKOS_ENABLE_IMPL_CUDA_UNIFIED_MEMORY)
// This is intended for Grace-Hopper (and future unified memory architectures)
// The idea is to use host allocator and then adivce to keep it in HBM on
// The idea is to use host allocator and then advise to keep it in HBM on
// device, but that requires CUDA 12.2
static_assert(CUDART_VERSION >= 12020);
if (arg_alloc_size) { // cudaMemAdvise_v2 does not work with nullptr
if (arg_alloc_size) { // cudaMemAdvise_v2 does not work with nullptr
ptr = malloc(arg_alloc_size);
// TODO: what error do we want to throw here if it fails, i.e. ptr == nullptr? One would thing cudaMemLocation{device_id, cudaMemLocationTypeDeivce} would
// work but it doesn't. I.e. the order of members doesn't seem to be defined.
// TODO: what error do we want to throw here if it fails, i.e. ptr ==
// nullptr? One would thing cudaMemLocation{device_id,
// cudaMemLocationTypeDeivce} would work but it doesn't. I.e. the order of
// members doesn't seem to be defined.
cudaMemLocation loc;
loc.id = device_id;
loc.type = cudaMemLocationTypeDevice;
Expand Down

0 comments on commit 34547c2

Please sign in to comment.