###
DOI:
Journal of Software:2011.22(zk2):208-216

OpenBLAS:龙芯3A CPU 的高性能BLAS 库
张先轶,王茜,张云泉
(中国科学院 软件研究所 并行软件与计算科学实验室,北京 100190; 中国科学院 研究生院,北京 100190;中国科学院 软件研究所 并行软件与计算科学实验室,北京 100190; 中国科学院 计算机科学国家重点实验室,北京 100190)
OpenBLAS: A High Performance BLAS Library on Loongson 3A CPU
ZHANG Xian-Yi,WANG Qian,ZHANG Yun-Quan
(Laboratory of Parallel Software and Computational Science, Institute of Software, The Chinese Academy of Sciences, Beijing 100190, China; Graduate University, The Chinese Academy of Sciences, Beijing 100190, China;Laboratory of Parallel Software and Computational Science, Institute of Software, The Chinese Academy of Sciences, Beijing 100190, China; State Key Laboratory of Computing Science, The Chinese Academy of Sciences, Beijing 100190, China)
Abstract
Chart / table
Reference
Similar Articles
Article :Browse 2937   Download 4449
Received:July 15, 2011    Revised:December 02, 2011
> 中文摘要: BLAS 是科学计算中最基础的数学库之一,各CPU 厂商都推出了针对各自CPU 的优化BLAS 库.龙芯CPU 是中国科学院计算技术研究所自主研制的通用CPU,目前已推出了龙芯3 号系列.介绍了基于GotoBLAS2-1.13 BSD 版的开源项目OpenBLAS,针对龙芯3A CPU 的优化工作.在BLAS 3 级函数的单线程优化上,运用了分块,手工核心汇编,使用龙芯3A 扩展指令、汇编指令重排等技术.BLAS 3 级函数平均性能高于GotoBLAS 和ATLAS75%和17%.其中,双精度函数高于GotoBLAS 和ATLAS 103%和36%.在BLAS 3 级函数并行化方面,采用数据缓冲区交错布局等技术,减少多线程对共享L2 Cache 的争抢.OpenBLAS BLAS 3 级函数的4 线程并行加速比达到3.47.4线程BLAS 3 级函数平均性能高于GotoBLAS 和ATLAS 69%和34%,其中,双精度函数高于GotoBLAS 和ATLAS89%和55%.
中文关键词: BLAS  龙芯3A  性能优化  多核  MIPS64
Abstract:BLAS is a fundamental math library in scientific computing. Thus, each CPU vendor releases optimized BLAS library for its own CPU. Loongson CPU series are developed by the Institute of Computing Technology, Chinese Academy of Sciences. In 2010, it released Loongson 3 CPU series. This paper introduces the open source BLAS library OpenBLAS, which is forked on GotoBLAS 2-1.13 BSD version. BLAS Level 3 functions of OpenBLAS is optimized on Loongson 3A quad cores CPU. In sequential optimizations, blocking, hand coding assembly kernel, Loongson 3A special instructions and reordering instructions are utilized. The performance of BLAS Level 3 subroutines exceeded GotoBLAS and ATLAS by about 75% and 17%. Meanwhile, it exceeded GotoBLAS and ATLAS by about 103% and 36% in double precision functions. In parallel multi-threads optimization, this study used interleaved data buffer layout to avoid shared L2 Cache conflictions among multi-threads. OpenBLAS achieved 3.47 speedups on quad cores. In 4 threads, the performance of OpenBLAS BLAS Level3 functions exceeded GotoBLAS and ATLAS by about 69% and 34%, 89% and 55% in double precision functions.
keywords: BLAS  Loongson 3A  optimization  multicore  MIPS64
文章编号:     中图分类号:    文献标志码:
基金项目:国家自然科学基金(61133005);国家高技术研究发展项目(863)(2009AA01A129, 2009AA01A134);国家重大专项核高基项目(2009ZX01036-001-002) 国家自然科学基金(61133005);国家高技术研究发展项目(863)(2009AA01A129, 2009AA01A134);国家重大专项核高基项目(2009ZX01036-001-002)
Foundation items:
Reference text:

张先轶,王茜,张云泉.OpenBLAS:龙芯3A CPU 的高性能BLAS 库.软件学报,2011,22(zk2):208-216

ZHANG Xian-Yi,WANG Qian,ZHANG Yun-Quan.OpenBLAS: A High Performance BLAS Library on Loongson 3A CPU.Journal of Software,2011,22(zk2):208-216