skip to main content
10.1145/2636228.2636235acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Fusing filters with integer linear programming

Published:03 September 2014Publication History

ABSTRACT

The key to compiling functional, collection oriented array programs into efficient code is to minimise memory traffic. Simply fusing subsequent array operations into a single computation is not sufficient; we also need to cluster separate traversals of the same array into a single traversal. Previous work demonstrated how Integer Linear Programming (ILP) can be used to cluster the operators in a general data-flow graph into subgraphs, which can be individually fused. However, these approaches can only handle operations which preserve the size of the array, thereby missing out on some optimisation opportunities. This paper addresses this shortcoming by extending the ILP approach with support for size-changing operations, using an external ILP solver to find good clusterings.

References

  1. Thomas J. Ashby and Michael F. P. O'Boyle. Iterative collective loop fusion. In CC: Compiler Construction, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Mohamed-Walid Benabderrahmane, Louis-Noël Pouchet, Albert Cohen, and Cédric Bastoul. The polyhedral model is more widely applicable than you think. In CC: Compiler Construction, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Siddhartha Chatterjee. Compiling nested data-parallel programs for shared-memory multiprocessors. TOPLAS: Transactions on Programming Languages and Systems, 15(3), 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Siddhartha Chatterjee, Guy E. Blelloch, and Allan L. Fisher. Size and access inference for data-parallel programs. In PLDI: Programming Language Design and Implementation, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Duncan Coutts, Roman Leshchinskiy, and Don Stewart. Stream fusion: from lists to streams to nothing at all. In ICFP: International Conference on Functional Programming, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Alain Darte. On the complexity of loop fusion. In PACT: Parallel Architectures and Compilation Techniques, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Alain Darte and Guillaume Huard. New results on array contraction. In ASAP, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Guang R. Gao, R. Olsen, Vivek Sarkar, and Radhika Thekkath. Collective loop fusion for array contraction. In LCPC: Languages and Compilers for Parallel Computing, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Andrew Gill, John Launchbury, and Simon L Peyton Jones. A short cut to deforestation. In Proceedings of the conference on Functional programming languages and computer architecture. ACM, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Gabriele Keller, Manuel M. T. Chakravarty, Roman Leshchinskiy, Simon L. Peyton Jones, and Ben Lippmeier. Regular, shape-polymorphic, parallel arrays in Haskell. In ICFP: International Conference on Functional Programming, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Ken Kennedy. Fast greedy weighted fusion. International Journal of Parallel Programming, 29(5), 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Ben Lippmeier, Manuel M. T. Chakravarty, Gabriele Keller, and Amos Robinson. Data flow fusion with series expressions in Haskell. In Haskell Symposium, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Nimrod Megiddo and Vivek Sarkar. Optimal weighted loop fusion for parallel programs. In SPAA: Symposium on Parallel Algorithms and Architectures, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Martin Odersky, Martin Sulzmann, and Martin Wehr. Type inference with constrained types. TAPOS, 5(1), 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Louis-Noël Pouchet, Uday Bondhugula, Cédric Bastoul, Albert Cohen, J. Ramanujam, and P. Sadayappan. Combined iterative and model-driven optimization in an automatic parallelization framework. In SC: High Performance Computing, Networking, Storage and Analysis, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Louis-Noël Pouchet, Uday Bondhugula, Cédric Bastoul, Albert Cohen, J. Ramanujam, P. Sadayappan, and Nicolas Vasilache. Loop transformations: convexity, pruning and optimization. In POPL: Principles of Programming Languages, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Tiark Rompf, Arvind K Sujeeth, Nada Amin, Kevin J Brown, Vojin Jovanovic, HyoukJoong Lee, Manohar Jonnalagedda, Kunle Olukotun, and Martin Odersky. Optimizing data structures in high-level programs: new directions for extensible compilers based on staging. In ACM SIGPLAN Notices, volume 48, pages 497--510. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Yonghong Song, Rong Xu, Cheng Wang, and Zhiyuan Li. Improving data locality by array contraction. IEEE Transactions on Computers, 53(9), 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Anand Venkat, Manu Shantharam, Mary W. Hall, and Michelle Mills Strout. Non-affine extensions to polyhedral code generation. In CGO: Code Generation and Optimization, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Fusing filters with integer linear programming

    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
    • Published in

      cover image ACM Conferences
      FHPC '14: Proceedings of the 3rd ACM SIGPLAN workshop on Functional high-performance computing
      September 2014
      116 pages
      ISBN:9781450330404
      DOI:10.1145/2636228

      Copyright © 2014 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 3 September 2014

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      FHPC '14 Paper Acceptance Rate10of11submissions,91%Overall Acceptance Rate18of25submissions,72%

      Upcoming Conference

      ICFP '24

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader