[all-commits] [llvm/llvm-project] 95db7b: [mlir][Vector][Affine] Improve affine vectorizer a...

Diego Caballero via All-commits all-commits at lists.llvm.org
Wed Mar 10 10:31:26 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 95db7b4aeaad590f37720898e339a6d54313422f
      https://github.com/llvm/llvm-project/commit/95db7b4aeaad590f37720898e339a6d54313422f
  Author: Diego Caballero <diego.caballero at intel.com>
  Date:   2021-03-10 (Wed, 10 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:
  -----------
  [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