使用Stencil评估Intel AVX2 Vgather指令  

Evaluating Intel AVX2 Vgather Instructions with Stencils

在线阅读下载全文

作  者:林新华[1,2] 秦强[1] 李硕 文敏华[1] 松岗聪 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)

机构地区:[1]上海交通大学高性能计算中心,上海200240 [2]东京工业大学学术国际情报中心 [3]Intel公司软件与服务部门,波特兰999039

出  处:《计算机科学》2017年第1期20-24,共5页Computer Science

基  金:国家重点研发计划(2014AA01A302;2016YFB0201800);日本学术振兴会RONPAKU Fellowship资助

摘  要:为了更好地在向量化时读取离散的数据,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.

关 键 词:AVX2 vgather指令 STENCIL 性能评估 

分 类 号:TP391[自动化与计算机技术—计算机应用技术]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象