论文标题

Flint:利用浮点启用整数算术,以进行有效的随机森林推断

FLInt: Exploiting Floating Point Enabled Integer Arithmetic for Efficient Random Forest Inference

论文作者

Hakert, Christian, Chen, Kuan-Hsun, Chen, Jian-Jia

论文摘要

在许多机器学习应用程序(例如基于树的合奏)中,由于其表现力,浮点数被广泛使用。如今,可以从动态数据质量上对嵌入式设备进行数据分析进行数据分析,但是此类系统通常缺乏处理浮点数的硬件功能,为其处理引入了大型开销。即使在一般计算系统中存在此类硬件,使用整数操作而不是浮点操作也有望减少开销并改善性能。 在本文中,我们仅通过使用整数和逻辑操作提供了随机森林的完整精度浮点比较。为了确保相同的功能保留,我们正式证明了此比较的正确性。由于随机森林仅需要在推理过程中比较浮点数,因此我们以低级别的实现实现了\ mdname〜,因此通过保持模型的准确性不变,从而消除了完全浮动点硬件的需求。 \ mdname〜的使用基本上归结为条件的一对一替代:例如,c:if(px [3] <=(float)10.074347)中的比较语句变为if(((((((((((((((((((((int*)),px)),(px)))),(px))))))))))')))))之一次'))))))因为')')')')')''f bemangy:if(px [3] <=(float)10.074347)。 X86和ARMV8桌面和服务器类系统的实验评估表明,使用我们的新方法可以将执行时间最多减少到$ \%$ $。

In many machine learning applications, e.g., tree-based ensembles, floating point numbers are extensively utilized due to their expressiveness. Nowadays performing data analysis on embedded devices from dynamic data masses becomes available, but such systems often lack hardware capabilities to process floating point numbers, introducing large overheads for their processing. Even if such hardware is present in general computing systems, using integer operations instead of floating point operations promises to reduce operation overheads and improve the performance. In this paper, we provide \mdname, a full precision floating point comparison for random forests, by only using integer and logic operations. To ensure the same functionality preserves, we formally prove the correctness of this comparison. Since random forests only require comparison of floating point numbers during inference, we implement \mdname~in low level realizations and therefore eliminate the need for floating point hardware entirely, by keeping the model accuracy unchanged. The usage of \mdname~basically boils down to a one-by-one replacement of conditions: For instance, a comparison statement in C: if(pX[3]<=(float)10.074347) becomes if((*(((int*)(pX))+3))<=((int)(0x41213087))). Experimental evaluation on X86 and ARMv8 desktop and server class systems shows that the execution time can be reduced by up to $\approx 30\%$ with our novel approach.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源