Skip to content

torch.sparse improvements - tracking issue #44634

Open

Description

@rgommers

This tracking is meant to list the main improvements we'll be focusing on for sparse tensors, and then mapping them to the releases they should land in. Please note: these are estimates and indicate current prioritization and require effort - don't rely on this, things may still shift around.

The fill-value proposal (pytorch/rfcs#8) has a good description of the different interpretations of sparse tensors: linear algebra (where unspecified values are assumed to be 0), graph algorithms (where sparse structure indicates nodes/edges), and calculus (where non-zero fill values are needed). The description of application-level use cases for each of those interpretations is still TODO.

1.7 1.8 release

Sparse documentation updates:

1.8 release

1.9 release

To (re)assess

Relevant but blocked

CSR sparse tensors

cc @ezyang @gchanan @zou3519 @vincentqb @aocsa @nikitaved @pearu @v0dro @mruberry

Activity

  1. added
    module: sparse
    module: docs
    and removed
    module: docs
    on Sep 14, 2020
  2. added
    triaged
    on Sep 14, 2020
  3. self-assigned this
    on Sep 15, 2020
  4. ngimel commented on Oct 15, 2020

    @ngimel
    Collaborator

    I suggest adding #14945 to 1.8, performance of sparse_coo_tensor call is very bad, we should either fix it or expose unsafe version to python, or, preferably, both.

  5. rgommers commented on Oct 15, 2020

    @rgommers
    CollaboratorAuthor

    I suggest adding #14945 to 1.8, performance of sparse_coo_tensor call is very bad, we should either fix it or expose unsafe version to python, or, preferably, both.

    Added to the list, and cleared stale assignee so someone else can pick it up.

  6. pearu commented on Oct 22, 2020

    @pearu
    Collaborator

    Suggest adding #45695 to 1.8, the PR is about replacing _indices() with indices(coalesce=False) and introducing nse method.

  7. pearu commented on Nov 3, 2020

    @pearu
    Collaborator

    Re removing "This API is in beta, ..." statement from the docs: IIUC, the API consists of methods for (i) creating tensors with sparse layout and (ii) accessing format-specific data of a tensor. For COO tensors we have (i) torch.sparse_coo_tensor and (ii) torch.Tensor.{values, indices}. For other formats (to appear, like GCS), there may be ambiguities with this API, especially, with the (ii) part. So, I think the API needs to remain beta until we have a plan (if and) how PyTorch can be extended to support other storage formats.

  8. ngimel commented on Dec 14, 2020

    @ngimel
    Collaborator

    For sparse test gaps, see #48807 - no tests for coalesce for different dtypes, add_out is tested for bfloat16 specifically instead of a general tests for dtypes https://github.com/pytorch/pytorch/pull/48807/files#diff-bf009aed03d333c6a63253630fed4465ba5f7e025029fe2a22919759c38beb6dL1305

  9. rgommers commented on Dec 14, 2020

    @rgommers
    CollaboratorAuthor

    For sparse test gaps, see #48807 - ...

    Cc @vfdev-5, who is looking at structural sparse testing improvements.

  10. aocsa commented on Dec 14, 2020

    @aocsa
    Contributor

    And I am working on benchmarking utils for sparse tensors here, #48397

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

high prioritymodule: sparsetriaged

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions