ITensor / NDTensors.jl

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

Some low level optimizations #52

Closed mtfishman closed 3 years ago

mtfishman commented 3 years ago

This makes two optimizations:

  1. Speed up dense Tensor copyto! by calling out to Strided.jl (the one in Julia is generally fast, but there was a case that was showing up in block sparse SVD where a complicated Tensor view wasn't being handled well by generic Julia code).
  2. Convert the most generic Diag-Dense contraction to Dense-Dense contraction (Diag-Dense contraction is currently slow, the goal would be to speed it up eventually but I have seen it slow down code so this is the easiest way to go in the meantime).
codecov-io commented 3 years ago

Codecov Report

Merging #52 (c8d341c) into master (758bb0c) will increase coverage by 0.16%. The diff coverage is 18.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #52      +/-   ##
==========================================
+ Coverage   34.71%   34.87%   +0.16%     
==========================================
  Files          22       22              
  Lines        2509     2523      +14     
==========================================
+ Hits          871      880       +9     
- Misses       1638     1643       +5     
Impacted Files Coverage Δ
src/blocksparse/blocksparsetensor.jl 47.81% <0.00%> (-0.36%) :arrow_down:
src/diag.jl 11.55% <0.00%> (-0.18%) :arrow_down:
src/blocksparse/linearalgebra.jl 44.31% <75.00%> (+1.01%) :arrow_up:
src/dense.jl 40.41% <100.00%> (+1.20%) :arrow_up:
src/tensor.jl 50.46% <0.00%> (ø)

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 758bb0c...c8d341c. Read the comment docs.