[all-commits] [llvm/llvm-project] eced4a: [mlir] [sparse] start of sparse tensor compiler su...

Aart Bik via All-commits all-commits at lists.llvm.org
Tue Nov 17 13:11:05 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: eced4a8e6fe3041b699bd22b5b89bea47c84c51a
      https://github.com/llvm/llvm-project/commit/eced4a8e6fe3041b699bd22b5b89bea47c84c51a
  Author: Aart Bik <ajcbik at google.com>
  Date:   2020-11-17 (Tue, 17 Nov 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
    M mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/Linalg/Transforms/Sparsification.cpp
    A mlir/test/Dialect/Linalg/sparse_1d.mlir
    A mlir/test/Dialect/Linalg/sparse_2d.mlir
    A mlir/test/Dialect/Linalg/sparse_3d.mlir
    M mlir/test/lib/Transforms/CMakeLists.txt
    A mlir/test/lib/Transforms/TestSparsification.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp

  Log Message:
  -----------
  [mlir] [sparse] start of sparse tensor compiler support

As discussed in https://llvm.discourse.group/t/mlir-support-for-sparse-tensors/2020
this CL is the start of sparse tensor compiler support in MLIR. Starting with a
"dense" kernel expressed in the Linalg dialect together with per-dimension
sparsity annotations on the tensors, the compiler automatically lowers the
kernel to sparse code using the methods described in Fredrik Kjolstad's thesis.

Many details are still TBD. For example, the sparse "bufferization" is purely
done locally since we don't have a global solution for propagating sparsity
yet. Furthermore, code to input and output the sparse tensors is missing.
Nevertheless, with some hand modifications, the generated MLIR can be
easily converted into runnable code already.

Reviewed By: nicolasvasilache, ftynse

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




More information about the All-commits mailing list