Applying Code Specialization to FFT Libraries for Integral Parameters

  • Minhaj Ahmad Khan
  • Henri-Pierre Charles
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4382)

Abstract

Code specialization is an approach that can be used to improve the sequence of optimizations to be performed by the compiler. The performance of code after specialization may vary, depending upon the structure of the application. For FFT libraries, the specialization of code with different parameters may cause an increase in code size, thereby impacting overall behavior of applications executing in environment with small instruction caches.

In this article, we propose a new approach for specializing FFT code that can be effectively used to improve performance while limiting the code increase by incorporating dynamic specialization. Our approach makes use of a static compile time analysis and adapts a single version of code to multiple values through runtime specialization. This technique has been applied to different FFT libraries over Itanium IA-64 platform using icc compiler v 9.0. For highly efficient libraries, we are able to achieve speedup of more than 80% with small increase in code size.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Makholm, H.: Specializing c- an introduction to the principles behind c-mix. Technical report, Computer Science Department, University of Copenhagen (1999)Google Scholar
  2. 2.
    Consel, C., et al.: Tempo: Specializing Systems Applications and Beyond. ACM Computing Surveys 30(3es) (1998), citeseer.ist.psu.edu/consel98tempo.html
  3. 3.
    Noël, F., et al.: Automatic, template-based run-time specialization: Implementation and experimental study. In: International Conference on Computer Languages (ICCL’98), February (1998)Google Scholar
  4. 4.
    Leone, M., Lee, P.: Dynamic Specialization in the Fabius System. ACM Computing Surveys 30(3es) (1998)Google Scholar
  5. 5.
    Consel, C., et al.: A uniform approach for compile-time and run-time specialization. In: Danvy, O., Thiemann, P., Glück, R. (eds.) Partial Evaluation. LNCS, vol. 1110, pp. 54–72. Springer, Heidelberg (1996)Google Scholar
  6. 6.
    Grant, B., et al.: Dyc: An expressive annotation-directed dynamic compiler for c. Technical report, Department of Computer Science and Engineering, University of Washington (1999)Google Scholar
  7. 7.
    Poletto, M., et al.: ’c and tcc: A language and compiler for dynamic code generation. ACM Transactions on Programming Languages and Systems 21, 324–369 (1999)CrossRefGoogle Scholar
  8. 8.
    Frigo, M., Johnson, S.G.: The design and implementation of fftw3. Proceedings of IEEE 93(2), 216–231 (2005)CrossRefGoogle Scholar
  9. 9.
    Frigo, M., G., J.S.: FFTW: An adaptive software architecture for the FFT. In: Proc. IEEE Intl. Conf. on Acoustics, Speech, and Signal Processing, vol. 3, Seattle, WA, May 1998, pp. 1381–1384. IEEE Computer Society Press, Los Alamitos (1998), citeseer.ist.psu.edu/frigo98fftw.html Google Scholar
  10. 10.
    Galassi, M., et al.: GNU Scientific Library Reference Manual - Revised Second Edition (2005), http://www.gnu.org/software/gsl/
  11. 11.
    Gough, B.: SciMark 2.0 (2000), http://math.nist.gov/scimark2/
  12. 12.
    Valkenburg, P.: FFT2 Library (2006), http://www.jjj.de/fft/
  13. 13.
    Hein, C.: Numerical Utilities (2003), http://atl.external.lmco.com/projects/csim/xgraph/numutil
  14. 14.
    Borgerding, M.: KissFFT v1.2.5 (2006), http://sourceforge.net/projects/kissfft/
  15. 15.
    Jones, N.D., Gomard, C., Sestoft, P.: Partial Evaluation and Automatic Program Generation. International Series in Computer Science. Prentice Hall International, Englewood Cliffs (1993)MATHGoogle Scholar
  16. 16.
    Brifault, K., Charles, H.-P.: Efficient data driven run-time code generation. In: LCR ’04: Proceedings of the 7th workshop on Workshop on languages, compilers, and run-time support for scalable systems, Houston, Texas, pp. 1–7. ACM Press, New York (2004), doi:10.1145/1066650.1066653CrossRefGoogle Scholar
  17. 17.
    Locanthi, B.N.: Fast bitblt() with asm() and cpp. In: European UNIX Systems User Group Conference Proceedings (1987)Google Scholar
  18. 18.
    Grant, B., et al.: Annotation-Directed Run-Time Specialization in C. In: Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM’97), June 1997, pp. 163–178. ACM Press, New York (1997), citeseer.ist.psu.edu/63006.html CrossRefGoogle Scholar
  19. 19.
    Engler, D.R., Proebsting, T.A.: DCG: An efficient, retargetable dynamic code generation system. In: Proceedings of the Sixth International Conference on Architectural Support for Programming Languages and Operating Systems, San Jose, California, pp. 263–272 (1994), citeseer.ist.psu.edu/engler94dcg.html
  20. 20.
    Engler, D.R.: Vcode: A retargetable extensible, very fast dynamic code generation system. In: Proceedings of the SIGPLAN 96 Conference on Programming Language Design and Implementation, ACM Press, New York (1996)Google Scholar
  21. 21.
    Leone, M., Lee, P.: Optimizing ml with run-time code generation. Technical report, School of Computer Science, Carnegie Mellon University (1995)Google Scholar
  22. 22.
    Leone, M., Lee, P.: A Declarative Approach to Run-Time Code Generation. In: Workshop on Compiler Support for System Software (WCSSS), February (1996), citeseer.ist.psu.edu/leone96declarative.html

Copyright information

© Springer Berlin Heidelberg 2007

Authors and Affiliations

  • Minhaj Ahmad Khan
    • 1
  • Henri-Pierre Charles
    • 1
  1. 1.Université de Versailles Saint-Quentin en Yvelines 

Personalised recommendations