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

Method to_device_async

include/base/memory.h:155–162  ·  view source on GitHub ↗

Copy the memory space to GPU (asynchronous) */

Source from the content-addressed store, hash-verified

153
154 /** Copy the memory space to GPU (asynchronous) */
155 void to_device_async(Index copy_count = 0) {
156 if (count && device_id != -1) {
157 if (!copy_count)
158 copy_count = count;
159 CUDA_CHECK(cudaSetDevice(device_id));
160 CUDA_CHECK(cudaMemcpyAsync(device_ptr, host_ptr, copy_count * sizeof(Data), cudaMemcpyHostToDevice, stream));
161 }
162 }
163
164 /** Copy the memory space back from GPU */
165 void to_host(Index copy_count = 0) {

Callers 4

load_embeddingMethod · 0.80
load_partitionMethod · 0.80
train_batchMethod · 0.80
predict_batchMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected