trunk/6060fdb0ae15b62cf04fd50d20fabf2eb84f33b2: Fix FakeTensor wrapping for meta tensor constructor (#186188)
- PyTorch 近 90 天出现 214 次
- PyTorch 近 90 天第 211 次发版
- 上一次:同一天稍早 · trunk/6a1f98d375156c5f86082483ca0dd4398b80d1c5: Use empty() rather than size() > 0 in the generated backward() (#195102)
发生了什么
The C++ tensor constructor returned directly from its Meta shortcut before reaching the shared lift_fresh path. Under FakeTensorMode, this bypassed mode dispatch and returned a plain Meta tensor. Keep the no-CPU-allocation shortcut, but continue through lift_fresh. For the deferred device-move path, distinguish the requested device from the tensor's actual construction device so storage-backed inputs still move corr…
摘要按规则整理自下方来源原文