I have two physical Nvidia GTX 1080 graphic cards and was wondering how to run two GPU computing simultaneously. Read some articles saying the combination of parfor and gpuArray would work but never found any example. Wrote some code in the following but does not work. Please help.
clear alltictest=ones(2048,2048,800,'uint16');parfor i=1:2 gpuDevice(i); gtest{i}=gpuArray(test(:,:,(400*(i-1)+1:400*i)));endtest1=gather(gtest{1});test2=gather(gtest{2});
Best Answer