MCPcopy Create free account
hub / github.com/DeepGraphLearning/graphvite / to_host

Method to_host

include/base/memory.h:165–173  ·  view source on GitHub ↗

Copy the memory space back from GPU */

Source from the content-addressed store, hash-verified

163
164 /** Copy the memory space back from GPU */
165 void to_host(Index copy_count = 0) {
166 if (count && device_id != -1) {
167 if (!copy_count)
168 copy_count = count;
169 CUDA_CHECK(cudaSetDevice(device_id));
170 CUDA_CHECK(cudaMemcpyAsync(host_ptr, device_ptr, copy_count * sizeof(Data), cudaMemcpyDeviceToHost, stream));
171 CUDA_CHECK(cudaStreamSynchronize(stream));
172 }
173 }
174
175 /** Copy the memory space back from GPU (asynchronous) */
176 void to_host_async(Index copy_count = 0) {

Callers 5

naive_sampleMethod · 0.80
sampleMethod · 0.80
write_embeddingMethod · 0.80
train_batchMethod · 0.80
predict_batchMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected