DiffTune: Optimizing CPU Simulator Parameters with Learned Differentiable Surrogates

10/08/2020
by   Alex Renda, et al.
0

CPU simulators are useful tools for modeling CPU execution behavior. However, they suffer from inaccuracies due to the cost and complexity of setting their fine-grained parameters, such as the latencies of individual instructions. This complexity arises from the expertise required to design benchmarks and measurement frameworks that can precisely measure the values of parameters at such fine granularity. In some cases, these parameters do not necessarily have a physical realization and are therefore fundamentally approximate, or even unmeasurable. In this paper we present DiffTune, a system for learning the parameters of x86 basic block CPU simulators from coarse-grained end-to-end measurements. Given a simulator, DiffTune learns its parameters by first replacing the original simulator with a differentiable surrogate, another function that approximates the original function; by making the surrogate differentiable, DiffTune is then able to apply gradient-based optimization techniques even when the original function is non-differentiable, such as is the case with CPU simulators. With this differentiable surrogate, DiffTune then applies gradient-based optimization to produce values of the simulator's parameters that minimize the simulator's error on a dataset of ground truth end-to-end performance measurements. Finally, the learned parameters are plugged back into the original simulator. DiffTune is able to automatically learn the entire set of microarchitecture-specific parameters within the Intel x86 simulation model of llvm-mca, a basic block CPU simulator based on LLVM's instruction scheduling model. DiffTune's learned parameters lead llvm-mca to an average error that not only matches but lowers that of its original, expert-provided parameter values.

READ FULL TEXT
research
12/12/2021

Programming with Neural Surrogates of Programs

Surrogates, models that mimic the behavior of programs, form the basis o...
research
02/11/2020

Differentiating the Black-Box: Optimization with Local Generative Surrogates

We propose a novel method for gradient-based optimization of black-box s...
research
08/31/2017

Differentiable cellular automata

We describe a class of cellular automata (CAs) that are end-to-end diffe...
research
03/19/2022

DiSECt: A Differentiable Simulator for Parameter Inference and Control in Robotic Cutting

Robotic cutting of soft materials is critical for applications such as f...
research
05/25/2021

DiSECt: A Differentiable Simulation Engine for Autonomous Robotic Cutting

Robotic cutting of soft materials is critical for applications such as f...
research
09/18/2021

Probabilistic Inference of Simulation Parameters via Parallel Differentiable Simulation

To accurately reproduce measurements from the real world, simulators nee...
research
12/16/2021

GOSH: Task Scheduling Using Deep Surrogate Models in Fog Computing Environments

Recently, intelligent scheduling approaches using surrogate models have ...

Please sign up or login with your details

Forgot password? Click here to reset