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