Core of TVM Unity's ML-Driven Optimization: Learning-Based Cost Modeling

TVM Unity's search strategy is driven by a novel learning-based cost modeling method. This approach enables rapid exploration of code optimizations across the expanded, unified search space created by breaking down traditional compiler layer boundaries, ultimately minimizing computational cost.

The top 3

  1. Top ML Models Powering TVM's Cost Prediction: TVM Unity's learning-based cost modeling primarily leverages XGBoost (`XGBModel`) as its default machine learning model to predict schedule performance, with Multi-Layer Perceptron (`MLPModel`) as an alternative, significantly reducing the need for extensive hardware measurements.
  2. ML Cost Model's Efficiency Edge: Billions of Configurations: The learning-based cost model in TVM Unity is critical for efficiency, as it navigates search spaces for optimal schedules that can contain hundreds of millions to billions of configurations, making exhaustive on-device testing impractical.
  3. Cost Model: The Scoring Function for Auto-Tuning: At its core, TVM Unity's learning-based cost model acts as a 'scoring function' within the auto-tuning process, assigning predicted performance scores to schedule candidates to guide search algorithms like evolutionary search, thereby accelerating the discovery of optimal code optimizations.

Sources

Open the full topic