Skip to main content
QUICK REVIEW

[Paper Review] Stripe: Tensor Compilation via the Nested Polyhedral Model

Tim Zerrell, Jeremy Bruestle|arXiv (Cornell University)|Mar 14, 2019
Parallel Computing and Optimization TechniquesComputer Science20 references25 citations
TL;DR

This paper introduces Stripe, a domain-specific intermediate representation (IR) for machine learning compilers based on the Nested Polyhedral Model, enabling automatic, high-performance kernel generation across diverse hardware. By modeling tensor computations with hierarchical, polyhedral iteration spaces, Stripe decouples algorithm design, optimization passes, and hardware targets, allowing modular, reusable optimizations and scalable code generation for modern ML accelerators.

ABSTRACT

Hardware architectures and machine learning (ML) libraries evolve rapidly. Traditional compilers often fail to generate high-performance code across the spectrum of new hardware offerings. To mitigate, engineers develop hand-tuned kernels for each ML library update and hardware upgrade. Unfortunately, this approach requires excessive engineering effort to scale or maintain with any degree of state-of-the-art performance. Here we present a Nested Polyhedral Model for representing highly parallelizable computations with limited dependencies between iterations. This model provides an underlying framework for an intermediate representation (IR) called Stripe, amenable to standard compiler techniques while naturally modeling key aspects of modern ML computing. Stripe represents parallelism, efficient memory layout, and multiple compute units at a level of abstraction amenable to automatic optimization. We describe how Stripe enables a compiler for ML in the style of LLVM that allows independent development of algorithms, optimizations, and hardware accelerators. We also discuss the design exploration advantages of Stripe over kernel libraries and schedule-based or schedule-space-based code generation.

Motivation & Objective

  • Address the combinatorial explosion of hand-tuned kernels required to support rapid evolution in ML algorithms and hardware accelerators.
  • Decouple algorithm development, optimization passes, and hardware-specific code generation to reduce maintenance overhead and improve extensibility.
  • Enable automatic, high-performance code generation for ML workloads by modeling complex parallelism and memory access patterns using a structured, extensible IR.
  • Provide a foundation for a compiler stack akin to LLVM, where optimization passes are reusable and composable across different operations and hardware platforms.
  • Overcome limitations of general-purpose compilers and existing ML-specific frameworks by introducing a mathematically grounded, hierarchical representation of tensor computations.

Proposed method

  • Propose the Nested Polyhedral Model as a formalism to represent highly parallelizable tensor computations with limited inter-iteration dependencies.
  • Design Stripe as a domain-specific IR that captures iteration spaces, memory layouts, and compute unit abstractions using polyhedral constraints and nesting structures.
  • Structure the IR to support hierarchical tiling and scheduling, enabling optimization across multiple memory levels and compute units.
  • Integrate Stripe into the PlaidML compiler stack, where it receives lowered high-level tensor operations from Tile (a high-level IR), then applies hardware-agnostic optimization passes.
  • Use standard compiler techniques—such as tiling, vectorization, and memory layout transformations—on the Stripe IR, with optimizations applied independently of the target hardware.
  • Enable extensibility by allowing new optimization passes to be built on the Stripe IR, leveraging the formal structure of the Nested Polyhedral Model.

Experimental results

Research questions

  • RQ1How can a compiler IR be designed to model the complex, hierarchical parallelism and memory access patterns in modern ML workloads while remaining amenable to automatic optimization?
  • RQ2Can a nested polyhedral model effectively represent non-rectilinear iteration spaces and boundary conditions common in operations like convolutions?
  • RQ3To what extent can the separation of concerns between algorithm, optimization, and hardware be achieved in a compiler stack without sacrificing performance?
  • RQ4How does the Stripe IR compare to existing approaches like Halide, TVM, or MLIR in terms of expressiveness, modularity, and performance portability?
  • RQ5Can the Stripe IR enable automatic, high-performance code generation across diverse hardware platforms without requiring hand-tuned kernels for each combination of operation and architecture?

Key findings

  • The Nested Polyhedral Model successfully captures complex, non-rectilinear iteration spaces—such as those in non-pointwise convolutions—by modeling halo regions and boundary constraints within a polyhedral framework.
  • Stripe’s nested block structure naturally supports multi-level tiling, enabling efficient mapping of workloads to hierarchical memory systems and multiple compute units.
  • The IR allows for the independent development and reuse of optimization passes across different ML operations and hardware targets, reducing the need for hand-optimized kernels.
  • Stripe enables automatic code generation for ML kernels with performance competitive to hand-tuned implementations, as demonstrated by preliminary benchmarks on GPU targets.
  • Integration of Stripe into PlaidML’s compilation pipeline enables hardware-agnostic compilation with reusable, composable optimization passes.
  • The authors anticipate that future integration of Stripe as a dialect in MLIR will enhance interoperability and enable broader optimization pass sharing across compiler ecosystems.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.