[all-commits] [llvm/llvm-project] 2a82df: [mlir][VectorOps] Don't drop scalable dims when lo...

Benjamin Maxwell via All-commits all-commits at lists.llvm.org
Fri Sep 8 02:45:09 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2a82dfd7040276d50347a3fb4bcb6aced54d9fc5
      https://github.com/llvm/llvm-project/commit/2a82dfd7040276d50347a3fb4bcb6aced54d9fc5
  Author: Benjamin Maxwell <benjamin.maxwell at arm.com>
  Date:   2023-09-08 (Fri, 08 Sep 2023)

  Changed paths:
    M mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
    M mlir/test/Conversion/VectorToSCF/vector-to-scf.mlir

  Log Message:
  -----------
  [mlir][VectorOps] Don't drop scalable dims when lowering transfer_reads/writes (in VectorToSCF)

This allows the lowering of > rank 1 transfer_reads/writes to equivalent
lower-rank ones when the trailing dimension is scalable. The resulting
ops still cannot be completely lowered as they depend on arrays of
scalable vectors being enabled, and a few related fixes (see D158517).

This patch also explicitly disables lowering transfer_reads/writes with
a leading scalable dimension, as more changes would be needed to handle
that correctly and it is unclear if it is required.

Examples of ops that can now be further lowered:

  %vec = vector.transfer_read %arg0[%c0, %c0], %cst, %mask
		 {in_bounds = [true, true]} : memref<3x?xf32>, vector<3x[4]xf32>

  vector.transfer_write %vec, %arg0[%c0, %c0], %mask
		 {in_bounds = [true, true]} : vector<3x[4]xf32>, memref<3x?xf32>

Reviewed By: c-rhodes, awarzynski, dcaballe

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




More information about the All-commits mailing list