spcl / spcl/dace

Codegen: View Shadows Array in NestedSDFG

Open
#1,612 1 comment 0 reactions 0 assignees View on GitHub
codegen
Dominant language
Python
Stars
593
Forks
163
Avg merge
2d 23h
Merged PRs (30d)
60

Description

I have a strange error, after some experiments I have concluded the following:
- There is a nested SDFG that has a transient of name, e.g. "X".
- In the parent SDFG there is a view that has the same name, i.e. "X"

In that case the code generator will generate for the nested SDFG:
```c++
X = new float[N];
```
without declaring `X`, i.e. the line `float* X`, that should precede the allocation, is missing.

Currently I have only a big SDFG that has this pattern.
The error vanishes, once I rename the view in the top level SDFG or turn it into an array.
I added the SDFG and scripts that shows I "fixed" the error.

I will also try to come up with a smaller example.
[example.zip](https://github.com/user-attachments/files/16095040/example.zip)

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.