Skip to content

Loop Transformations: Cutting and Peeling

Frederik Hennig requested to merge fhennig/loop-splitting into backend-rework

This MR introduces a number of loop transformations and their prequesites to the new backend.

  • Add CanonicalClone pass: Clone an AST and duplicate all symbols declared inside it to retain canonicality
  • Add ReshapeLoops pass collection:
    • cut_loop reimplements loop cutting like available through the old pystencils.transformations.cut_loop
    • peel_loop_front implements loop peeling, often the better alternative to cut_loop

Changes on the side:

  • Move canonical duplication of symbols to the KernelCreationContext
  • Add documentation for the transformations module
  • Extend documentation of KernelCreationContext
  • Improved AstFactory interface: introduce parse_index and clarify type hints

To Do:

  • Test cases for loop cutting
  • Test cases for loop peeling
Edited by Frederik Hennig

Merge request reports