Hi,
I’m testing the memory acess to know which type is faster, Texture or Global.
In my tests I deduce that reading Global memory is faster.
Is this right?
Or am I doing something wrong? External Image
Hi,
I’m testing the memory acess to know which type is faster, Texture or Global.
In my tests I deduce that reading Global memory is faster.
Is this right?
Or am I doing something wrong? External Image
The answer depends on many factors:
In my application texture memory is a bit faster than global memory on Fermi , even though CUDA documentations recommends just the opposite, and it is much faster on GTX 280.
So: the only way to know is to experiment!
If you are doing anything that has a 2D/3D spatial component to it then I’d recommend texture memory. Reads from texture memory are cached in a manner that preserves spatial locality, meaning that data reads from nearby points in space will possibly be cache hits.
I personally like to use texture memory for my read only accesses, such as constant field data. Mostly because of the clamped addressing, and it is a little faster for what I am using it for.