期刊文献+

使用Stencil评估Intel AVX2 Vgather指令

Evaluating Intel AVX2 Vgather Instructions with Stencils
下载PDF
导出
摘要 为了更好地在向量化时读取离散的数据,Intel在Haswell CPU提供了AVX2vgather指令。由于Stencil在设置边界条件时使用了条件判断,因此编译器生成了vgather指令,并降低了Stencil在Haswell上的性能。提出使用peel优化或intrinsic load的方法来避免vgather指令的生成,并把该方法应用到3个Stencil基准算例、长程Stencil程序3DFD以及混合Stencil应用3DEW上。这些Stencil在Haswell上的性能都获得了1.22X至3.88X不等的提升。通过研究指令的实现,发现vgather指令会被解码成多个微操作(μops),并为每个要读入的元素生成一个μops。由于vgather指令解码时会产生较高的开销,导致vgather指令成为Stencil在Haswell上的性能瓶颈。了解AVX2 vgather指令的实现以及掌握避免生成vgather指令的优化方法,对在Haswell上调优具有良好空间局部性应用的性能有一定的参考价值。 Intel provided AVX2 vgather instruction on Haswell CPU to better support reading discontinued data in vec- torization. We found the compiler generates vgather instructions, which slow down the performance of Stencil on Ha- swell, because the branches exist in defining boundary condition of Stencils. We proposed to utilize peel optimization or intrinsic load to avoid these vgather instructions. We applied these optimizations to three Stencil benchmarks, a long- range Stencil 3DFD, and a hybrid Stencil application, and archived the speedup from 1. 22X to 3. 88X on Haswelk By ana- lyzing the implementation of the instruction, we found the vgather instructions are decoded into multiple micro-opera- tions (μops) ,and the instructions generate one μops for each element to be gathered. Due to the high overhead of deco- der, the vgather instructions become the performance bottleneck of Stencils on Haswell. It is believed that the under- standing of the implementation of AVX2 vgather instructions and adopting the optimizations to avoid the vgather in- structions are quite helpful for performance tuning the applications with good spatial locality on Haswell.
作者 林新华 秦强 李硕 文敏华 松岗聪 LIN Xin-hua QIN Qiang LI Shuo WEN Min-hua MATSUOKA Satoshi(Center for High Performance Computing, Shanghai Jiao Tong University, Shanghai 200240, China Global Scientific Information and Computing Center, Tokyo Institute of Technology, Tokyo 152-8550, Japan Software and Services Group, Intel Corporation,Portland 999039, USA)
出处 《计算机科学》 CSCD 北大核心 2017年第1期20-24,共5页 Computer Science
基金 国家重点研发计划(2014AA01A302 2016YFB0201800) 日本学术振兴会RONPAKU Fellowship资助
关键词 AVX2 vgather指令 STENCIL 性能评估 AVX2 vgather,Stencil,Performance evaluation
  • 相关文献

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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