DiffTune: Optimizing CPU Simulator Parameters with Learned Differentiable Surrogates
© 2020 IEEE. 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 de...
Main Authors: | , , , |
---|---|
Other Authors: | |
Format: | Article |
Language: | English |
Published: |
Institute of Electrical and Electronics Engineers (IEEE)
2022
|
Online Access: | https://hdl.handle.net/1721.1/142895 |
_version_ | 1826205985791803392 |
---|---|
author | Renda, Alex Chen, Yishen Mendis, Charith Carbin, Michael |
author2 | Massachusetts Institute of Technology. Computer Science and Artificial Intelligence Laboratory |
author_facet | Massachusetts Institute of Technology. Computer Science and Artificial Intelligence Laboratory Renda, Alex Chen, Yishen Mendis, Charith Carbin, Michael |
author_sort | Renda, Alex |
collection | MIT |
description | © 2020 IEEE. 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. |
first_indexed | 2024-09-23T13:22:11Z |
format | Article |
id | mit-1721.1/142895 |
institution | Massachusetts Institute of Technology |
language | English |
last_indexed | 2024-09-23T13:22:11Z |
publishDate | 2022 |
publisher | Institute of Electrical and Electronics Engineers (IEEE) |
record_format | dspace |
spelling | mit-1721.1/1428952023-06-22T14:45:03Z DiffTune: Optimizing CPU Simulator Parameters with Learned Differentiable Surrogates Renda, Alex Chen, Yishen Mendis, Charith Carbin, Michael Massachusetts Institute of Technology. Computer Science and Artificial Intelligence Laboratory Massachusetts Institute of Technology. Department of Electrical Engineering and Computer Science © 2020 IEEE. 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. 2022-06-07T12:49:09Z 2022-06-07T12:49:09Z 2020 2022-06-07T12:41:49Z Article http://purl.org/eprint/type/ConferencePaper https://hdl.handle.net/1721.1/142895 Renda, Alex, Chen, Yishen, Mendis, Charith and Carbin, Michael. 2020. "DiffTune: Optimizing CPU Simulator Parameters with Learned Differentiable Surrogates." Proceedings of the Annual International Symposium on Microarchitecture, MICRO, 2020-October. en 10.1109/MICRO50266.2020.00045 Proceedings of the Annual International Symposium on Microarchitecture, MICRO Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International https://creativecommons.org/licenses/by-nc-sa/4.0/ application/pdf Institute of Electrical and Electronics Engineers (IEEE) arXiv |
spellingShingle | Renda, Alex Chen, Yishen Mendis, Charith Carbin, Michael DiffTune: Optimizing CPU Simulator Parameters with Learned Differentiable Surrogates |
title | DiffTune: Optimizing CPU Simulator Parameters with Learned Differentiable Surrogates |
title_full | DiffTune: Optimizing CPU Simulator Parameters with Learned Differentiable Surrogates |
title_fullStr | DiffTune: Optimizing CPU Simulator Parameters with Learned Differentiable Surrogates |
title_full_unstemmed | DiffTune: Optimizing CPU Simulator Parameters with Learned Differentiable Surrogates |
title_short | DiffTune: Optimizing CPU Simulator Parameters with Learned Differentiable Surrogates |
title_sort | difftune optimizing cpu simulator parameters with learned differentiable surrogates |
url | https://hdl.handle.net/1721.1/142895 |
work_keys_str_mv | AT rendaalex difftuneoptimizingcpusimulatorparameterswithlearneddifferentiablesurrogates AT chenyishen difftuneoptimizingcpusimulatorparameterswithlearneddifferentiablesurrogates AT mendischarith difftuneoptimizingcpusimulatorparameterswithlearneddifferentiablesurrogates AT carbinmichael difftuneoptimizingcpusimulatorparameterswithlearneddifferentiablesurrogates |