Skip to content

Improve sparse reshaping #56477

Open
Open
@aartbik

Description

@aartbik

We have functional reshaping support for sparse tensors now, i.e.

(1) when source or dest is dense, rely on the cheap "view" change of the dense operand, and convert the sparse source or dest
(2) when both source and dest are sparse, perform the reshape with data shuffling.

Although this gives the right semantics, and using time proportional to nnz for sparse parts, we could do better. Both the reshuffling itself could be improved or, even better, perhaps we can introduce a "view" into a sparse storage scheme and avoid the data movement altogether.

Relevant revisions:
https://reviews.llvm.org/D129416 [mlir][sparse] implement sparse2sparse reshaping (expand/collapse)
https://reviews.llvm.org/D129031 [mlir][sparse] implement simple reshaping (expand/collapse)

Metadata

Metadata

Assignees

No one assigned

    Labels

    mlir:sparseSparse compiler in MLIR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions