Lightning-AI/lightning-thunder

Make `numel` a method of TensorProxy not a property attribute

Open

#925 geöffnet am 5. Aug. 2024

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (114 Forks)github user discovery
good first issue

Repository-Metriken

Stars
 (1.460 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

🐛 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