[all-commits] [llvm/llvm-project] 1cddcf: Fix CollapsedLayoutMap for dim size 1 case

Yi Zhang via All-commits all-commits at lists.llvm.org
Fri Apr 22 14:49:53 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1cddcfdc3c683b393df1a5c9063252eb60e52818
      https://github.com/llvm/llvm-project/commit/1cddcfdc3c683b393df1a5c9063252eb60e52818
  Author: Yi Zhang <cathyzhyi at google.com>
  Date:   2022-04-22 (Fri, 22 Apr 2022)

  Changed paths:
    M mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
    M mlir/test/Dialect/MemRef/canonicalize.mlir
    M mlir/test/Dialect/Tensor/bufferize.mlir

  Log Message:
  -----------
  Fix CollapsedLayoutMap for dim size 1 case

This change fixes `CollapsedLayoutMap` for cases where the collapsed
dims are size 1. The cases where inner most dims are size 1 and
noncontiguous can be represented by the strided form and therefore can
be allowed. For such cases, the new stride should be of the next entry
in an association whose dimension is not size 1. If the next entry is
dynamic, it's not possible to decide which stride to use at compilation
time and the stride is set to dynamic.

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




More information about the All-commits mailing list