ApX logoApX logo
ModelsCalculatorHardwareCoursesPricing
ApX logoApX logo
ModelsCalculatorHardwareCoursesPricing

All Courses

Compiler Optimizations for Machine Learning
Chapter 1: Anatomy of Deep Learning Compilers
Compilation Pipeline Overview
Computational Graphs and DAGs
Static Single Assignment in ML
High-Level vs Low-Level IR
Hands-on Practical: Inspecting Relay IR
Chapter 2: Graph-Level Transformations
Operator Fusion Strategies
Algebraic Simplification
Layout Transformation
Dead Code and Common Subexpression Elimination
Hands-on Practical: Implementing a Fusion Pass
Chapter 3: Kernel Optimization and Loop Schedules
The Loop Optimization Space
Loop Tiling and Blocking
Vectorization and SIMD
Loop Reordering and Unrolling
Hands-on Practical: Optimizing Matrix Multiplication
Chapter 4: The MLIR Infrastructure
MLIR Architecture and Dialects
The Linalg Dialect
Affine Dialect and Analysis
Pattern Rewriting and Lowering
Hands-on Practical: Creating a Custom Dialect
Chapter 5: Hardware-Aware Code Generation
GPU Memory Hierarchy Mapping
Thread Binding and Warp Divergence
Tensor Core Intrinsics
Shared Memory Banking and Conflicts
Hands-on Practical: Writing Triton Kernels
Chapter 6: Auto-Tuning and Search Spaces
Defining the Search Space
Search Algorithms: Random to Genetic
Machine Learning Cost Models
Ansor and AutoTVM Architecture
Hands-on Practical: Auto-Tuning a ResNet Block

Compiler Optimizations for Machine Learning

Machine learning models require substantial computational resources, necessitating efficient translation from high-level frameworks to machine code. This course examines the architecture and engineering principles behind deep learning compilers such as Apache TVM, XLA, and the MLIR infrastructure. It addresses the transformation pipeline from computational graphs to hardware-specific binaries.

Participants will analyze intermediate representations (IR), graph-level optimizations including operator fusion and layout transformation, and low-level loop optimizations like tiling and vectorization. The curriculum covers the polyhedral model, automatic scheduling strategies, and memory hierarchy management for GPUs and specialized accelerators. Emphasis is placed on the interaction between software logic and hardware constraints to maximize throughput and minimize latency.

Prerequisites Strong Python, ML concepts

Level:

Specialist
  • Intermediate Representations

    Design and manipulate high-level and low-level intermediate representations for tensor computations.

  • Graph Optimization

    Implement graph-level transformations such as operator fusion, constant folding, and dead code elimination.

  • Loop Transformations

    Apply advanced loop optimizations including tiling, unrolling, and reordering to maximize cache locality.

  • MLIR Infrastructure

    Utilize the Multi-Level Intermediate Representation framework to build custom dialects and lowering pipelines.

  • Auto-tuning

    Develop strategies for automated kernel search and cost modeling to find optimal execution schedules.

© 2026 ApX Machine Learning