Skip to content

Commit

Permalink
Merge pull request #688 from rapidsai/branch-22.06
Browse files Browse the repository at this point in the history
[gpuCI] Forward-merge branch-22.06 to branch-22.08 [skip gpuci]
  • Loading branch information
GPUtester authored May 26, 2022
2 parents 9168ed8 + 120d478 commit f8c0676
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cpp/include/raft/core/cudart_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <iomanip>
#include <iostream>
#include <mutex>
#include <vector>

///@todo: enable once logging has been enabled in raft
//#include "logger.hpp"
Expand Down Expand Up @@ -303,10 +302,10 @@ void print_device_vector(const char* variable_name,
size_t componentsCount,
OutStream& out)
{
std::vector<T> host_mem(componentsCount);
CUDA_CHECK(
cudaMemcpy(host_mem.data(), devMem, componentsCount * sizeof(T), cudaMemcpyDeviceToHost));
print_host_vector(variable_name, host_mem.data(), componentsCount, out);
T* host_mem = new T[componentsCount];
CUDA_CHECK(cudaMemcpy(host_mem, devMem, componentsCount * sizeof(T), cudaMemcpyDeviceToHost));
print_host_vector(variable_name, host_mem, componentsCount, out);
delete[] host_mem;
}

/**
Expand Down

0 comments on commit f8c0676

Please sign in to comment.