Lightning-AI/lightning-thunder

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

Open

#925 创建于 2024年8月5日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)Python (114 fork)github user discovery
good first issue

仓库指标

Star
 (1,460 star)
PR 合并指标
 (PR 指标待抓取)

描述

🐛 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.

贡献者指南