[PATCH] D74056: [mlir][AVX512] Start an AVX512 dialect

Nicolas Vasilache via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 5 08:13:08 PST 2020


nicolasvasilache created this revision.
nicolasvasilache added reviewers: ftynse, rriddle, mehdi_amini, tetuante, jsetoain, stellaraccident.
Herald added subscribers: llvm-commits, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, burmako, jpienaar, kristof.beyls, mgorny.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: rengolin.
Herald added a project: LLVM.

The [Vector Dialect]((https://mlir.llvm.org/docs/Dialects/Vector/)) implements a retargetable n-D vector abstraction.
One of the layer currently missing in OSS atm is the Hardware Vector Ops (HWV) level.

This revision introduces a AVX512-specific dialect for the purpose of implementing portions of XNNPack in MLIR and benchmarking them.
This lives under `Dialect/Targets/AVX512` and will target useful intrinsics to implement XNNPack. 
The first such function is xnn_math_f32_exp__avx512f_p5_scalef <https://github.com/google/XNNPACK/blob/master/src/math/exp-avx512f-p5-scalef.c>.

At the moment, MLIR relies too much on LLVM’s peephole optimizer to do a good job from small `insertelement`/`extractelement`/`shufflevector`. 
Some intrinsics defined and used in the LLVMDialect but these are all “portable” intrinsics.
This revision starts defining layering the layering to attack the right instructions in avx512 directly.

Experience with avx512 is also expected to be useful for a future ARM SVE dialect.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74056

Files:
  mlir/include/mlir/Dialect/CMakeLists.txt
  mlir/include/mlir/Dialect/Targets/AVX512/AVX512Dialect.h
  mlir/include/mlir/Dialect/Targets/AVX512/AVX512Ops.td
  mlir/include/mlir/Dialect/Targets/AVX512/CMakeLists.txt
  mlir/include/mlir/Dialect/Targets/CMakeLists.txt
  mlir/lib/Dialect/CMakeLists.txt
  mlir/lib/Dialect/Targets/AVX512/AVX512Ops.cpp
  mlir/lib/Dialect/Targets/AVX512/CMakeLists.txt
  mlir/lib/Dialect/Targets/CMakeLists.txt
  mlir/test/Dialect/Targets/AVX512/roundtrip.mlir
  mlir/tools/mlir-opt/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74056.242630.patch
Type: text/x-patch
Size: 7207 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200205/49ed0e04/attachment.bin>


More information about the llvm-commits mailing list