When I was struggling to grasp the concept of GPU memory in OpenCL, I looked in the deep pages of google search and found an interesting analogy to the real world.
So I hope Kayvon doesn't kill me for this since it's not exactly CUDA, but here's the execution and memory model of OpenCL:
A Day at School
Hope this helps!
This comment was marked helpful 3 times.
rbcarlso
What is the relation between "texture memory" and what we see here? Is it a special subset of device global memory? Are there any hack-y things we can do with it, or is it just a different model for the same resources that we're already using?
cudaMemcpy only copies data from main memory to global memory. However, using shared memory in the block has a much better performance.
This comment was marked helpful 0 times.
kayvonf
Texture memory is backed by GPU DRAM, so yes, it's just a subset of global memory. However, in modern GPUs a texture read a special instruction services by a special fixed function processor with its own cache. (with caching policies specific to texture data access).
More detail on what a texture fetch actually does can be found in 15-869 slides here.
When I was struggling to grasp the concept of GPU memory in OpenCL, I looked in the deep pages of google search and found an interesting analogy to the real world. So I hope Kayvon doesn't kill me for this since it's not exactly CUDA, but here's the execution and memory model of OpenCL: A Day at School
Hope this helps!
This comment was marked helpful 3 times.
What is the relation between "texture memory" and what we see here? Is it a special subset of device global memory? Are there any hack-y things we can do with it, or is it just a different model for the same resources that we're already using?
This comment was marked helpful 0 times.
From looking it up, it appears texture memory has particularly good 2D spatial locality, so it could be handy in any application where that's particularly relevant: http://cuda-programming.blogspot.com/2013/02/texture-memory-in-cuda-what-is-texture.html
This comment was marked helpful 1 times.
cudaMemcpy
only copies data from main memory to global memory. However, using shared memory in the block has a much better performance.This comment was marked helpful 0 times.
Texture memory is backed by GPU DRAM, so yes, it's just a subset of global memory. However, in modern GPUs a texture read a special instruction services by a special fixed function processor with its own cache. (with caching policies specific to texture data access).
More detail on what a texture fetch actually does can be found in 15-869 slides here.
This comment was marked helpful 0 times.