I have a question about using the GPU in Matlab. I followed a simple code for the code running on GPU on the Matlab website But when I run the code and I check the CPU and GPU simultaneously, I see that the code runs on CPU instead of GPU!
Actually, Matlab website says gpuArray()
automatically transfers the code on GPU but it seems the code is run on CPU instead of GPU.
this is the code :
r = gpuArray.linspace(0,4,N);
x = rand(1,N,'gpuArray');
numIterations = 10000000;
for n=1:numIterations
x = r.*x.*(1-x);
end
and this is the snapshot taken from processing statistics.