[all-commits] [llvm/llvm-project] fc127f: [mlir] Extract RHS rows once when lowering vector....

Artemiy Bulavin via All-commits all-commits at lists.llvm.org
Wed Mar 12 10:17:11 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fc127ff53d0c816e9e9a64ef55868479e0b84ebd
      https://github.com/llvm/llvm-project/commit/fc127ff53d0c816e9e9a64ef55868479e0b84ebd
  Author: Artemiy Bulavin <artemiyb at graphcore.ai>
  Date:   2025-03-12 (Wed, 12 Mar 2025)

  Changed paths:
    M mlir/lib/Dialect/Vector/Transforms/LowerVectorContract.cpp
    M mlir/test/Dialect/Vector/vector-contract-to-dot-transforms.mlir

  Log Message:
  -----------
  [mlir] Extract RHS rows once when lowering vector.contract to dot (#130130)

The `vector.contract` op on two matrices A and B will be lowered to
individual dot products of each row and column of A and B respectively.
The existing lowering will extract each column of B for each row of A,
which leads to multiple values in the IR representing the same columns
of B.

This PR makes changes to the `ContractOpToDotLowering` to make sure that
the columns of B are only ever extracted once, so then the SSA values
representing the extracted columns are then re-used in the IR for later
dot products.

I have updated the existing vector-contract-to-dot-transforms test.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list