Open IvanYashchuk opened 3 months ago
triage review:
torch.Tensor.numel
? Nah, this is actually inside thunder itself.numel
doesn't come up in numpy or other language contexts.Hi there,
I would love to take this issue as my first one!
I've been working on replacing .numel
with .numel()
everywhere, but encounter some errors when I do so. For instance, after making the replacement here, I get the following error information:
TypeError: 'int' object is not callable
I’ve checked, and it doesn't seem like the issue is related to the numel
variable defined in the environment. Could you provide any suggestions on how to resolve this error?
Thanks in advance!
🐛 Bug
PyTorch uses
tensor.numel()
while Thunder's TensorProxy and in the codebase it's used as a propertytensor.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.