Surrogates, models that mimic the behavior of programs, form the basis of a variety of development workflows. We study three surrogate-based design patterns, evaluating each in case studies on a large-scale CPU simulator. With surrogate compilation, programmers develop a surrogate that mimics the behavior of a program to deploy to end-users in place of the original program. Surrogate compilation accelerates the CPU simulator under study by $1.6\times$. With surrogate adaptation, programmers develop a surrogate of a program then retrain that surrogate on a different task. Surrogate adaptation decreases the simulator's error by up to $50\%$. With surrogate optimization, programmers develop a surrogate of a program, optimize input parameters of the surrogate, then plug the optimized input parameters back into the original program. Surrogate optimization finds simulation parameters that decrease the simulator's error by $5\%$ compared to the error induced by expert-set parameters. In this paper we formalize this taxonomy of surrogate-based design patterns. We further describe the programming methodology common to all three design patterns. Our work builds a foundation for the emerging class of workflows based on programming with surrogates of programs.
翻译:代理机器人, 模拟程序行为的模式, 形成各种开发工作流程的基础。 我们研究三个基于代理程序的设计模式, 在大型 CPU 模拟器的案例研究中对每个方案进行评价。 在代理程序编译过程中, 程序员开发一个代理程序, 模拟程序向终端用户部署的程序的行为, 取代原始程序。 代理程序编译过程加速了正在研究的 CPU 模拟器, 费用为 $ $ 6 / times 。 随着代理程序的调整, 程序员开发了一个代用程序, 然后对替代不同任务的程序进行再处理。 代用程序将模拟器的错误降低到50 $ 。 通过代理程序优化程序, 程序员开发了一个代理程序, 优化代用程序的投入参数, 然后将优化的输入参数插回原始程序。 代用模拟参数发现模拟参数, 将模拟器错误减少5 $ 。 与专家设定的参数相比, 程序设计器的再重新配置。 在本文中, 我们正式将模拟模拟器模拟器错误的误差减少为50 。 。 。 模拟程序的新设计模型设计模式 构建了我们基于 的常规设计方法的通用设计方法。