Published January 22, 2022
| Version v0.12
Software
Open
spcl/dace: DaCe 0.12
Creators
- Tal Ben-Nun
- definelicht
- alexnick83
- Tiziano De Matteis
- Saurabh Raje1
- Andreas Kuster
- Oliver Rausch
- Manuel Burger
- Philipp Schaad2
- Carl Johnsen
- Luca Lavarini
- Stefan Scholbe2
- Dominic Hofer3
- Gabriel Gavrilas
- Andrei Ivanov
- thobauma
- gronerl
- jnice-81
- Berke Ates
- Benjamin Simmonds
- cwriter
- Jan Kleine
- Marc Widmer4
- Timo Schneider5
- czox
- Felix Thaler
- Johann Dahm
- Mamy Ratsimbazafy6
- Neville Walo
- 1. University of Utah
- 2. ETH Zürich
- 3. MeteoSwiss
- 4. ETH Zurich
- 5. ETH
- 6. @status-im @numforge
Description
API Changes
Important: Pattern-matching transformation API has been significantly simplified. Transformations using the old API must be ported! Summary of changes:
- Transformations now expand either the
SingleStateTransformation
orMultiStateTransformation
classes instead of using decorators - Patterns must be registered as class variables called
PatternNode
s - Nodes in matched patterns can be then accessed in
can_be_applied
andapply
directly usingself.nodename
- The name
strict
is now replaced withpermissive
(False by default). Permissive mode allows transformations to match in more cases, but may be dangerous to apply (e.g., create race conditions). can_be_applied
is now a method of the transformation- The
apply
method accepts a graph and the SDFG.
Example of using the new API:
import dace
from dace import nodes
from dace.sdfg import utils as sdutil
from dace.transformation import transformation as xf
class ExampleTransformation(xf.SingleStateTransformation):
# Define pattern nodes
map_entry = xf.PatternNode(nodes.MapEntry)
access = xf.PatternNode(nodes.AccessNode)
# Define matching subgraphs
@classmethod
def expressions(cls):
# MapEntry -> Access
return [sdutil.node_path_graph(cls.map_entry, cls.access)]
def can_be_applied(self, graph: dace.SDFGState, expr_index: int, sdfg: dace.SDFG, permissive: bool = False) -> bool:
# Returns True if the transformation can be applied on a subgraph
if permissive: # In permissive mode, we will always apply this transformation
return True
return self.map_entry.schedule == dace.ScheduleType.CPU_Multicore
def apply(self, graph: dace.SDFGState, sdfg: dace.SDFG):
# Apply the transformation using the SDFG API
pass
Simplifying SDFGs is renamed from sdfg.apply_strict_transformations()
to sdfg.simplify()
AccessNodes no longer have an AccessType
field.
- More nested SDFG inlining opportunities by default with the multi-state inline transformation
- Performance optimizations of the DaCe framework (parsing, transformations, code generation) for large graphs
- Support for Xilinx Vitis 2021.2
- Minor fixes to transformations and deserialization
Full Changelog: https://github.com/spcl/dace/compare/v0.11.4...v0.12
Files
spcl/dace-v0.12.zip
Files
(2.4 MB)
Name | Size | Download all |
---|---|---|
md5:f8374c45f2c88770e7fa7154a49df3e1
|
2.4 MB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/spcl/dace/tree/v0.12 (URL)