What's the difference between G2 = G .* G
and G2 = G * G
in the following codes? And why I get with first code GPU Load 100% and with the second I get GPU Load and Memory Controller Load sensors both at 100% on gpu-z ?
X = rand(5000, 'double');
G = gpuArray(X);
classUnderlying(G) % Returns 'single'
for m = 1:5000
G2 = G .* G .* G .* G; % Performed on GPU
end
whos G2 % Result on GPU
X = rand(5000, 'double');
G = gpuArray(X);
classUnderlying(G) % Returns 'single'
for m = 1:5000
G2 = G * G * G * G; % Performed on GPU
end
whos G2 % Result on GPU
Copyright Notice:Content Author:「Aurelius」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/21171006/difference-between-g2-g-g-and-g2-g-g-in-matlab-gpu-computing