VNNI 指令集检测

VNNI 指令集从 Intel Xeon 第二代 cascade lake开始支持,你可以通过以下途径检测是否用oneDNN 正常运行VNNI 指令加速.

git clone https://github.com/oneapi-src/oneDNN.git
cd oneDNN/
mkdir build
cd build/
cmake ../
make -j
DNNL_VERBOSE=1 ./tests/benchdnn/benchdnn --matmul --cfg=u8s8u8 12x128x768:12x768x2304

看输出重是否含有 avx512_core_vnni:


onednn_verbose,info,cpu,runtime:OpenMP,nthr:112
onednn_verbose,info,cpu,isa:Intel AVX-512 with Intel DL Boost
onednn_verbose,info,gpu,runtime:none
onednn_verbose,info,prim_template:operation,engine,primitive,implementation,prop_kind,memory_descriptors,attributes,auxiliary,problem_desc,exec_time
onednn_verbose,exec,c,12x128x768,9.37915
onednn_verbose,exec,cpu,reorder,rnn_data_reorder,undef,src_f32::blocked:abc:f0 dst_u8::blocked:abc:f0,,pu,reorder,rnn_data_reorder,undef,src_f32::blocked:abc:f0 dst_s8::blocked:abc:f0,,,12x768x2304,10.8618
onednn_verbose,exec,cpu,matmul,brg:avx512_core_vnni,undef,src_u8::blocked:abc:f0 wei_s8::blocked:abc:f0 dst_u8::blocked:abc:f0,,,12x128x768:12x768x2304:12x128x2304,11.6199
onednn_verbose,exec,cpu,reorder,simple:any,undef,src_f32::blocked:abc:f0 dst_f32::blocked:abc:f0,,,12x128x2304,0.546875
onednn_verbose,exec,cpu,reorder,jit:uni,undef,src_u8::blocked:abc:f0 dst_f32::blocked:abc:f0,,,12x128x2304,1.92188
0:PASSED __REPRO: --matmul --cfg=u8s8u8 12x128x768:12x768x2304
tests:1 passed:1 skipped:0 mistrusted:0 unimplemented:0 invalid_arguments:0 failed:0 listed:0
total compute_ref: sum(s):0.28

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值