[SYSTEMDS-418] Performance lineage tracing and reuse probing

This patch makes the following performance improvements in the context
of basic lineage tracing and lineage-based reuse probing:

1) Avoid string handling: Materialize the flag if a createvar
instruction has a persistent-read prefix in the name, which avoid
unnecessary string comparisons for ALL createvar instructions, so almost
30% of all instructions.

2) Apply the existing constant folding rewrite not just during static
rewrites but now also as a cleanup rewrite in order to remove remaining
constant expressions (introduced by rewrites) inside loops. This has
especially large impact in lineage because constructing the lineage item
is more expensive than the entire scalar operation.

3) Leverage the materialized hash code in lineage items as early-out
condition in the recursive equals check of lineage DAGs. This is
especially useful where all lineage DAGs have the same repreated
structure (e.g., from unrolled iterations) but a different input. The
equals would go all the way to the first differences, while the
comparison of hash codes (aggregates over all inputs) very likely differ
earlier.

On a mini-batch scenario of 250,000 iterations batch size 8, and 40
operations per iteration, the runtime w/o lineage was 65.6s, and the
changes (1) and (2) improved the runtime with lineage tracing from 76.5s
to 72.6s. Furthermore, we also seen some improvements for reuse probing
in this scenario, but this requires but work too.
7 files changed
tree: 247c2e6fe2d5dcd24e44b32afbf7fba58559dcf4
  1. .github/
  2. bin/
  3. conf/
  4. dev/
  5. docker/
  6. docs/
  7. scripts/
  8. src/
  9. .gitattributes
  10. .gitignore
  11. CONTRIBUTING.md
  12. LICENSE
  13. NOTICE
  14. pom.xml
  15. README.md
README.md

Apache SystemDS

Overview: SystemDS is a versatile system for the end-to-end data science lifecycle from data integration, cleaning, and feature engineering, over efficient, local and distributed ML model training, to deployment and serving. To this end, we aim to provide a stack of declarative languages with R-like syntax for (1) the different tasks of the data-science lifecycle, and (2) users with different expertise. These high-level scripts are compiled into hybrid execution plans of local, in-memory CPU and GPU operations, as well as distributed operations on Apache Spark. In contrast to existing systems - that either provide homogeneous tensors or 2D Datasets - and in order to serve the entire data science lifecycle, the underlying data model are DataTensors, i.e., tensors (multi-dimensional arrays) whose first dimension may have a heterogeneous and nested schema.

Quick Start Install, Quick Start and Hello World

Documentation: SystemDS Documentation

Python Documentation Python SystemDS Documentation

Status and Build: SystemDS is still in pre-alpha status. The original code base was forked from Apache SystemML 1.2 in September 2018. We will continue to support linear algebra programs over matrices, while replacing the underlying data model and compiler, as well as substantially extending the supported functionalities. Until the first release, you can build your own snapshot via Apache Maven: mvn clean package -P distribution.

Build Documentation Component Test Application Test Function Test Python Test Federated Python Test