Dear All, I had my previous question, because it was not clear, now I tried to simplify it. At my disposal there are two GPU devices (GeForce GTX 1070 Ti and GeForce GTX 1060 6GB). I would like to parallelize my calculations on both GPUs. Lets say I have 3D gpuArray and I would like to pass this data in chunks to both GPUs, just in my code function is more difficult, this is an example of what I am trying to achieve, and yes it does not work.
clear;delete(gcp('nocreate'));nGPUs = gpuDeviceCount();parpool('local', nGPUs);d1=rand(10,10,10);d=gpuArray(d1);parfor i =1:nGPUsc1 = zeros(10,10,10);c=gpuArray(c1); for j=1:10 c(:,:,j)=d(:,:,j)*2; endendder=c;
It gives temporary variable error.
Best Answer