Dynamic texture on kernel for multiple GPUs

I have a kernel that uses a texture. I would like to use this kernel on several GPUs concurrently where each GPU uses a different texture. I have tried specifying the texture reference as a parameter for the host function as well as using an array of textures declared as a global variable. However, CUDA does not seem to support these approaches. When reading other threads regarding dynamic texture references, one suggestion was to change the binding of the texture dynamically using a host function. However, since the kernels should run concurrently, this is not an option. Does anyone know how to get around this problem?
Thank you in advance.

Regards,
Kevin

Hi,

I have a kernel running on multi-gpus with textures - you only need to specify the texture definition as a global variable

it should be bounded automaticaly per GPU. Same for __constant memory.

eyal

Thank you for the help, it seems to work.

Do you need to create one different channel for each GPU? or… can you use just one global cudaChannelFormatDesc too?

Thank you.

Due to the code structure, I used a seperate cudaChannelFormatDesc for each GPU. However, I don’t see any problem using a global reference as it is just a struct used to decide the requested format of the allocated memory. Then again, I haven’t worked with CUDA for almost a year, so I could have forgotten something in the meantime :)