texture with CUBLAS


I’m using linear array on libraries like CUBLAS and CUDPP. I read some technical report that using texture memory is faster than global memory. My question is:

Does it work if I bind linear array (1D normally) on texture memory, and use them with CUBLAS and CUDPP? Or these libraries are only valid on global memory?



Texture memory is only faster than global memory when it is being accessed in a somewhat random fashion where you can get the benefits of the cache.

I believe CUBLAS and CUDPP will bind and use textures internally where appropriate. You can check out their source for yourself to confirm.

Compared to coalesced access to global mem, linear array binded to texture is slower.