[all-commits] [llvm/llvm-project] 96891f: Reland: [mlir][Vector][Affine] Improve affine vect...

Diego Caballero via All-commits all-commits at lists.llvm.org
Thu Mar 11 14:21:18 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 96891f041850186dc77b0f7e740b93da43d65bd4
      https://github.com/llvm/llvm-project/commit/96891f041850186dc77b0f7e740b93da43d65bd4
  Author: Diego Caballero <diego.caballero at intel.com>
  Date:   2021-03-12 (Fri, 12 Mar 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/Vector/VectorUtils.h
    M mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp
    M mlir/lib/Dialect/Vector/VectorUtils.cpp
    M mlir/test/Dialect/Affine/SuperVectorize/vectorize_1d.mlir

  Log Message:
  -----------
  Reland: [mlir][Vector][Affine] Improve affine vectorizer algorithm

This patch replaces the root-terminal vectorization approach implemented in the
Affine vectorizer with a topological order approach that vectorizes all the
operations within the target loop nest. These are the most important changes
introduced by the new algorithm:
  * Removed tracking of root and terminal ops. Existing vectorization
    functionality is preserved and extended so that loop nests without
    root-terminal chains can be vectorized.
  * Vectorizing a loop nest now only requires a single topological traversal.
  * A new vector loop nest is incrementally built along the vectorization
    process. The original scalar loop is kept intact. No cloning guard is needed
    to recover the scalar loop if vectorization fails. This approach also
    simplifies the challenging task of replacing a loop operation amid the
    vectorization process without invalidating the analysis information that
    depends on the original loop.
  * Vectorization of specific operations has been implemented as independent,
    preparing them to be moved to a potential vectorization interface.

Reviewed By: nicolasvasilache

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




More information about the All-commits mailing list