[all-commits] [llvm/llvm-project] fbd582: Implement the conversion from sparse constant to s...
Bixia Zheng via All-commits
all-commits at lists.llvm.org
Mon Sep 27 09:47:44 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fbd5821c6f2c516a64602839745ddc6f9566f710
https://github.com/llvm/llvm-project/commit/fbd5821c6f2c516a64602839745ddc6f9566f710
Author: Bixia Zheng <bixia at google.com>
Date: 2021-09-27 (Mon, 27 Sep 2021)
Changed paths:
M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp
M mlir/test/Dialect/SparseTensor/conversion.mlir
A mlir/test/Integration/Dialect/SparseTensor/CPU/sparse-constant_to_sparse_tensor.mlir
Log Message:
-----------
Implement the conversion from sparse constant to sparse tensors.
The sparse constant provides a constant tensor in coordinate format. We first split the sparse constant into a constant tensor for indices and a constant tensor for values. We then generate a loop to fill a sparse tensor in coordinate format using the tensors for the indices and the values. Finally, we convert the sparse tensor in coordinate format to the destination sparse tensor format.
Add tests.
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D110373
More information about the All-commits
mailing list