[all-commits] [llvm/llvm-project] e7281c: [Matrix] Add special case dot product lowering

Vir Narula via All-commits all-commits at lists.llvm.org
Fri Mar 31 04:42:01 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e7281c6f614230860cd18a9d1f24612c5c38e9ca
      https://github.com/llvm/llvm-project/commit/e7281c6f614230860cd18a9d1f24612c5c38e9ca
  Author: Vir Narula <virnarula at outlook.com>
  Date:   2023-03-31 (Fri, 31 Mar 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
    M llvm/test/Transforms/LowerMatrixIntrinsics/dot-product-int.ll

  Log Message:
  -----------
  [Matrix] Add special case dot product lowering

Add special case to matrix lowering for dot products. Normal matrix lowering if optimized for either row-major or column-major, which results in many `shufflevector` instructions being generated for one vector. We work around this in our special case. We can also use vector-reduce adds instead of sequential adds to sum the result of the element-wise multiplication, which takes advantage of SIMD instructions.

Reviewed By: fhahn, thegameg

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




More information about the All-commits mailing list