Skip to content

Commit 256a0a6

Browse files
committed
Initial commit of DaCe and DIODE
1 parent 572a359 commit 256a0a6

File tree

356 files changed

+101524
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

356 files changed

+101524
-3
lines changed

.gitignore

+57
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,60 @@ venv.bak/
102102

103103
# mypy
104104
.mypy_cache/
105+
106+
# Windows
107+
Thumbs.db
108+
109+
# Ignore files built by Visual Studio [code]
110+
*.obj
111+
*.exe
112+
*.pdb
113+
*.user
114+
*.dot
115+
*.jpg
116+
*.aps
117+
*.pch
118+
*.vspscc
119+
*_i.c
120+
*_p.c
121+
*.ncb
122+
*.suo
123+
*.tlb
124+
*.tlh
125+
*.bak
126+
*.cache
127+
*.ilk
128+
[Bb]in
129+
[Dd]ebug*/
130+
*.lib
131+
*.sbr
132+
obj/
133+
[Rr]elease*/
134+
_ReSharper*/
135+
[Tt]est[Rr]esult*
136+
.vs/
137+
.vscode/
138+
src.VC.db
139+
src.VC.VC.opendb
140+
*.exp
141+
142+
# DaCe
143+
.dacecache/
144+
out.sdfg
145+
*.dot
146+
*.out
147+
results.log
148+
perf.json
149+
perf*.csv
150+
/dace/frontend/octave/parsetab.py
151+
152+
# Xilinx
153+
xilinx_vcu1525_*
154+
sdaccel_profile_*
155+
sdaccel_timeline_*
156+
157+
# NVIDIA
158+
*.nvprof
159+
160+
# Miscellaneous
161+
*~

.gitmodules

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[submodule "dace/external/cub"]
2+
path = dace/external/cub
3+
url = https://github.com/NVlabs/cub.git
4+
branch = 1.8.0
5+
[submodule "dace/external/moodycamel"]
6+
path = dace/external/moodycamel
7+
url = https://github.com/cameron314/concurrentqueue.git
8+
[submodule "dace/external/hlslib"]
9+
path = dace/external/hlslib
10+
url = https://github.com/definelicht/hlslib.git

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2019, SPCL
3+
Copyright (c) 2019, Scalable Parallel Computing Lab, ETH Zurich
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

README.md

+90-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,90 @@
1-
# dace
2-
DaCe - Data Centric Parallel Programming
1+
![D](dace.svg)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+

dace.svg

+84
Loading

dace/__init__.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from .types import *
2+
3+
# Python frontend
4+
from .frontend.python.decorators import *
5+
from .frontend.python.ndarray import *
6+
from .frontend.python.ndloop import ndrange
7+
from .frontend.python.simulator import simulate
8+
9+
from .config import Config
10+
from .frontend.operations import *
11+
from .sdfg import compile, SDFG, SDFGState
12+
from .memlet import Memlet, EmptyMemlet
13+
from .graph.edges import InterstateEdge
14+
from .symbolic import symbol, eval

0 commit comments

Comments
 (0)