ITensor / NDTensors.jl

A Julia package for n-dimensional sparse tensors.
Apache License 2.0
27 stars 7 forks source link

Improve contractions involving scalar-like tensors #57

Closed mtfishman closed 3 years ago

mtfishman commented 3 years ago

This adds some specialized code paths for contractions involving scalar-like tensors, i.e. one of the tensors is size 1. This particularly improves block sparse contractions where many of the blocks are of size 1.

codecov-io commented 3 years ago

Codecov Report

Merging #57 (34bd5e5) into master (a05eca8) will decrease coverage by 0.78%. The diff coverage is 23.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #57      +/-   ##
==========================================
- Coverage   32.43%   31.65%   -0.79%     
==========================================
  Files          23       23              
  Lines        2633     2714      +81     
==========================================
+ Hits          854      859       +5     
- Misses       1779     1855      +76     
Impacted Files Coverage Δ
src/NDTensors.jl 33.33% <ø> (ø)
src/blocksparse/combiner.jl 0.00% <0.00%> (ø)
src/combiner.jl 0.00% <0.00%> (ø)
src/diag.jl 11.50% <0.00%> (-0.06%) :arrow_down:
src/dims.jl 28.57% <0.00%> (-3.01%) :arrow_down:
src/empty.jl 0.00% <0.00%> (ø)
src/dense.jl 33.25% <15.21%> (-6.01%) :arrow_down:
src/blocksparse/blocksparsetensor.jl 46.60% <100.00%> (+0.25%) :arrow_up:
src/blocksparse/linearalgebra.jl 43.97% <100.00%> (+0.33%) :arrow_up:
src/contraction_logic.jl 50.84% <100.00%> (-0.33%) :arrow_down:
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a05eca8...34bd5e5. Read the comment docs.