[mlir] Introduce an intrinsic for llvm.matrix.multiply
authorNicolas Vasilache <ntv@google.com>
Thu, 5 Mar 2020 22:27:52 +0000 (17:27 -0500)
committerNicolas Vasilache <ntv@google.com>
Thu, 5 Mar 2020 22:31:41 +0000 (17:31 -0500)
commitcac1ed1f4bf939d70532fb8e80cf81cb50db69db
treefff02107b3518354aeb5b5a4681b498244091ee7
parentd0e8abc4381b3a656cde07a7844628535b8d864c
[mlir] Introduce an intrinsic for llvm.matrix.multiply

This revision adds the first intrinsic for llvm.matrix.multiply.
This uses the more general `LLVM_OneResultOp` for now since the goal is
to use the
specific Matrix builders that @fhahn has created recently.

When piped through:
```
opt -O3 -enable-matrix | llc -O3 -march=x86-64 -mcpu=skylake-avx512
```
this has been verified to generate ymm instructions.

Additional function attribute support will be needed to generate proper
zmm instructions but at least things run end to end.

Benchmarking will be provided separately with the experimental
metaprogramming
[ModelBuilder](https://github.com/google/iree/tree/master/experimental/ModelBuilder)
tool when ready.
mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
mlir/test/Target/llvmir-intrinsics.mlir