注册你的森林:通过显式 CPU 寄存器分配优化决策树集成
Register Your Forests: Decision Tree Ensemble Optimization by Explicit CPU Register Allocation
AI总结:
针对工具链抽象导致决策树集成推理中 CPU 寄存器利用不足的问题,提出单步由高级模型直接生成汇编并显式分配寄存器的方法,最高实现约 1.6 倍加速。
摘要:
将高级机器学习模型转化为高效且适配良好的机器实现,通常需要借助一系列工具,例如代码生成器、编译器和优化器。在这类工具链中,不得不引入抽象层,这会导致 CPU 寄存器无法得到最优利用;该缺陷在资源受限的嵌入式环境中尤为突出。本文提出一种面向决策树集成的代码生成方法,可在单个转换步骤中直接从高级模型表示生成机器汇编代码。具体而言,我们开发了多种方法,用于在决策树集成推理时有效地分配寄存器。我们将所提方法与从高级机器学习模型生成基础 C 代码并随后编译的实现进行了广泛评估比较。结果表明,若在合适场景中谨慎应用这些方法,决策树集成推理性能可得到显著提升,最高约为 1.6 倍。
英文摘要:
Bringing high-level machine learning models to efficient and well-suited machine implementations often invokes a bunch of tools, e.g.~code generators, compilers, and optimizers. Along such tool chains, abstractions have to be applied. This leads to not optimally used CPU registers. This is a shortcoming, especially in resource constrained embedded setups. In this work, we present a code generation approach for decision tree ensembles, which produces machine assembly code within a single conversion step directly from the high-level model representation. Specifically, we develop various approaches to effectively allocate registers for the inference of decision tree ensembles. Extensive evaluations of the proposed method are conducted in comparison to the basic realization of C code from the high-level machine learning model and succeeding compilation. The results show that the performance of decision tree ensemble inference can be significantly improved (by up to $\approx1.6\times$), if the methods are applied carefully to the appropriate scenario.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。