Skip to content

Optimizing Sparse Tensor Contraction with TiledArray #496

Description

@ChemChuan

Dear contributors:
I am working on tensor contraction problems involving various formulas, such as:
$X(a,b)=\sum_{c,d}T(c,d)*H(a,b,c,d)$
$X(a,b)=\sum_{c,d}T(a,c)*T(b,d)*H(a,b,c,d)$
$X(a,b)=\sum_{c,d,e,f}T(a,c)*T(b,d)*T(e,f)*H(c,d,e,f)$

Here are some details:

  1. The range of the state indicator a, b, c, d, e, f is 0 to 15.
  2. For example, $T(a,c)$ is $16*16=256$ matrix, but only 25 elements are non-zero.
  3. And $H(c,d,e,f)$ is a (16,16,16,16) 4D array, with several hundred non-zero elements.

I used to use the einsum function in libtorch in the past, but there is no further optimization for the einusm of this sparse matrix in libtorch. Can tiledarray be applied to these types of situations? If possible, could you provide me with an example or reference.

Thanks for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions