How to measure FLOPS of a MatLab function
12 views (last 30 days)
Show older comments
Hello, I recently installed a FLOPS toolbox called Lightspeed by Tom Minka. http://research.microsoft.com/en-us/um/people/minka/software/lightspeed/
But I have to rewrite the code so that every operation I want to be counted is specifically measured, such as by changing multiplication calls to flops_mult() calls.
How to measure FLOPS of a MatLab function, for example, fft or interp ?
Will I be able to calculate this in MATLAB 5 using the flops function?
0 Comments
Answers (1)
Walter Roberson
on 21 Mar 2017
You cannot use the Lightspeed toolbox to count FLOPS of built-in MATLAB functions. To use Lightspeed you have to add function calls to everything that is to be measured, along the lines of "Hey, I'm about to do an algebraic matrix multiplication of an N x M left side and M x P right side". The toolbox has no idea how many flops an fft takes.
Very old versions of MATLAB had a flops() function; that was back in the days when counting flops was still a vaguely relevant measurement of performance. I do not know how it was implemented or whether it covered everything. If it hooked into hardware cycle counters then it would be useless with modern CPUs.
0 Comments
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!