[all-commits] [llvm/llvm-project] bbf3ef: [mlir][Vector]Lower vector.contract to llvm.intr.m...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Fri Mar 13 13:38:04 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bbf3ef85411660e2cebef8d1b633c35d9b179948
      https://github.com/llvm/llvm-project/commit/bbf3ef85411660e2cebef8d1b633c35d9b179948
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2020-03-13 (Fri, 13 Mar 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
    M mlir/lib/Dialect/VectorOps/VectorTransforms.cpp
    M mlir/test/Dialect/VectorOps/vector-contract-transforms.mlir

  Log Message:
  -----------
  [mlir][Vector]Lower vector.contract to llvm.intr.matrix_multiply

Summary:
This revision adds lowering of vector.contract to llvm.intr.matrix_multiply.
Note that there is currently a mismatch between the MLIR vector dialect which
expects row-major layout and the LLVM matrix intrinsics which expect column
major layout.

As a consequence, we currently only match a vector.contract with indexing maps
that express column-major matrix multiplication.
Other cases would require additional transposes and it is better to wait for
LLVM intrinsics to provide a per-operation attribute that would specify which
layout is expected.

A separate integration test, not submitted to MLIR core, has independently
verified that correct execution occurs on a 2x2x2 matrix multiplication.

Differential Revision: https://reviews.llvm.org/D76014




More information about the All-commits mailing list