arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2204.02013cs.LGcs.ARcs.PL
收藏

RL4ReAl:用于寄存器分配的强化学习

RL4ReAl: Reinforcement Learning for Register Allocation

IIT Hyderabad(印度理工学院海得拉巴分校);Google(谷歌)

S. VenkataKeerthy, Siddharth Jain, Anilava Kundu, Rohit Aggarwal, Albert Cohen, Ramakrishna Upadrasta

摘要:

我们的目标是利用机器学习,将寄存器分配方面数十年的研究和经验自动化。我们通过在LLVM中嵌入多智能体强化学习算法来解决这个问题,并使用最先进的技术对其进行训练。我们形式化的约束,精确地定义了一个给定的推理集架构的问题,同时确保生成的代码保留语义的正确性。我们还开发了一个基于gRPC的框架,提供了一个模块化的和高效的编译器接口的培训和推理。我们的方法是架构独立的:我们展示了针对Intel x86和ARM AArch64的实验结果。我们的结果匹配或优于LLVM的大量调优的生产级寄存器分配器。

英文摘要:

We aim to automate decades of research and experience in register allocation, leveraging machine learning. We tackle this problem by embedding a multi-agent reinforcement learning algorithm within LLVM, training it with the state of the art techniques. We formalize the constraints that precisely define the problem for a given instruction-set architecture, while ensuring that the generated code preserves semantic correctness. We also develop a gRPC based framework providing a modular and efficient compiler interface for training and inference. Our approach is architecture independent: we show experimental results targeting Intel x86 and ARM AArch64. Our results match or out-perform the heavily tuned, production-grade register allocators of LLVM.

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

↑