[all-commits] [llvm/llvm-project] 791935: [mlir][sparse] Implement sparse_tensor.select

Jim Kitchen via All-commits all-commits at lists.llvm.org
Mon Oct 3 12:39:49 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 791935037b0b3b211bee54fae694aeb5b7b75125
      https://github.com/llvm/llvm-project/commit/791935037b0b3b211bee54fae694aeb5b7b75125
  Author: Jim Kitchen <jim22k at gmail.com>
  Date:   2022-10-03 (Mon, 03 Oct 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h
    M mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
    M mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp
    A mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_select.mlir
    M mlir/unittests/Dialect/SparseTensor/MergerTest.cpp

  Log Message:
  -----------
  [mlir][sparse] Implement sparse_tensor.select

The region within sparse_tensor.select is used as the runtime criteria
for whether to keep the existing value in the sparse tensor.

While the sparse element is provided to the comparison, indices may also
be used to decide on whether to keep the original value. This allows, for
example, to only keep the upper triangle of a matrix.

Reviewed by: aartbik

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




More information about the All-commits mailing list