spcl / spcl/dace

`nest_sdfg_subgraphs` fails on interstate symbols

Open
#1,162 1 comment 0 reactions 1 assignee Claimed by @alexnick83 View on GitHub
bug
Dominant language
Python
Stars
593
Forks
163
Avg merge
2d 23h
Merged PRs (30d)
60

Description

The helper function `nest_sdfg_subgraphs` from `dace.transformation.helpers` assumes symbols in interstate edges' `assigments` dictionary are present in symbols (but they not necessariliy are). E.g. this snippet reproduces the error.

```
import dace
from dace.transformation.helpers import nest_sdfg_subgraph

sdfg = dace.SDFG('testsdfg')
sdfg.add_loop(
sdfg.add_state('before_state'),
sdfg.add_state('loop_state'),
sdfg.add_state('after_state'),
loop_var='k',
initialize_expr='0',
condition_expr='1<2', # <- avoid having k on the value side of the assignments dict
increment_expr='1',# <- avoid having k on the value side of the assignments dict
)
sdfg.validate()

subgraph = dace.sdfg.graph.SubgraphView(sdfg, sdfg.states())
nest_sdfg_subgraph(sdfg, subgraph=subgraph)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.