|
1 |
| -# dace |
2 |
| -DaCe - Data Centric Parallel Programming |
| 1 | +aCe - Data-Centric Parallel Programming |
| 2 | +===================================================== |
| 3 | + |
| 4 | +_Decoupling domain science from performance optimization._ |
| 5 | + |
| 6 | +DaCe compiles code in various programming languages and paradigms (Python/Numpy, MATLAB, TensorFlow) and maps it efficiently to **CPUs, GPUs, and FPGAs** with high utilization, on par with the state-of-the-art. The key feature driving DaCe is its Stateful DataFlow multiGraph (SDFG) *data-centric intermediate representation*: A transformable, interactive representation of code based on data movement. |
| 7 | +With data-centric parallel programming, we enable **direct knowledge transfer** of performance optimization, regardless of the scientific application or the target processor. |
| 8 | + |
| 9 | +DaCe can be written inline in Python and transformed in the command-line, or SDFGs can be interactively modified using the Data-centric Interactive Optimization Development Environment (DIODE). |
| 10 | + |
| 11 | +For more information, see our [paper](http://www.arxiv.org/abs/1902.10345). |
| 12 | + |
| 13 | +Tutorials |
| 14 | +--------- |
| 15 | + |
| 16 | +* _Implicit Dataflow in Python (coming soon)_ |
| 17 | +* [Explicit Dataflow in Python](tutorials/explicit.ipynb) |
| 18 | +* [SDFG API](tutorials/sdfg_api.ipynb) |
| 19 | +* [Transformations](tutorials/transformations.ipynb) |
| 20 | + |
| 21 | +Installation and Dependencies |
| 22 | +----------------------------- |
| 23 | + |
| 24 | +To install: `pip install dace` |
| 25 | + |
| 26 | +Runtime dependencies: |
| 27 | + * A C++14-capable compiler (e.g., gcc 5.3+) |
| 28 | + * Python 3.5 or newer |
| 29 | + |
| 30 | +Running DIODE may require additional dependencies: |
| 31 | + * `sudo apt-get install libgtksourceviewmm-3.0-dev libyaml-dev` |
| 32 | + * `sudo apt-get install python3-cairo python3-gi-cairo libgirepository1.0-dev xdot libwebkitgtk-dev libwebkitgtk-3.0-dev libwebkit2gtk-4.0-dev` |
| 33 | + * `pip install pygobject matplotlib` |
| 34 | + |
| 35 | +To run DIODE on Windows, use MSYS2: |
| 36 | + * Download from http://www.msys2.org/ |
| 37 | + * In the MSYS2 console, install all dependencies: `pacman -S mingw-w64-i686-gtk3 mingw-w64-i686-python2-gobject mingw-w64-i686-python3-gobject mingw-w64-i686-python3-cairo mingw-w64-i686-python3-pip mingw-w64-i686-gtksourceviewmm3 mingw-w64-i686-gcc mingw-w64-i686-boost mingw-w64-i686-python3-numpy mingw-w64-i686-python3-scipy mingw-w64-i686-python3-matplotlib` |
| 38 | + * Update MSYS2: `pacman -Syu`, close and restart MSYS2, then run `pacman -Su` to update the rest of the packages. |
| 39 | + |
| 40 | +Publication |
| 41 | +----------- |
| 42 | + |
| 43 | +If you use DaCe, cite us: |
| 44 | +```bibtex |
| 45 | +@article{dace, |
| 46 | + author = {Ben-Nun, Tal and de Fine Licht, Johannes and Ziogas, Alexandros Nikolaos and Schneider, Timo and Hoefler, Torsten}, |
| 47 | + title = {Stateful Dataflow Multigraphs: A Data-Centric Model for High-Performance Parallel Programs}, |
| 48 | + journal = {CoRR}, |
| 49 | + volume = {abs/1902.10345}, |
| 50 | + year = {2019}, |
| 51 | + url = {http://arxiv.org/abs/1902.10345}, |
| 52 | + archivePrefix = {arXiv}, |
| 53 | + eprint = {1902.10345} |
| 54 | +} |
| 55 | +``` |
| 56 | + |
| 57 | +Configuration |
| 58 | +------------- |
| 59 | + |
| 60 | +DaCe creates a file called `.dace.conf` in the user's home directory. It provides useful settings that can be modified either directly in the file (YAML), within DIODE, or overriden on a case-by-case basis using environment variables that begin with `DACE_` and specify the setting (where categories are separated by underscores). The full configuration schema is located [here](dace/config_schema.yml). |
| 61 | + |
| 62 | +Useful environment variable configurations include: |
| 63 | + |
| 64 | +* `DACE_CONFIG` (default: `~/.dace.conf`): Override DaCe configuration file choice. |
| 65 | + |
| 66 | +Context configuration: |
| 67 | + * `DACE_use_cache` (default: False): Uses DaCe program cache instead of re-optimizing and compiling programs. |
| 68 | + * `DACE_debugprint` (default: True): Print debugging information. |
| 69 | + |
| 70 | +CPU target configuration: |
| 71 | + * `DACE_compiler_cpu_executable` (default: g++): Chooses the default C++ compiler for CPU code. |
| 72 | + * `DACE_compiler_cpu_additional_args` (default: None): Additional compiler flags (separated by spaces). |
| 73 | + |
| 74 | +SDFG processing: |
| 75 | + * `DACE_optimizer_interface` (default: `dace.transformation.optimizer.SDFGOptimizer`): Controls the SDFG optimization process. If empty or class name is invalid, skips process. By default, uses the transformation command line interface. |
| 76 | + * `DACE_optimizer_visualize` (default: False): Visualizes optimization process by saving .dot (GraphViz) files after each pattern replacement. |
| 77 | + |
| 78 | +Profiling: |
| 79 | + * `DACE_profiling` (default: False): Enables profiling measurement of the DaCe program runtime in milliseconds. Produces a log file and prints out median runtime. |
| 80 | + * `DACE_treps` (default: 100): Number of repetitions to run a DaCe program when profiling is enabled. |
| 81 | + |
| 82 | + |
| 83 | +Contributing |
| 84 | +------------ |
| 85 | +DaCe is an open-source project. We are happy to accept Pull Requests with your contributions! |
| 86 | + |
| 87 | +License |
| 88 | +------- |
| 89 | +DaCe is published under the New BSD license, see LICENSE. |
| 90 | + |
0 commit comments