Commit Graph

464 Commits

Author SHA1 Message Date
Christopher Berner
f124b6f2be Add more extended test coverage 2020-01-19 11:08:40 -08:00
Christopher Berner
b9dde8e167 Optimize columnar storage in sparse matrix
This reduces memory usage for large symbol counts by 10%+
2020-01-19 11:08:40 -08:00
Christopher Berner
f0177f9311 Convert column iterator to return only 1-valued rows 2020-01-19 11:08:40 -08:00
Christopher Berner
e2ede5e61a Add assertions to check that column index is always accurate 2020-01-19 11:08:40 -08:00
Christopher Berner
87f8e7ae81 Remove logic to update column index 2020-01-19 11:08:40 -08:00
Christopher Berner
b39bce022c Optimize binary sparse vector storage
Reduces memory usage by 10%+ for large symbol counts
2020-01-19 11:08:40 -08:00
Christopher Berner
c07da3e667 Index adjacent nodes in graph
Speeds up graph selection step by ~3x
2020-01-19 11:08:40 -08:00
Christopher Berner
0b9a9cb37a Remove temporary memory allocation in adjacent nodes call 2020-01-19 11:08:40 -08:00
Christopher Berner
69187f6e2d Remove scratch graph object 2020-01-19 11:08:40 -08:00
Christopher Berner
f6829719e2 Further optimize graph memory usage
Reduces selection helper memory usage by ~50%
2020-01-19 11:08:40 -08:00
Christopher Berner
e5941cd5a4 Restructure graph to be more memory efficient 2020-01-19 11:08:40 -08:00
Christopher Berner
cccd950f1e Improve accuracy of graph memory tracking 2020-01-19 11:08:40 -08:00
Christopher Berner
8d3de9a4bc Document TODO 2020-01-19 11:08:40 -08:00
Christopher Berner
8d75de4d97 Reduce first phase stats memory usage
Reduces memory by ~1MB for large symbol counts
2020-01-19 11:08:40 -08:00
Christopher Berner
c7d16f2c89 Replace unnecessary usage of UsizeArrayMap 2020-01-19 11:08:40 -08:00
Christopher Berner
792b68638d Add memory approximation for first phase stats struct 2020-01-19 11:08:40 -08:00
Christopher Berner
7766fa4d7f Further optimize memory usage of column mapping
Reduces memory usage by ~3% for large symbol counts
2020-01-19 11:08:40 -08:00
Christopher Berner
d720cd7968 Optimize index mapping storage for sparse matrix
This reduces memory usage by ~15% for large symbol counts
2020-01-19 11:08:40 -08:00
Christopher Berner
fd93b712c8 Optimize sparse vec with byte packing into u32
Reduces memory usage for large symbol counts by ~40%
2020-01-19 11:08:40 -08:00
Christopher Berner
886075c1b0 Optimize column index memory usage
Reduces memory usage by ~10% for large symbol counts
2020-01-19 11:08:40 -08:00
Christopher Berner
01fcca7364 Accurately report column index memory usage 2020-01-19 11:08:40 -08:00
Christopher Berner
b60387a132 Remove unaccessed columns from X
Reduces memory usage by ~10%
2020-01-19 11:08:40 -08:00
Christopher Berner
083e634c7e Optimize sparse matrix to use 50-75% less memory 2020-01-19 11:08:40 -08:00
Christopher Berner
f95998b0ff Add approximate memory analysis 2020-01-19 11:08:40 -08:00
Christopher Berner
b61e4825c5 Remove unnecessary support for arbitrary width resizing 2020-01-19 11:08:40 -08:00
Christopher Berner
d8d8bc33ec Optimize dense binary matrix storage to use bitpacking 2020-01-19 11:08:40 -08:00
Christopher Berner
bf1291253b Remove unnecessary counting of values greater than one 2020-01-19 11:08:40 -08:00
Christopher Berner
059133c812 Document TODO 2020-01-19 11:08:40 -08:00
Christopher Berner
49448be936 Remove unnecessary support for non-binary values in binary matrices 2020-01-19 11:08:40 -08:00
Christopher Berner
5d57d3751e Separate binary and octet matrix classes 2020-01-19 11:08:40 -08:00
Christopher Berner
dbb0a7f7d3 Remove unnecessary normalization 2020-01-19 11:08:40 -08:00
Christopher Berner
ffee5f0d59 Remove special HDPC handling in selection helper 2020-01-19 11:08:40 -08:00
Christopher Berner
3bf4e1dfda Document usage of Errata 2 2020-01-19 11:08:40 -08:00
Christopher Berner
7ad2d331dd Remove dense row support from sparse matrix 2020-01-19 11:08:40 -08:00
Christopher Berner
7f3477d3de Separate HDPC rows from A matrix in PI solver
The HDPC rows are only non-binary values, so store them separately
to allow for more optimizations in the future.
2020-01-19 11:08:40 -08:00
Christopher Berner
b1f0f920c5 Document errata for RFC6330 2020-01-19 11:08:40 -08:00
Christopher Berner
f6fbcf072e Defer operations on symbols
This makes the algorithm more cache friendly, by first performing all
the calculations on the constraint matrix, and then applying the
operations to the Symbols

Improves performance on very large symbol counts (50k) by ~10%
2020-01-19 11:08:40 -08:00
Felix Schorer
78ed43ac72 feat: Add CPython wrapper (#33)
* Add CPython wrapper

* Add CPython wrapper to build pipeline

* Don't use Travis CI matrix expansion

* Install maturin and add cache

* Install Python

* Install fix incorrect package name 'pip3'

* Update package list

* Split build in two jobs

* Don't cache as installing lichking will error otherwise

* Don't lint on nightly

* Add Python tests

* Add venv

* Fix execution order

* Run linter

* Run linter
2020-01-13 19:58:01 -08:00
Cem Karan
4a68f2529d feat: Derived serde::{Serialize, Deserialize} on all public types.
This should make it possible to use serde to serialize and deserialize
encoders/decoders while they are in use.  This is makes it possible to
ship them between processes as needed.
2020-01-09 19:34:21 -08:00
Christopher Berner
cb3240a572 Add row density histogram to matrix_sparsity analysis 2020-01-08 00:06:15 -08:00
Christopher Berner
1663104158 Clarify public API and benchmarking flag 2020-01-07 18:40:15 -08:00
Christopher Berner
647e937c54 Optimize col index handling 2020-01-06 18:27:02 -08:00
Christopher Berner
13b1d0200f Remove unnecessary Symbol cloning 2020-01-06 18:27:02 -08:00
Christopher Berner
63208df2b5 Improve dense row handling in sparse matrix
* support resize()
* use logical col indices
2020-01-06 18:27:02 -08:00
Christopher Berner
55d42fdee2 Reuse scratch memory for graph 2020-01-06 18:27:02 -08:00
Christopher Berner
9d0af2dcad Appropriately size col index vectors 2020-01-06 18:27:02 -08:00
Christopher Berner
2fec2cb9d7 Remove useless loop 2020-01-06 18:27:02 -08:00
Christopher Berner
2bad8466fa Optimize HDPC row storage in sparse matrix 2020-01-06 18:27:02 -08:00
Christopher Berner
0cecda508c Split sparse matrix into separate file 2020-01-04 16:12:56 -08:00
Christopher Berner
b42b84a746 Refactor iterators into separate file 2020-01-04 16:12:56 -08:00