STREAM是微处理器上内存性能的基准测试程序,在多核多线程FT1000微处理器上发挥高性能是具有挑战性的研究工作。基于多级Cache结构,优化STREAM四个程序的指令流水线,根据寄存器数,设计了多级循环展开方法,根据指令延迟和Cache行的大小确定数据预取的数目,使用汇编语言编写了优化子程序。基于OpenMP并行环境,设计了STREAM并行程序,优化了局部化数据分配方式。数据测试结果表明,优化后的STREAM的性能比原始串行程序性能提高了19.2%-64.2%。优化后,并行程序的最高访存性能达到8.5GB/s,对比优化前的最高访存性能最大提高了22.7%。
STREAM benchmark measures the memory bandwidth of microprocessors. It is a chal- lenge to get high performance of STREAM benchmark on the massively multithreaded FT1000 proces- sors. Based on the hierarchical cache, the instruction pipelines of four routines of STREAM are opti- mized. Then,a multilevel loop unrolling method is proposed according to the number of registers, the prefetched data sizes are determined by the instruction delay and the cache line size, and the optimized subroutines are written in assembly language. Under the OpenMP parallel computing environment, the parallel codes for STREAM benchmark are given with the local data optimized methods. The test results of STREAM codes with performance optimization show that the performance increases by 19.2-64.2% for sequential computation. The highest memory bandwidth of the parallel optimized codes is 8.5GB/s. In comparison to the original parallel codes, the performances of the parallel optimized codes is improved by 22.7 % .