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

Dead Dataflow Elimination type hints do not work with all types #1710

Closed
pratyai opened this issue Oct 28, 2024 · 2 comments · Fixed by #1725
Closed

Dead Dataflow Elimination type hints do not work with all types #1710

pratyai opened this issue Oct 28, 2024 · 2 comments · Fixed by #1725
Labels
bug Something isn't working
Milestone

Comments

@pratyai
Copy link
Collaborator

pratyai commented Oct 28, 2024

Graph: https://polybox.ethz.ch/index.php/s/5E0CXQPC7oYMVnc

Error in dace/transformation/passes/dead_dataflow_elimination.py:

AttributeError: type object 'numpy.float64' has no attribute 'to_string'. Did you mean: 'tostring'?
@pratyai pratyai added the bug Something isn't working label Oct 28, 2024
@tbennun
Copy link
Collaborator

tbennun commented Oct 28, 2024

I have seen this before with other types (dace.bool) too. It is a recent regression added by a "good first issue" PR we merged. There are two issues here:

  1. the type should not be numpy.float64, but dace.float64 (and perhaps in a separate PR, adding numpy types to the type annotation hints is useful!)
  2. We should instead use another way to turn the typeclass into a Python tasklet compatible string.

We should add two tests: numpy types and dace.bool/dace.bool_.

@tbennun tbennun added this to the 1.0 milestone Oct 29, 2024
@tbennun tbennun changed the title simplify() fails for SDFG that validates and compile Dead Dataflow Elimination type hints do not work with all types Oct 29, 2024
@tbennun
Copy link
Collaborator

tbennun commented Nov 3, 2024

I can confirm that this is resolved in #1725. You can retry your SDFG or code with that. It was type inference returning a numpy type instead of the expected return type of dtypes.typeclass. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants