Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DeadDataFlowElimination removing neccessary typehint #1226

Closed
wants to merge 3 commits into from

Conversation

Luo-Yihang
Copy link
Contributor

@Luo-Yihang Luo-Yihang commented Mar 21, 2023

Motivation

This is pr tries to fix the issue #1150, which suggests DeadDataFlowElimination may unintentionally remove the required type hint of a tasklet variable, leading to the failure of sdfg compilation.

Modification

Added the type hint expression to the beginning of the tasklet.

May need confirm

  • Will it be better to add the type hint only if the variable is found in the tasklet code?
  • Is it correct that the type hint is hardcoded to dace.float64? If not, what is the appropriate way to obtain the variable type?

@tbennun
Copy link
Collaborator

tbennun commented Apr 13, 2023

@Luo-Yihang the type hint should not be hardcoded to float64. You can get the type of the connector by first querying it (connectors are dictionaries), and if it's None you need to infer it from the memlet (which data container is connected to it).

It would be nice to not do it if the connector name is not found in the tasklet (see ASTFindReplace)

@tbennun
Copy link
Collaborator

tbennun commented Feb 25, 2024

Superseded by #1499

@tbennun tbennun closed this Feb 25, 2024
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