Skip to content

[fix] Parse array is None if CFG conditionals when quering for memlets - #2487

Merged
tbennun merged 6 commits into
spcl:mainfrom
FlorianDeconinck:fix/parse_is_none_for_read_memlets
Aug 12, 2026
Merged

[fix] Parse array is None if CFG conditionals when quering for memlets#2487
tbennun merged 6 commits into
spcl:mainfrom
FlorianDeconinck:fix/parse_is_none_for_read_memlets

Conversation

@FlorianDeconinck

Copy link
Copy Markdown
Contributor

We encounter a case of CFG within a NestedSDFG where the condition is of the form

array is None

and where array is a legit optional parameter. The SDFG -> STREE (and other) system relies on parsing the conditional AST to extract the arrays and propagate the memlets properly. The code ends up in dace.sdfg.memlets_in_ast where it is stated that the limitations are:

  • no indirect arrays (expecting to be able to use symbolic expression)
  • scalars

We propose here to add a narrow parse of array is None to strengthen the list. Implementation restrict the parsing to a single form to evade run away checks.

@tbennun tbennun left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor change, otherwise lgtm

Comment thread dace/sdfg/sdfg.py Outdated

@acalotoiu acalotoiu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tbennun
tbennun enabled auto-merge August 11, 2026 13:15
@tbennun
tbennun added this pull request to the merge queue Aug 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 12, 2026
@acalotoiu
acalotoiu added this pull request to the merge queue Aug 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 12, 2026
@tbennun
tbennun added this pull request to the merge queue Aug 12, 2026
Merged via the queue into spcl:main with commit 289e820 Aug 12, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants