skip to main content
research-article
Open Access

UniRec: a unimodular-like framework for nested recursions and loops

Published:31 October 2022Publication History
Skip Abstract Section

Abstract

Scheduling transformations reorder operations in a program to improve locality and/or parallelism. There are mature loop transformation frameworks such as the polyhedral model for composing and applying instance-wise scheduling transformations for loop nests.In recent years, there have been efforts to build frameworks for composing and applying scheduling transformations for nested recursion and loops, but these frameworks cannot employ the full power of transformations for loop nests since they have overly-restrictive representations. This paper describes a new framework, UniRec, that not only generalizes prior frameworks for reasoning about transformations on recursion, but also generalizes the unimodular framework, and hence unifies reasoning about perfectly-nested loops and recursion.

References

  1. [n. d.]. PolyBench: Polyhedral Benchmark Suite. https://web.cse.ohio-state.edu/~pouchet.2/software/polybench/ Accessed: 2022-04-14. Google ScholarGoogle Scholar
  2. Pierre Amiranoff, Albert Cohen, and Paul Feautrier. 2006. Beyond Iteration Vectors: Instancewise Relational Abstract Domains. In Proceedings of the 13th International Conference on Static Analysis (SAS’06). Springer-Verlag, Berlin, Heidelberg. 161–180. isbn:3-540-37756-5, 978-3-540-37756-6 https://doi.org/10.1007/11823230_11 Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Vinayaka Bandishti, Irshad Pananilath, and Uday Bondhugula. 2012. Tiling stencil computations to maximize parallelism. In SC ’12: Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis. 1–11. https://doi.org/10.1109/SC.2012.107 Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Utpal Banerjee. 1991. Unimodular Transformations of Double Loops. In Languages and Compilers for Parallel Computing. Google ScholarGoogle Scholar
  5. Ian J. Bertolacci, Catherine Olschanowsky, Ben Harshbarger, Bradford L. Chamberlain, David G. Wonnacott, and Michelle Mills Strout. 2015. Parameterized Diamond Tiling for Stencil Computations with Chapel Parallel Iterators. In Proceedings of the 29th ACM on International Conference on Supercomputing (ICS ’15). Association for Computing Machinery, New York, NY, USA. 197–206. isbn:9781450335591 https://doi.org/10.1145/2751205.2751226 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Uday Bondhugula, Albert Hartono, J. Ramanujam, and P. Sadayappan. 2008. A Practical Automatic Polyhedral Parallelizer and Locality Optimizer. In Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’08). ACM, New York, NY, USA. 101–113. isbn:978-1-59593-860-2 https://doi.org/10.1145/1375581.1375595 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Stephen Chou and Saman Amarasinghe. 2021. Dynamic Sparse Tensor Algebra Compilation. https://doi.org/10.48550/ARXIV.2112.01394 Google ScholarGoogle Scholar
  8. Paul Feautrier. 1992. Some Efficient Solutions to the Affine Scheduling Problem: I. One-dimensional Time. Int. J. Parallel Program., 21, 5 (1992), Oct., 313–348. issn:0885-7458 https://doi.org/10.1007/BF01407835 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Paul Feautrier. 1992. Some efficient solutions to the affine scheduling problem. Part II. Multidimensional time. International Journal of Parallel Programming, 21, 6 (1992), 01 Dec, 389–420. issn:1573-7640 https://doi.org/10.1007/BF01379404 Google ScholarGoogle ScholarCross RefCross Ref
  10. Paul Iannetta, Laure Gonnord, and Gabriel Radanne. 2021. Parallelizing Structural Transformations on Tarbres. 21. https://hal.inria.fr/hal-03208466 Google ScholarGoogle Scholar
  11. Youngjoon Jo and Milind Kulkarni. 2011. Enhancing Locality for Recursive Traversals of Recursive Structures. In Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA ’11). ACM, New York, NY, USA. 463–482. isbn:978-1-4503-0940-0 https://doi.org/10.1145/2048066.2048104 Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Youngjoon Jo and Milind Kulkarni. 2012. Automatically Enhancing Locality for Tree Traversals with Traversal Splicing. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA ’12). ACM, New York, NY, USA. 355–374. isbn:978-1-4503-1561-6 https://doi.org/10.1145/2384616.2384643 Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Ken Kennedy and John R. Allen. 2001. Optimizing Compilers for Modern Architectures: A Dependence-Based Approach. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA. isbn:1558602860 Google ScholarGoogle Scholar
  14. Ken Kennedy and John R. Allen. 2002. Optimizing Compilers for Modern Architectures: A Dependence-based Approach. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA. isbn:1-55860-286-0 Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Salwa Kobeissi, Alain Ketterlin, and Philippe Clauss. 2020. Rec2Poly: Converting Recursions to Polyhedral Optimized Loops Using an Inspector-Executor Strategy. In Embedded Computer Systems: Architectures, Modeling, and Simulation, Alex Orailoglu, Matthias Jung, and Marc Reichenbach (Eds.). Springer International Publishing, Cham. 96–109. isbn:978-3-030-60939-9 Google ScholarGoogle Scholar
  16. J. R. Larus and P. N. Hilfinger. 1988. Detecting Conflicts Between Structure Accesses. In Proceedings of the ACM SIGPLAN 1988 Conference on Programming Language Design and Implementation (PLDI ’88). ACM, New York, NY, USA. 24–31. isbn:0-89791-269-1 https://doi.org/10.1145/53990.53993 Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. William Pugh. 1991. The Omega Test: A Fast and Practical Integer Programming Algorithm for Dependence Analysis. In Proceedings of the 1991 ACM/IEEE Conference on Supercomputing (Supercomputing ’91). ACM, New York, NY, USA. 4–13. isbn:0-89791-459-7 https://doi.org/10.1145/125826.125848 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. O. Rabin and D. Scott. 1959. Finite Automata and Their Decision Problems. IBM J. Res. Dev., 3, 2 (1959), April, 114–125. issn:0018-8646 https://doi.org/10.1147/rd.32.0114 Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Samyam Rajbhandari, Jinsung Kim, Sriram Krishnamoorthy, Louis-Noel Pouchet, Fabrice Rastello, Robert J. Harrison, and P. Sadayappan. 2016. A Domain-specific Compiler for a Parallel Multiresolution Adaptive Numerical Simulation Environment. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis (SC ’16). IEEE Press, Piscataway, NJ, USA. Article 40, 12 pages. isbn:978-1-4673-8815-3 http://dl.acm.org/citation.cfm?id=3014904.3014958 Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Samyam Rajbhandari, Jinsung Kim, Sriram Krishnamoorthy, Louis-Noël Pouchet, Fabrice Rastello, Robert J. Harrison, and P. Sadayappan. 2016. On Fusing Recursive Traversals of K-d Trees. In Proceedings of the 25th International Conference on Compiler Construction (CC 2016). ACM, New York, NY, USA. 152–162. isbn:978-1-4503-4241-4 https://doi.org/10.1145/2892208.2892228 Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Laith Sakka, Kirshanthan Sundararajah, and Milind Kulkarni. 2017. TreeFuser: A Framework for Analyzing and Fusing General Recursive Tree Traversals. Proc. ACM Program. Lang., 1, OOPSLA (2017), Article 76, Oct., 30 pages. issn:2475-1421 https://doi.org/10.1145/3133900 Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Laith Sakka, Kirshanthan Sundararajah, Ryan R. Newton, and Milind Kulkarni. 2019. Sound, Fine-Grained Traversal Fusion for Heterogeneous Trees. In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2019). Association for Computing Machinery, New York, NY, USA. 830–844. isbn:9781450367127 https://doi.org/10.1145/3314221.3314626 Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Kirshanthan Sundararajah and Milind Kulkarni. 2019. Composable, Sound Transformations of Nested Recursion and Loops. In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2019). Association for Computing Machinery, New York, NY, USA. 902–917. isbn:9781450367127 https://doi.org/10.1145/3314221.3314592 Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Kirshanthan Sundararajah, Laith Sakka, and Milind Kulkarni. 2017. Locality Transformations for Nested Recursive Iteration Spaces. SIGPLAN Not., 52, 4 (2017), April, 281–295. issn:0362-1340 https://doi.org/10.1145/3093336.3037720 Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Ivan Šimeček, Claudio Kozický, Daniel Langr, and Pavel Tvrdík. 2020. Space-Efficient k-d Tree-Based Storage Format for Sparse Tensors. In Proceedings of the 29th International Symposium on High-Performance Parallel and Distributed Computing (HPDC ’20). Association for Computing Machinery, New York, NY, USA. 29–33. isbn:9781450370523 https://doi.org/10.1145/3369583.3392692 Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Yusheng Weijiang, Shruthi Balakrishna, Jianqiao Liu, and Milind Kulkarni. 2015. Tree Dependence Analysis. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’15). ACM, New York, NY, USA. 314–325. isbn:978-1-4503-3468-6 https://doi.org/10.1145/2737924.2737972 Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Michael Wolfe. 1986. Loop Skewing: The Wavefront Method Revisited. Int. J. Parallel Program., 15, 4 (1986), Oct., 279–293. issn:0885-7458 https://doi.org/10.1007/BF01407876 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. UniRec: a unimodular-like framework for nested recursions and loops

        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 Proceedings of the ACM on Programming Languages
          Proceedings of the ACM on Programming Languages  Volume 6, Issue OOPSLA2
          October 2022
          1932 pages
          EISSN:2475-1421
          DOI:10.1145/3554307
          Issue’s Table of Contents

          Copyright © 2022 Owner/Author

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 31 October 2022
          Published in pacmpl Volume 6, Issue OOPSLA2

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article
        • Article Metrics

          • Downloads (Last 12 months)185
          • Downloads (Last 6 weeks)25

          Other Metrics

        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!