使用XLA编译器进行内存安全计算
Memory Safe Computations with XLA Compiler
摘要:
像TensorFlow和PyTorch这样的软件包旨在支持线性代数运算,它们的速度和可用性决定了它们的成功。然而,通过优先考虑速度,他们往往忽略了内存需求。因此,在软件设计方面方便的存储器密集型算法的实现通常由于存储器溢出而不能运行于大问题。内存高效的解决方案需要复杂的编程方法,在计算框架之外具有重要的逻辑。这损害了这种算法的采用和使用。为了解决这个问题,我们开发了一个XLA编译器扩展,根据用户指定的内存限制调整算法的计算数据流表示。我们表明,k-最近邻和稀疏高斯过程回归方法可以在单个设备上以更大的规模运行,而标准实现可能会失败。我们的方法可以更好地利用硬件资源。我们相信,进一步关注在编译器级别消除内存限制将扩大未来可以开发的机器学习方法的范围。
英文摘要:
Software packages like TensorFlow and PyTorch are designed to support linear algebra operations, and their speed and usability determine their success. However, by prioritising speed, they often neglect memory requirements. As a consequence, the implementations of memory-intensive algorithms that are convenient in terms of software design can often not be run for large problems due to memory overflows. Memory-efficient solutions require complex programming approaches with significant logic outside the computational framework. This impairs the adoption and use of such algorithms. To address this, we developed an XLA compiler extension that adjusts the computational data-flow representation of an algorithm according to a user-specified memory limit. We show that k-nearest neighbour and sparse Gaussian process regression methods can be run at a much larger scale on a single device, where standard implementations would have failed. Our approach leads to better use of hardware resources. We believe that further focus on removing memory constraints at a compiler level will widen the range of machine learning methods that can be developed in the future.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。