trunk/6060fdb0ae15b62cf04fd50d20fabf2eb84f33b2: Fix FakeTensor wrapping for meta tensor constructor (#186188)
- PyTorch: 211 events in the last 90 days
- PyTorch: 208th Release in the last 90 days
- Previous: earlier the same day · trunk/6a1f98d375156c5f86082483ca0dd4398b80d1c5: Use empty() rather than size() > 0 in the generated backward() (#195102)
What happened
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…
Summary assembled by rule from the sources below