[all-commits] [llvm/llvm-project] 113fa8: [Polly] Check the properties of accesses to operan...

gareevroman via All-commits all-commits at lists.llvm.org
Tue Sep 28 10:59:20 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 113fa82c3ca4d4fc8310a1de3c4ec31343f81542
      https://github.com/llvm/llvm-project/commit/113fa82c3ca4d4fc8310a1de3c4ec31343f81542
  Author: Roman Gareev <gareevroman at gmail.com>
  Date:   2021-09-28 (Tue, 28 Sep 2021)

  Changed paths:
    M polly/lib/Transform/MatmulOptimizer.cpp
    A polly/test/ScheduleOptimizer/pattern-matching-based-opts_15.ll

  Log Message:
  -----------
  [Polly] Check the properties of accesses to operands of a matrix-matrix
multiplication

The following code modifies elements of the array D.

    for (i = 0; i < _PB_NI; i++)
      for (j = 0; j < _PB_NJ; j++)
      {
        for (k = 0; k < _PB_NK; k++)
        {
          double Mul = A[i][k] * B[k][j];
          D[i][j][k] += Mul;
          C[i][j] += Mul;
        }
      }

Nevertheless, the code is recognised as a matrix-matrix multiplication, since
the second and third dimensions of D are accessed with non-zero strides.

This fixes the typo, which was made during the translation to C++ bindings
(https://reviews.llvm.org/D35845).

Reviewed By: Michael Kruse <llvm at meinersbur.de>

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




More information about the All-commits mailing list