Visual summary of operating lessons from Jonathan Ragan-Kelley.

Lessons from Jonathan Ragan-Kelley

Jonathan Ragan-Kelley is an MIT computer scientist whose research develops programming languages and compilers for high-performance visual and machine-learning systems. He co-created Halide, which separates an image-processing algorithm from the schedule used to map it to hardware. — MIT CSAIL Interview.

Part 1: The Twilight of Moore's Law

  1. On Hardware Divergence: Ragan-Kelley argues that programming approaches must change to exploit increasingly complex hardware for visual computing. — MIT CSAIL Interview.
  2. On the End of Free Speed: As the benefits of Moore's law decline, performance gains depend more on how computation is organized for locality and parallelism. — SNAPL Invited Talk.
  3. On Hardware Specialization: The move beyond general-purpose processors toward specialized accelerators makes hardware-conscious programming more important. — MIT CSAIL Interview.
  4. On Programmer Burden: Domain-specific languages can expose useful control over complex hardware without forcing every application to be written at a low level. — MIT CSAIL Interview.
  5. On Data Movement: In the thesis's hardware comparison, communication and storage can cost substantially more energy than arithmetic, making data movement a central optimization concern. — Ragan-Kelley Thesis.
  6. On Giving Hardware What It Wants: Fast implementations depend not just on the algorithm but on execution order, granularity and data placement on a particular machine. — SNAPL Invited Talk.
  7. On Execution Organization: For the same algorithm and hardware, changing execution order, granularity or data placement can change performance by an order of magnitude. — SNAPL Invited Talk.
  8. On Tooling for Accelerators: Exocompilation moves target-specific compiler support and optimization policy into user libraries to accommodate diverse accelerators. — Exocompilation PLDI Paper.

Part 2: The Philosophy of Halide

  1. On Separation of Concerns: Halide describes an image-processing algorithm separately from the schedule that determines how it executes. — Halide SIGGRAPH Paper.
  2. On the Definition of a Schedule: A Halide schedule controls choices such as tiling, fusion, storage, recomputation, vectorization and parallel execution. — Halide SIGGRAPH Paper.
  3. On Cross-Platform Portability: The same Halide algorithm can be paired with different schedules for ARM, x86 and GPU targets. — Halide SIGGRAPH Paper.
  4. On Avoiding Rewrites: Hand-tuned C or CUDA image pipelines can entangle algorithm logic with machine-specific optimization, making code harder to maintain and port. — Halide PLDI Paper.
  5. On Domain-Specific Representation: Halide represents image-pipeline stages and their dependencies so the compiler can explore implementation choices separately from the algorithm. — Halide PLDI Paper.
  6. On Pipeline Complexity: The paper's local-Laplacian example contains 99 stages, illustrating why manually tuning a multistage image pipeline is difficult. — Halide PLDI Paper.
  7. On Search Spaces: Separating the schedule makes it possible to search alternative implementations; the original Halide study combined its compiler with stochastic schedule search. — Halide PLDI Paper.
  8. On Modularity: Keeping schedule choices separate from image-processing stages helps preserve composability while allowing hardware-specific tuning. — Halide SIGGRAPH Paper.
  9. On Industry Adoption: MIT reports that Halide has been used in Adobe Photoshop; that adoption is a concrete application of the algorithm-and-schedule approach, not proof of a universal developer preference. — MIT CSAIL Interview.

Part 3: Locality, Parallelism, and Redundancy

  1. On the Fundamental Tension: Stencil pipelines force tradeoffs among parallelism, locality and redundant computation; no single schedule optimizes all three automatically. — Halide PLDI Paper.
  2. On Recompute Versus Store: For some image pipelines, recomputing an intermediate value can be preferable to moving it to and from memory; the choice depends on the schedule and machine. — Ragan-Kelley Thesis.
  3. On Tile Sizing: Tile size balances reuse and storage against redundant work and parallel scheduling overhead in the thesis's stencil example. — Ragan-Kelley Thesis.
  4. On Producer-Consumer Relationships: Fusing producer and consumer stages can improve locality, but stencil boundaries can introduce redundant work. — Halide PLDI Paper.
  5. On Granularity: Coarser tiles can reduce scheduling overhead and redundant computation, while smaller tiles can improve locality and storage footprint. — Ragan-Kelley Thesis.
  6. On Memory Hierarchy: Halide schedules target SIMD units, multicore processors and complex memory hierarchies rather than assuming one machine-independent layout. — Halide SIGGRAPH Paper.
  7. On Synchronization Costs: Synchronization is one of the costs that must be weighed when scheduling parallel stencil pipelines. — Halide PLDI Paper.
  8. On Data Layouts: Halide's RGB tutorial uses different schedules for planar and interleaved image layouts, including layout-aware vectorization and loop reordering. — Halide RGB Layout Tutorial.

Part 4: Exo and User-Schedulable Languages

  1. On Compiler Heuristics: Exocompilation gives programmers a way to supply target-specific optimization policy when a fixed compiler cannot anticipate every accelerator. — Exocompilation PLDI Paper.
  2. On User-Schedulable Languages: Exo 2 exposes scheduling operations as user-defined library constructs rather than confining all transformations inside the compiler. — Exo 2 Paper.
  3. On Safe Rewriting: Exo's scheduling rewrites are designed to preserve program equivalence and memory safety as users specialize kernels. — Exocompilation PLDI Paper.
  4. On Accelerator Kernels: The Exo study demonstrates high-performance matrix-multiplication and convolution kernels on its selected accelerator and x86 targets, without claiming universal superiority to assembly. — Exocompilation PLDI Paper.
  5. On Hardware Accelerators: Exo lets user libraries specify accelerator instructions, specialized memories and state needed by a target machine. — Exocompilation PLDI Paper.
  6. On Reusability: The Exo 2 study reuses user-defined scheduling operations across a library of more than 80 kernels. — Exo 2 Paper.
  7. On Reducing Boilerplate: In the Exo 2 study, a reusable scheduling library cut total scheduling code by an order of magnitude across more than 80 kernels while maintaining competitive performance on three platforms. — Exo 2 Paper.

Part 5: Visual Computing and Graphics

  1. On Computational Photography: Modern image-processing applications depend on multistage software pipelines whose implementation choices shape practical performance. — Halide PLDI Paper.
  2. On Real-Time Visual Computing: The thesis identifies real-time light-field imaging among richer visual applications that would require far more computation than existing systems provided. — Ragan-Kelley Thesis.
  3. On Image Dimensions: The performance demands of image pipelines grow with resolution and application complexity, requiring attention to memory and scheduling rather than only arithmetic throughput. — Halide PLDI Paper.
  4. On Stencil Computations: Many image-processing stages are stencils in which each output depends on neighboring input values. — Halide PLDI Paper.
  5. On Data Parallelism: Image pipelines expose data-parallel work that Halide can schedule across multicore CPUs and GPUs. — Halide PLDI Paper.
  6. On Multi-Stage Processing: The Halide paper uses camera and image-processing examples to show why processing a photograph involves multiple dependent stages. — Halide PLDI Paper.
  7. On Edge Cases: Halide's functional pipeline representation and bounds inference help manage boundary conditions and guard bands in tiled image processing. — Halide PLDI Paper.
  8. On Domain Expertise: Ragan-Kelley's languages aim to let developers express visual or tensor computations while separately adapting execution to complex hardware. — MIT CSAIL Interview.

Part 6: Verification and Tensor Programs

  1. On Tensor Computation: The ATL compiler research treats tensors as a programming domain where computation and storage order can be separated for optimization. — Verified Tensor Compiler Paper.
  2. On Formal Verification: The ATL compiler paper proves correctness for its specified compilation pipeline rather than assuming optimization preserves the tensor program's meaning. — Verified Tensor Compiler Paper.
  3. On Functional Tensor Languages: ATL is a pure functional tensor language whose reshape operators separate computation from storage choices in the verified compiler study. — Verified Tensor Compiler Paper.
  4. On Soundness Bugs: The verified ATL compiler work identified a soundness bug in an earlier compilation algorithm, showing why correctness checks matter for this compiler—not proving neural-network accuracy was degraded. — Verified Tensor Compiler Paper.
  5. On Verified Scheduling Rewrites: A Coq-based framework checks that high-level scheduling rewrites preserve the semantics of the studied functional tensor language. — Verified Tensor-Rewrites Paper.
  6. On Matrix Multiplication: The Exo paper demonstrates matrix-multiplication kernels for selected accelerator and AVX-512 targets using user-controlled scheduling. — Exocompilation PLDI Paper.

Part 7: Sparsity and Spatial Architectures

  1. On Sparse Visual Data: Taichi targets spatially sparse 3D visual data, where avoiding work on empty regions can be valuable for simulation and rendering. — Taichi Paper.
  2. On Irregular Computation: Hierarchical sparse structures in visual-computing workloads create irregular traversal and data-management costs. — Taichi Paper.
  3. On Spatial Accelerators: The coauthored Gemmini study models DNN accelerators with spatial arrays of parallel execution units and evaluates them together with software and SoC resources. — Gemmini DAC Paper.
  4. On Locality in Sparsity: Taichi lets programmers choose hierarchical sparse data structures separately from computation so generated kernels can exploit useful locality and sparsity. — Taichi Paper.
  5. On the Taichi Project: Taichi separates high-level computation from sparse data-structure choices and compiles the result for CPU and GPU execution. — Taichi Paper.
  6. On Mesh Computing: The coauthored GPU mesh-autodiff work exploits the local sparsity of triangle-mesh energy functions to compute derivatives efficiently. — GPU Mesh Autodiff Paper.
  7. On Communication Distance: The thesis's 45nm energy comparison shows that moving data farther through the memory hierarchy can cost much more than computing on it locally. — Ragan-Kelley Thesis.
  8. On Sparse Tensor Proofs: A coauthored formal framework models sparse tensor formats and proves semantic equivalence for the optimized sparse-structure programs it studies. — Sparse Tensor Verification Paper.

Part 8: The Future of High-Performance Systems

  1. On Organization as a First-Class Concern: Ragan-Kelley argues that languages should treat computation organization—including ordering, granularity and placement—as a first-class concern. — SNAPL Invited Talk.
  2. On the Role of the Programmer: Halide lets programmers describe the algorithm and specify a schedule while its compiler generates machine-targeted implementation code. — Halide SIGGRAPH Paper.
  3. On Learned Schedule Search: A coauthored Halide autoscheduler uses beam search and a learned cost model; on its benchmarks, it outperformed earlier scheduling methods and human experts on average. — Halide Autoscheduler Paper.