Lightning-AI / Lightning-AI/lightning-thunder
make traces own proxies and bsyms
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 121
- PR merge metrics
- No merged PRs in 30d
Description
Currently, we do not guard against inconsistencies in traces resulting from proxies not being linked to them except through the names attribute.
This proposes to change it:
- make the "names" set into a dict name->proxy,
- make `Proxy.owning_trace` / `BoundSymbol.owning_trace` a weak ref to the owning trace,
- have a mechanism to copy proxies and bsyms to a trace,
- enforce (at least in debug mode but maybe in general?) that a proxy/bsym is used in a trace only if it is in names and the owning trace is using it.
Note that many of the hard to debug "key error" issues in 2024 came from inconsistencies that would be disallowed.
cc @mruberry @lantiga @apaz-cli
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by locating the Trace, Proxy, and BoundSymbol definitions and the current names handling, then trace how proxies and bound symbols are associated with traces; done means ownership, copying, and consistency checks are designed and covered for the stated invariants.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100