[all-commits] [llvm/llvm-project] f4f158: [mlir][sparse] add vectorization strategies to spa...

Aart Bik via All-commits all-commits at lists.llvm.org
Wed Jan 13 11:55:55 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f4f158b2f89e16ee7068d6292d2d46457d6932bb
      https://github.com/llvm/llvm-project/commit/f4f158b2f89e16ee7068d6292d2d46457d6932bb
  Author: Aart Bik <ajcbik at google.com>
  Date:   2021-01-13 (Wed, 13 Jan 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
    M mlir/lib/Dialect/Linalg/Transforms/Sparsification.cpp
    A mlir/test/Dialect/Linalg/sparse_vector.mlir
    M mlir/test/lib/Transforms/TestSparsification.cpp

  Log Message:
  -----------
  [mlir][sparse] add vectorization strategies to sparse compiler

Similar to the parallelization strategies, the vectorization strategies
provide control on what loops should be vectorize. Unlike the parallel
strategies, only innermost loops are considered, but including reductions,
with the control of vectorizing dense loops only or dense and sparse loops.

The vectorized loops are always controlled by a vector mask to avoid
overrunning the iterations, but subsequent vector operation folding removes
redundant masks and replaces the operations with more efficient counterparts.
Similarly, we will rely on subsequent loop optimizations to further optimize
masking, e.g. using an unconditional full vector loop and scalar cleanup loop.

The current strategy already demonstrates a nice interaction between the
sparse compiler and all prior optimizations that went into the vector dialect.

Ongoing discussion at:
https://llvm.discourse.group/t/mlir-support-for-sparse-tensors/2020/10

Reviewed By: penpornk

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




More information about the All-commits mailing list