Search code examples
openclbandwidthdata-transfer

Why in opencl As the message size increases the bandwidth increases?


Hi in a paper about data transfer in opencl i read As the data size that we want to send to the device memory increase the bandwidth will increase, but i dont know why . can some one please explain it to me why bandwidth will increase?


Solution

  • Every time a kernel gets launched or gets transferred to/from the GPU, there is a short delay of several micro-seconds. Historically, this has been larger on AMD GPUs than Nvidia GPUs. Therefore, there's two components to the time it takes to send data: latency + X * Y B/s where X is the number of bytes and Y is the theoretical bandwidth. When X is small, X * Y is not much larger than latency. As X gets large, e.g. multiple megabytes, the latency component of the total time becomes such a tiny fraction of the total time that it becomes insignificant.