[all-commits] [llvm/llvm-project] 90fd13: [mlir][sparse] Converting SparseTensorCOO to use s...

wren romano via All-commits all-commits at lists.llvm.org
Tue Oct 11 14:03:57 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 90fd13b0a1120a7fa50a21d4d46af61285b7a964
      https://github.com/llvm/llvm-project/commit/90fd13b0a1120a7fa50a21d4d46af61285b7a964
  Author: wren romano <2998727+wrengr at users.noreply.github.com>
  Date:   2022-10-11 (Tue, 11 Oct 2022)

  Changed paths:
    M mlir/include/mlir/ExecutionEngine/SparseTensor/COO.h
    M mlir/include/mlir/ExecutionEngine/SparseTensorUtils.h
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
    M mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
    M mlir/test/Dialect/SparseTensor/sparse_concat.mlir
    M mlir/test/Dialect/SparseTensor/sparse_reshape.mlir

  Log Message:
  -----------
  [mlir][sparse] Converting SparseTensorCOO to use standard C++-style iterators.

This differential comprises three related changes: (1) it gives SparseTensorCOO standard C++-style iterators; (2) it removes the old iterator stuff from SparseTensorCOO; and (3) it introduces SparseTensorIterator which behaves like the old SparseTensorCOO iterator stuff used to.

The SparseTensorIterator class is needed because the MLIR codegen cannot easily use the C++-style iterators (hence why SparseTensorCOO had the old iterator stuff).  Distinguishing SparseTensorIterator from SparseTensorCOO also helps improve API hygiene since these two classes are used for distinct purposes.  And having SparseTensorIterator as its own class enables changing the underlying implementation in the future, without needing to worry about updating all the codegen tests etc.

Reviewed By: aartbik

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




More information about the All-commits mailing list