[all-commits] [llvm/llvm-project] dbe414: [Matrix] Fix dimensions when hoisting transpose ac...

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Feb 12 10:45:26 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dbe4143f23ff27a058c4e7c551a0fa70b93b438e
      https://github.com/llvm/llvm-project/commit/dbe4143f23ff27a058c4e7c551a0fa70b93b438e
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2024-02-12 (Mon, 12 Feb 2024)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
    M llvm/test/Transforms/LowerMatrixIntrinsics/propagate-backward.ll
    M llvm/test/Transforms/LowerMatrixIntrinsics/transpose-opts-lifting.ll

  Log Message:
  -----------
  [Matrix] Fix dimensions when hoisting transpose across add. (#81507)

Row and column arguments for matrix_transpose indicate the shape of the
operand. When hoisting the transpose to the result of the add, the add
operates on the original operand's shape, and so does the hoisted
transpose.

This patch also adds an assert that the shape for the original add and
the transpose match, as well as the shape of the new add matches the
cached shape for it.

The assert could potentially be moved to
updateShapeAndReplaceAllUsesWith.




More information about the All-commits mailing list