Device-to-Host Transfers
Downloading results back to the CPU.
Bringing Results Home
Your kernel just filled a device buffer with answers, but the CPU cannot read GPU memory directly. You must download the results back. 📥
The Download Direction
To pull data back you use cudaMemcpyDeviceToHost. Now the source is device memory and the destination is host RAM.
cudaMemcpy(h_c, d_c, bytes, cudaMemcpyDeviceToHost);All lessons in this course
- Host-to-Device Transfers
- Device-to-Host Transfers
- The Copy Direction Enum
- The PCIe Transfer Bottleneck