% Tiled f32 matrix multiply (the GPU has no f64): 30 products of % 2048 x 2048, about half a teraflop of work. % For an apples-to-apples MATLAB run, also try single precision there: % A = rand(n, n, 'single'); B = rand(n, n, 'single'); n = 2048; reps = 30; A = rand(n, n); B = rand(n, n); C = A * B; % warm-up tic; for k = 1:reps C = A * B; end t = toc; fprintf('%.1f GFLOP/s over %d multiplies of %dx%d\n', 2*n^3*reps/1e9/t, reps, n, n); fprintf('checksum %.2f\n', sum(C(:))/n^2);