CPU->GPU transfer vs GPU->CPU transfer

帅比萌擦擦* 提交于 2019-12-22 14:02:53

问题


I have been doing some experiments regarding measuring the latency of data transfer from CPU->GPU and GPU->CPU. I found that CPU->GPU data transfer rate is almost twice as much compared to GPU->CPU transfer rate for a particular message size. Can anybody explain me why this is so?


回答1:


Since don't know the detail about your experiment, like what's CPU/GPU used, how to measure transfer rate, I just guess that, data transfer from CPU->GPU, normally is through DMA. each time it can transfer a block bytes from system memory to graphic memory. But data transfer from GPU->CPU, normally CPU is to read the graphic aperture memory which is mapped by PCI bus. CPU only can read the aperture memory in un-cacheable, strict order byte by byte, so it is slow.



来源:https://stackoverflow.com/questions/13032554/cpu-gpu-transfer-vs-gpu-cpu-transfer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!