[all-commits] [llvm/llvm-project] 5f6c03: [mlir][linalg] Extend scalable vectorisation support

Andrzej WarzyƄski via All-commits all-commits at lists.llvm.org
Tue Aug 22 02:42:15 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5f6c03636d22029550c8ab94388827e728a0c5fe
      https://github.com/llvm/llvm-project/commit/5f6c03636d22029550c8ab94388827e728a0c5fe
  Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
  Date:   2023-08-22 (Tue, 22 Aug 2023)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
    M mlir/test/Dialect/Linalg/vectorization-masked.mlir

  Log Message:
  -----------
  [mlir][linalg] Extend scalable vectorisation support

This patch simply removes one of the pre-conditions of scalable
vectorisation. Namely, that only the trailing vector dimension can be
scalable, e.g.

  vector<2x4x[8]xi32>

This limitation can be lifted following the recent work to support
scalable vectorisation in Linalg, most notably:
  * https://reviews.llvm.org/D154336
  * https://reviews.llvm.org/D153372

A test is added that demonstrates scalable vectorisation of
`linalg.matmul`. This is simply a copy of a similar test for fixed-width
vectorisation. The latter is updated - check lines are simplified and
annotated with regex patterns. This in the spirit of [1]:

  Tests should be minimal, and only check what is absolutely necessary.

Note that this change is just one step towards scalable vectorisation in
Linalg. It will allow us to exercise new code paths in the context of
scalable vectors in Linalg and hence make further progress in the
forthcoming patches.

[1] https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices

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




More information about the All-commits mailing list