arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1211.0557cs.PFcs.PL
收藏

随机超优化

Stochastic Superoptimization

Eric Schkufza, Rahul Sharma, Alex Aiken

摘要:

我们制定了无循环,二进制超优化任务作为一个随机搜索问题。转换正确性和性能改进的竞争约束被编码为成本函数中的项,并且使用马尔可夫链蒙特卡罗采样器来快速探索所有可能的程序的空间,以找到一个是给定目标程序的优化。虽然我们的方法牺牲了完整性,但我们能够推理的程序的范围以及我们产生的程序的质量远远超过现有的超级优化器。从二进制文件编译开始,由llvm -O 0为64位X86,我们的原型实现,斯托克,能够产生程序,无论是匹配或优于gcc产生的代码序列与充分的优化启用,并在某些情况下,专家手写汇编。

英文摘要:

We formulate the loop-free, binary superoptimization task as a stochastic search problem. The competing constraints of transformation correctness and performance improvement are encoded as terms in a cost function, and a Markov Chain Monte Carlo sampler is used to rapidly explore the space of all possible programs to find one that is an optimization of a given target program. Although our method sacrifices com- pleteness, the scope of programs we are able to reason about, and the quality of the programs we produce, far exceed those of existing superoptimizers. Beginning from binaries com- piled by llvm -O0 for 64-bit X86, our prototype implemen- tation, STOKE, is able to produce programs which either match or outperform the code sequences produced by gcc with full optimizations enabled, and, in some cases, expert handwritten assembly.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑