期刊文献+

面向RISC-V的基础数学库实现

Basic Math Library Implementation for RISC-V
下载PDF
导出
摘要 RISC-V指令集架构(Instruction Set Architecture,ISA)作为一种新兴的精简ISA,因免费、开源、自由等特点而得到快速发展.由于国内外对RISC-V的研究主要集中在硬件开发,软件生态相较于成熟ISA还很薄弱,实现一套RISC-V指令集高性能基础数学库可以进一步丰富RISC-V软件生态.本文基于自动化移植技术实现申威数学库到RISC-V的移植,为RISC-V指令架构提供首个使用向量指令优化的基础数学库系统.本文提出向量寄存器自动分支查表法与路径标记插入法,重点解决不同架构间寄存器映射过程中的寄存器复用问题,实现寄存器正确高效映射,并依据不同指令等价转换策略自动化移植数学函数69个.测试结果表明,RISC-V基础数学库函数可实现正确计算,最大误差为1.90ULP,函数性能平均为157.03节拍. RISC-V instruction set architecture(ISA),as a new streamlined ISA,has developed rapidly due to its characteristics of free,open source,and freedom.Since the research on RISC-V at home and abroad mainly focuses on hardware development,the software ecosystem is still weak compared to mature ISAs.Implementing a set of high-performance basic math libraries for the RISC-V instruction set can further enrich the RISC-V software ecosystem.This paper realizes the transplantation of Sunway math library to RISC-V based on automatic transplantation technology,and provides the first basic math library system using vector instruction optimization for RISC-V instruction architecture.This paper proposes an automatic branch look-up table method and a path marker insertion method for vector registers,focusing on solving the problem of register multiplexing in the process of register mapping between different architectures,realizing the correct and efficient mapping of registers,and automatically transplanting 69 mathematical functions according to different instruction equivalence conversion strategies.The test results show that the RISC-V basic math library function can achieve correct calculation,the maximum error is 1.90ULP,and the average performance of functions is 157.03 beats.
作者 李飞 郭绍忠 郝江伟 侯明 宋广辉 许瑾晨 LI Fei;GUO Shao-zhong;HAO Jiang-wei;HOU Ming;SONG Guang-hui;XU Jin-chen(PLA Information Engineering University,Zhengzhou,Henan 450002,China;State Key Laboratory of Mathematical Engineering and Advanced Computing,Zhengzhou,Henan 450002,China)
出处 《电子学报》 EI CAS CSCD 北大核心 2024年第5期1633-1647,共15页 Acta Electronica Sinica
关键词 RISC-V 申威 汇编 向量 数学库 自动化移植 RISC-V Sunway assembly vector math library automatic porting
  • 相关文献

参考文献10

二级参考文献67

  • 1马士超,王贞松.基于DSP的三角函数快速计算[J].计算机工程,2005,31(22):12-14. 被引量:19
  • 2钱兴隆,臧斌宇,朱传琪.一种SIMD优化中的向量寄存器部分重用方法[J].计算机工程与科学,2007,29(5):141-146. 被引量:3
  • 3Acharya A. Contention Management for RSTM[D]. Rochester, USA: University of Rochester, 2006.
  • 4Li Tianqing, Zhang Yi, Yao Danya, et al. FFT Snake: A Robust and Efficient Method for the Segmentation of Arbitrarily Shaped Objects in Image Sequences[C]//Proc. of the 17th Int'l Conf. on Pattern Recognition. Cambridge, UK: IEEE Press, 2004:116-119.
  • 5DEC. Digital Fortran Language Reference Manual[Z]. 1997.
  • 6刘远,张定华,赵歆波,毛海鹏,刘晓鹏.一种基于SIMD技术的快速并行代数重建算法[J].中国图象图形学报,2007,12(1):73-77. 被引量:8
  • 7Xu JC, Guo SZ, Wang L. Optimization technology in SIMD mathematical functions based on vector register reuse. In: Proc. of the 2012 IEEE 14th Int'l Conf. on High Performance Computing and Communications (HPCC 2012). Liverpoor: IEEE Computer Society, 2012. ! 102-1107. Idol: 10.1109/HPCC.2012.161].
  • 8Daramy C, Defour D, de Dinechin F, Muller JM, Arenaire P. CR-LIBM: A correctly rounded elementary function library. In: Proc. of the Optical Science and Technology, SPIE's 48th Annual Meeting. Int'l Society for Optics and Photonics. 2003. 458-464. [doi: 10.1117/12. 505591].
  • 9Wu XY, Xia JL. New vector forms of elemental functions with Taylor series. Applied Mathematics and Computation, 2003,141(2): 307-312. [doi: 10.1016/S0096-3003(02)00255-2].
  • 10Tang PTP. A Portable Generic Elementary Function Package in Ada and an Accurate Test Suite. Department of Defense, 1990. [doi: 10.1145/123533.123573].

共引文献71

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部