A major challenge in the deployment of scientific software solutions is the adaptation of research prototypes to production-grade code. While high-level languages like MATLAB are useful for rapid prototyping, they lack the resource efficiency required for scalable production applications, necessitating translation into lower level languages like C++. Further, for machine learning and signal processing applications, the underlying linear algebra primitives, generally provided by the standard BLAS and LAPACK libraries, are unwieldy and difficult to use, requiring manual memory management and other tedium. To address this challenge, the Armadillo C++ linear algebra library provides an intuitive interface for writing linear algebra expressions that are easily compiled into efficient production-grade implementations. We describe the expression optimisations we have implemented in Armadillo, exploiting template metaprogramming. We demonstrate that these optimisations result in considerable efficiency gains on a variety of benchmark linear algebra expressions.


翻译:科学软件解决方案部署中的一个主要挑战是将研究原型适配为生产级代码。虽然如MATLAB这样的高级语言适用于快速原型开发,但它们缺乏可扩展生产应用所需的资源效率,因此需要转换为如C++这样的低级语言。此外,对于机器学习和信号处理应用,通常由标准BLAS和LAPACK库提供的底层线性代数原语使用笨拙且困难,需要手动内存管理和其他繁琐操作。为应对这一挑战,Armadillo C++线性代数库提供了一个直观的接口,用于编写易于编译为高效生产级实现的线性代数表达式。我们描述了在Armadillo中利用模板元编程实现的表达式优化技术。我们证明这些优化在各种基准线性代数表达式中带来了显著的效率提升。

0
下载
关闭预览

相关内容

线性代数(Linear Algebra)是数学的一个分支,它的研究对象是向量,向量空间(或称线性空间),线性变换和有限维的线性方程组。向量空间是现代数学的一个重要课题;因而,线性代数被广泛地应用于抽象代数和泛函分析中;通过解析几何,线性代数得以被具体表示。线性代数的理论已被泛化为算子理论。由于科学研究中的非线性模型通常可以被近似为线性模型,使得线性代数被广泛地应用于自然科学和社会科学中。 - 题图来自「维基百科」。
【Google大脑Mangpo】自动调优生产机器学习编译器
专知会员服务
14+阅读 · 2022年7月6日
综述:军事应用中使用的一些重要算法
专知
12+阅读 · 2022年7月3日
【干货】​深度学习中的线性代数
专知
21+阅读 · 2018年3月30日
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关VIP内容
【Google大脑Mangpo】自动调优生产机器学习编译器
专知会员服务
14+阅读 · 2022年7月6日
相关基金
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员