Lightning-AI / Lightning-AI/lightning-thunder
Make `numel` a method of TensorProxy not a property attribute
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 121
- PR merge metrics
- No merged PRs in 30d
Description
## 🐛 Bug
PyTorch uses `tensor.numel()` while Thunder's TensorProxy and in the codebase it's used as a property `tensor.numel`. The property attribute makes more sense, but it conflicts with setting PyTorch as the default language context (https://github.com/Lightning-AI/lightning-thunder/pull/924).
Related PR: https://github.com/Lightning-AI/lightning-thunder/pull/278
We should decide what to do with `numel` and how to avoid the discrepancy with PyTorch.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating TensorProxy and every use of numel in the codebase, then compare those uses with PyTorch's tensor.numel() convention. Resolve whether numel should be a method or property and verify that the chosen interface is consistent throughout the project.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- compilers, machine-learning
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100