- Notifications
You must be signed in to change notification settings - Fork0
DaCe - Data Centric Parallel Programming
License
Sajohn-CH/dace
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Decoupling domain science from performance optimization.
DaCe is afast parallel programmingframework that takes code in Python/NumPy and other programming languages, and maps it to high-performanceCPU, GPU, and FPGA programs, which can be optimized to achieve state-of-the-art. Internally, DaCeuses the Stateful DataFlow multiGraph (SDFG)data-centric intermediaterepresentation: A transformable, interactive representation of code based ondata movement.Since the input code and the SDFG are separate, it is possible to optimize aprogram without changing its source, so that it stays readable. On the otherhand, transformations are customizable and user-extensible, so they can be writtenonce and reused in many applications.With data-centric parallel programming, we enabledirect knowledge transferof performance optimization, regardless of the application or the target processor.
DaCe generates high-performance programs for:
- Multi-core CPUs (tested on Intel, IBM POWER9, and ARM with SVE)
- NVIDIA GPUs and AMD GPUs (with HIP)
- Xilinx and Intel FPGAs
DaCe can be written inline in Python and transformed in the command-line/JupyterNotebooks or SDFGs can be interactively modified using ourVisual Studio Code extension.
Install DaCe with pip:pip install dace
Having issues? See our fullInstallation and Troubleshooting Guide.
Using DaCe in Python is as simple as adding a@dace
decorator:
importdaceimportnumpyasnp@dacedefmyprogram(a):foriinrange(a.shape[0]):a[i]+=ireturnnp.sum(a)
Callingmyprogram
with any NumPy array or GPU array (e.g., PyTorch, Numba, CuPy) willgenerate data-centric code, compile, and run it. From here on out, you canoptimize (interactively or automatically),instrument, anddistributeyour code. The code creates a shared library (DLL/SO file) that can readilybe used in any C ABI compatible language (C/C++, FORTRAN, etc.).
For more information on how to use DaCe, see thesamples or tutorials below:
- Getting Started
- Benchmarks, Instrumentation, and Performance Comparison with Other Python Compilers
- Explicit Dataflow in Python
- NumPy API Reference
- SDFG API
- Using and Creating Transformations
- Extending the Code Generator
The paper for the SDFG IR can be foundhere.Other DaCe-related publications are available on ourwebsite.
If you use DaCe, cite us:
@inproceedings{dace,author ={Ben-Nun, Tal and de~Fine~Licht, Johannes and Ziogas, Alexandros Nikolaos and Schneider, Timo and Hoefler, Torsten},title ={Stateful Dataflow Multigraphs: A Data-Centric Model for Performance Portability on Heterogeneous Architectures},year ={2019},booktitle ={Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis},series ={SC '19}}
DaCe is an open-source project. We are happy to accept Pull Requests with your contributions! Please follow thecontribution guidelines before submitting a pull request.
DaCe is published under the New BSD license, seeLICENSE.