I currently have only one GPU available but would like to prepare my code to scale on multiple GPUs.
I make heavy use of constant memory.
I’m curious about how multiple GPUs controlled by multiple threads (each GPU controlled by one thread) and constant declarations work together.
There is no real allocation and the programming guide states “device and constant variables are only allowed at file scope.”
Would cudaGetSymbolAddress() simply return a different address for the same variable in different CUDA contexts?
But it’s still only one pointer how could it have different values.
I’m really confused here. Would be great if someone could enlighten me.
Thanks in advance,
Thanks for the information paulius and tachyon_john. As soon as I have a system with 2 GPUs available I will test the code and let you know what I found out.
However from what I understand in your code tachyon_john it should work as I thought it would.