-
Notifications
You must be signed in to change notification settings - Fork 129
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
Symbol specialization in auto_optimizer()
never took effect.
#1410
Conversation
The `dict` that was storing all the symbols, `known_symbols`, was emptied just after its creation. The efect was that the specialization never took effect.
After looking again at the code I realized that I should have deleted the other definition of `known_symbols`.
I'm a bit confused, the change (now) seems to be the exact inverse of what it originally was. While I see that this line should be removed, shouldn't this have no effect on behavior whatsoever since it is effectively a dead (or succeeded) line of code? |
I think the difference is because of the following loop (see file However, if |
I agree. Basically, if you only look at these two lines, it would seem that the reset should be removed (as initially proposed): dace/dace/transformation/auto/auto_optimize.py Lines 649 to 650 in 6691322
However, looking at the larger context, it becomes clear that the dict comprehension of the first initialization is a strict super set of the later filtering code: dace/dace/transformation/auto/auto_optimize.py Lines 649 to 659 in 6691322
And this is in line with the doc-string:
So it seems like it's best to initialize empty and remove the redundant dict comprehension. |
The
dict
that was storing all the symbols,known_symbols
, was emptied just after its creation. The efect was that the specialization never took effect.