[all-commits] [llvm/llvm-project] 6b2685: [mlir][sparse] add asCOO() functionality to sparse...

Aart Bik via All-commits all-commits at lists.llvm.org
Wed Aug 25 21:50:56 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b26857dbfc1f8675382f5510f9ca02dad62729a
      https://github.com/llvm/llvm-project/commit/6b26857dbfc1f8675382f5510f9ca02dad62729a
  Author: Aart Bik <ajcbik at google.com>
  Date:   2021-08-25 (Wed, 25 Aug 2021)

  Changed paths:
    M mlir/lib/ExecutionEngine/SparseUtils.cpp

  Log Message:
  -----------
  [mlir][sparse] add asCOO() functionality to sparse tensor object

This prepares general sparse to sparse conversions. The code that
needs to be generated using this new feature is now simply:

(1) coo = sparse_tensor_1->asCOO();          // source format1
(2) sparse_tensor_2 = newSparseTensor(coo);  // destination format2

By using COO as an intermediate, we can do *all* conversions without
having to implement the full O(N^2) conversion matrix. Note that we
can always improve particular conversions individually if a faster
solution is required.

Reviewed By: bixia

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




More information about the All-commits mailing list