skip to main content
research-article

Vectorisation avoidance

Published:13 September 2012Publication History
Skip Abstract Section

Abstract

Flattening nested parallelism is a vectorising code transform that converts irregular nested parallelism into flat data parallelism. Although the result has good asymptotic performance, flattening thoroughly restructures the code. Many intermediate data structures and traversals are introduced, which may or may not be eliminated by subsequent optimisation. We present a novel program analysis to identify parts of the program where flattening would only introduce overhead, without appropriate gain. We present empirical evidence that avoiding vectorisation in these cases leads to more efficient programs than if we had applied vectorisation and then relied on array fusion to eliminate intermediates from the resulting code.

References

  1. A. W. Appel and T. Jim. Continuation-passing, closure-passing style. In POPL '89: Proceedings of the 16th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM Press, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. L. Bergstrom and J. Reppy. Nested data-parallelism on the GPU. In ICFP'12: Proceedings of the 17th ACM SIGPLAN International Conference on Functional Programming. ACM Press, 2012. Forthcoming. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. L. Bergstrom, J. Reppy, M. Rainey, A. Shaw, and M. Fluet. Lazy tree splitting. In ICFP'10: Proceedings of the 15th ACM SIGPLAN International Conference on Functional Programming. ACM Press, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. G. Blelloch, P. Gibbons, and Y. Matias. Provably efficient scheduling for languages with fine-grained parallelism. Journal of the Association for Computing Machinery, 46 (2), 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. G. E. Blelloch and G. W. Sabot. Compiling collection-oriented languages onto massively parallel computers. Journal of Parallel and Distributed Computing, 8, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. M. T. Chakravarty and G. Keller. More types for nested data parallel programming. In ICFP'00: Proceedings of the Fifth ACM SIGPLAN International Conference on Functional Programming. ACM Press, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. M. T. Chakravarty and G. Keller. Functional array fusion. In ICFP'01: Proceedings of the Sixth ACM SIGPLAN International Conference on Functional Programming. ACM Press, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. M. T. Chakravarty, G. Keller, and S. Peyton Jones. Associated type synonyms. In ICFP'05: Proceedings of the Tenth ACM SIGPLAN International Conference on Functional Programming. ACM Press, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. M. T. Chakravarty, G. Keller, S. Peyton Jones, and S. Marlow. Associated types with class. In POPL'05: Proceedings of the 32nd ACM SIGPLAN-SIGACT Sysposium on Principles of Programming Languages. ACM Press, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. M. T. Chakravarty, R. Leshchinskiy, S. Peyton Jones, G. Keller, and S. Marlow. Data Parallel Haskell: a status report. In DAMP 2007: Workshop on Declarative Aspects of Multicore Programming. ACM Press, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. M. M. T. Chakravarty, R. Leshchinskiy, S. Peyton Jones, and G. Keller. Partial vectorisation of Haskell programs. In DAMP 2008: Workshop on Declarative Aspects of Multicore Programming, 2008.Google ScholarGoogle Scholar
  12. D. Coutts, R. Leshchinskiy, and D. Stewart. Stream fusion: From lists to streams to nothing at all. In ICFP 2007: Proceedings of the ACM SIGPLAN International Conference on Functional Programming, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. D. Coutts, D. Stewart, and R. Leshchinskiy. Rewriting haskell strings. In PADL 2007: Practical Aspects of Declarative Languages 8th International Symposium. Springer-Verlag, Jan. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. G. Keller and M. M. T. Chakravarty. Flattening trees. In Euro-Par'98, Parallel Processing, number 1470 in LNCS. Springer-Verlag, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. R. Leshchinskiy, M. M. T. Chakravarty, and G. Keller. Higher order flattening. In PAPP 2006: Third International Workshop on Practical Aspects of High-level Parallel Programming, number 3992 in LNCS. Springer-Verlag, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. B. Lippmeier, M. M. T. Chakravarty, G. Keller, R. Leshchinskiy, and S. Peyton Jones. Work efficient higher order vectorisation. In ICFP'12: Proceedings of the ACM SIGPLAN International Conference on Functional Programming(to appear). ACM Press, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. S. Peyton Jones, R. Leshchinskiy, G. Keller, and M. M. T. Chakravarty. Harnessing the multicores: Nested data parallelism in Haskell. In FSTTCS 2008: IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, LIPIcs. Schloss Dagstuhl, 2008.Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. A. Shaw. Implementation Techniques For Nested-data-parallel Languages. Phd thesis, Department Of Computer Science, The University Of Chicago, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. B. So, A. Ghuloum, and Y. Wu. Optimizing data parallel operations on many-core platforms. In STMCS'06: First Workshop on Software Tools for Multi-Core Systems, 2006.Google ScholarGoogle Scholar
  20. D. Spoonhower, G. E. Blelloch, R. Harper, and P. B. Gibbons. Space profiling for parallel functional programs. J. Funct. Program., 20 (5-6), 2010. ISSN 0956-7968. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. Sulzmann, M. Chakravarty, S. Peyton Jones, and K. Donnelly. System F with type equality coercions. In TLDI'07: ACM SIGPLAN International Workshop on Types in Language Design and Implementation. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Vectorisation avoidance

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 47, Issue 12
          Haskell '12
          December 2012
          157 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2430532
          Issue’s Table of Contents
          • cover image ACM Conferences
            Haskell '12: Proceedings of the 2012 Haskell Symposium
            September 2012
            168 pages
            ISBN:9781450315746
            DOI:10.1145/2364506

          Copyright © 2012 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 13 September 2012

          Check for updates

          Qualifiers

          • research-article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!