Project Structure

DaCe is divided into the following subfolders:

  • Interfaces and entry points:
  • Intermediate representation:
    • sdfg: The SDFG Builder API

      • sdfg/graph.py: General graph API for manipulation and traversal of nodes, edges, and their contents

      • sdfg/{nodes, scope, sdfg, state}.py: Interfaces for specific SDFG components

      • sdfg/validation.py: Functions that validate the correctness of SDFGs. See Graph Validation

      • sdfg/propagation.py: Memlet Propagation

    • dtypes.py: Basic enumerations and data types that are used in DaCe

    • data.py: Definitions for usage and creation of Data Containers and Access Nodes

    • memlet.py: Definition of a Memlet

    • subsets.py: Subset types used in memlets (e.g., Range)

    • symbolic.py: Symbolic types, expressions, conversion, and analysis functions. See Symbols and symbolic

  • Optimization and transformation:
    • transformation: Transformation classes and helpers. See Pattern-Matching and Subgraph Transformations

      • transformations/{dataflow, interstate, subgraph}: Built-in DaCe transformations

    • optimization: Automatic SDFG tuning interfaces

  • Backends:
    • codegen: Code Generation

    • runtime: Thin runtime that supports DaCe-generated code. See C++ Runtime Headers

    • sourcemap.py: Source mapping capabilities that maps frontend code <–> SDFG <–> generated code

  • Library nodes and libraries (See libraries):
    • library.py: Library interface

    • libraries: Built-in libraries

  • Configuration
    • config.py: Configuration-related classes. See Configuring DaCe

    • config_schema.yml: Configuration specification file (schema) with defaults and documentation

  • Miscellaneous
    • serialize.py and registry.py: Functionality that supports serialization and extensibility. See Properties and Serialization

    • external: Git submodules containing necessary external projects

    • viewer: Contains infrastructure for rendering SDFGs. Used in Jupyter notebooks and in sdfv - SDFG Viewer