Projet

Général

Profil

HowTo » Historique » Version 3

Damien Gratadour, 26/01/2011 23:46

1 1 Damien Gratadour
h1. How to use Yoga efficiently
2
3 2 Damien Gratadour
Because the GPU is a "device" in a "host" any GPU application performance tends to be limited by memory operations between the CPU and the GPU. 
4
5 3 Damien Gratadour
The first memory operation is the allocation on the GPU memory of the space needed to perform the computation. The second operation is the transfer from the CPU to the GPU of the data needed for the computation. The third operation is the transfer from the GPU to the CPU of the result for printing / display. Although it is a very important operation, we'll pass on freeing the GPU memory. 
6
7
Depending on the memory bandwidth of the GPU used, both memory transfers can be fast enough so that a significative gain can be obtained by using a GPU. However, memory allocation is a killer, bringing the acceleration factor very close to 1. Hence GPU applications do not necessarily fit all needs and codes have to be designed carefully to take into account these limitations.