3 ms·
> run-time profiling to choose the fastest codelets (which is largely affected by the target architecture). What's the quick overview of how this run-time prof
by jancsika 8y ago
> run-time profiling to choose the fastest codelets (which is largely affected by the target architecture).
What's the quick overview of how this run-time profiling works?
The value of such a system seems immense but I only have seen it mentioned with reference to fftw. Have there been efforts to generalize that process to realtime DSP programming?
- cameldrv 8y agoI don't know about DSPs, but the general concept is (https://en.wikipedia.org/wiki/Profile-guided_optimization https://en.wikipedia.org/wiki/Profile-guided_optimization) The ATLAS BLAS/LAPACK library also uses a similar technique.
- gnufx 8y agoATLAS really doesn't work the same as FFTW. (It also doesn't work as well as other free BLAS, unless it's improved since I last tried.)
- Mindless2112 8y agoWhen you ask FFTW to construct a plan, it benchmarks a variety of options and uses the fastest one. > FFTW_MEASURE tells FFTW to find an optimized plan by actually computing several FFTs and measuring their execution time. Depending on your machine, this can take some time (often a few seconds). FFTW_MEASURE is the default planning option. > FFTW_PATIENT is like FFTW_MEASURE, but considers a wider range of algorithms and often produces a “more optimal” plan (especially for large transforms), but at the expense of several times longer planning time (especially for large transforms). > FFTW_EXHAUSTIVE is like FFTW_PATIENT, but considers an even wider range of algorithms, including many that we think are unlikely to be fast, to produce the most optimal plan but with a substantially increased planning time. http://www.fftw.org/fftw3_doc/Planner-Flags.html http://www.fftw.org/fftw3_doc/Planner-Flags.html I believe this sort of technique is used for some cryptography libraries as well, but I don't have any specifics.
- jancsika 8y agoThanks, this is fascinating. I'll delve into it at some point. But for now, say I'm on Debian and I install the fftw package. Could the packager put a post install script to run the runtime tests and cache the results for the library to use so that apps which leverage fftw don't have to do the test on each instantiation? Edit: clarification