Open riccardofelluga opened 2 weeks ago
The purpose of this attribute is to generate new unique names for Proxy objects. There are passes like CSE and DCE that remove operations from the trace. These passes that remove operations could also modify the .names
attribute.
What are you trying to achieve or what problems do you face with the set in .names
not being the same as the set of actually used proxy names?
🐛 Bug
As of now, if you run something like this:
the list of names does not correspond with the names present in the trace.
Expected behavior
What should be is that the names are only the ones present in the trace and nothing more. This has effect on registering new symbols in the trace where names conflicts can happen even tho there are no bound symbols with the same name in the trace due to the check here:
https://github.com/Lightning-AI/lightning-thunder/blob/fceb64efc93a80a27d38b8e84f0e2b5f132f3d2f/thunder/core/trace.py#L170-L175