-
Notifications
You must be signed in to change notification settings - Fork 66
If we not removed initialized input, should we keep initializer also? #2235
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
Comments
I am not following this. Could you share a concrete example? |
In the code below first run is successful, while second run gives ValueError: Required inputs (['two']) are missing from input feed (['x']). after remove_unused_nodes
|
So I guess we need to keep the initializer values as well, right? |
Notes:
|
|
Should it be |
|
Done. |
Sounds reasonable. Maybe create a pass that is "remove unused inputs"? |
Err, I think rather about just intrnal function in |
|
Whichever is the most simple. |
My apologies, can't run linters here |
Sorry about the delayed response ... didn't see this thread when looking at the PR. I agree with the initial conclusion (by both of you): since this is part of the contract with the external world (callers), it seems best to keep the same set of inputs ... and not to remove the initializer when it is also an input. Removing the initializer/input can be a separate (semantics-altering) transformation, not part of DCE which is supposed to preserve behavior |
Me still haunted by #2211
We allow hanging inputs, because it is part of interface, but we are removing it's initializer if exist. May be we should keep it, because it is affects interface either, - now user can ignore it before DCE pass, but can not ignore after.
The text was updated successfully, but these errors were encountered: