Introduce iteration axes system

This MR introduces the iteration axes system, a major refactoring to the way iteration spaces are built in pystencils' backend.

Iteration axes are an extension to the IR to represent a kernel's iteration strategy as a tree of AST nodes. An iteration space is first represented by a cube of axes, which is gradually expanded into specific axis types (loop, parallel loop, GPU block/thread, SIMD, ...). This approach replaces the materialize_iteration_space functionality from the Platform class, permitting much more flexibility in defining iteration strategies.

Ispace materialization through iteration axis has three phases:

  • Creation of the axes cube
  • Expansion of the cube into a tree of abstract axes according to an iteration strategy
  • Materialization of these axes to lower-level IR constructs, such as loops, #pragmas and SIMD arithmetic

This MR introduces the fundamental infrastructure and migrates iteration space materialization for CPU targets to the new system. GPU targets will follow in another MR in the near future.

Contributions

  • Implement iteration axis classes in backend.ast.axes: loops, parallel loops, SIMD
  • Extend AstFactory to generate axis structures
  • Modify various transformation passes to accomodate axes
  • Extend loop-invariant code motion to arbitrary axes
  • Implement axis expansion strategies
  • Implement axis materialization
  • Remove LoopVectorizer in favor of axis-based creation of SIMD loops
  • Significantly refactor DefaultKernelCreationDriver to accomodate axis-based ispace materialization
  • Write a backend walkthrough guide for the docs

Bugfixes

Edited by Frederik Hennig

Merge request reports

Loading