[strict-export][install_free_tensors] Tracker for issues
- Dominant language
- Python
- Stars
- 103k
- Forks
- 29.5k
- PR merge metrics
- PR metrics pending
Description
### 🐛 Describe the bug
Tracker for the issues observed/skipped in https://github.com/pytorch/pytorch/pull/164691
### Discrepancy between compile/export and pytorch eager
In https://github.com/pytorch/pytorch/pull/106824, export decided to slow-path for MultiHeadAttention module (look into the PR description as to why). But that PR eventually caused a divergence between Dynamo and export. This divergence is undesirable.
https://github.com/pytorch/pytorch/pull/164721 decides to take the easy way where the compile and export do not diverge anymore, but they diverge with pytorch eager. This issue is for tracking this.
### Other failures
- [ ] test/inductor/test_aot_inductor.py::AOTInductorTestABICompatibleGpu::test_large_weight_cuda - I think earlier we were just installing the module, but now we install a tensor which calls clone and leads to just a temporary peak memory, causing OOM. I dont think there is an easier way to solve this. Skipping the test.
```
2025-09-28T04:24:38.6581623Z File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 451, in __call__
2025-09-28T04:24:38.6582200Z vt = self._wrap(value)
2025-09-28T04:24:38.6582729Z File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 678, in _wrap
2025-09-28T04:24:38.6583314Z return type_dispatch(self, value)
2025-09-28T04:24:38.6583916Z File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 2069, in wrap_tensor
2025-09-28T04:24:38.6584546Z return self.tx.output.register_attr_or_module(
2025-09-28T04:24:38.6585206Z File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 1228, in register_attr_or_module
2025-09-28T04:24:38.6585851Z return wrap_name(name)
2025-09-28T04:24:38.6586389Z File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/output_graph.py", line 1138, in wrap_name
2025-09-28T04:24:38.6586947Z vt = wrap_fx_proxy(
2025-09-28T04:24:38.6587506Z File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 2695, in wrap_fx_proxy
2025-09-28T04:24:38.6588199Z return wrap_fx_proxy_cls(target_cls=TensorVariable, **kwargs)
2025-09-28T04:24:38.6588901Z File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 2765, in wrap_fx_proxy_cls
2025-09-28T04:24:38.6589538Z return _wrap_fx_preexisting_tensor(
2025-09-28T04:24:38.6590192Z File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 2814, in _wrap_fx_preexisting_tensor
2025-09-28T04:24:38.6590940Z proxy.tracer.real_value_cache[proxy.node] = _clone_input(
2025-09-28T04:24:38.6591698Z File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 2679, in _clone_input
2025-09-28T04:24:38.6592495Z value = clone_input(value)
2025-09-28T04:24:38.6609558Z File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 2173, in clone_input
2025-09-28T04:24:38.6610124Z return torch_clone(x)
2025-09-28T04:24:38.6610625Z File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 2113, in torch_clone
2025-09-28T04:24:38.6611161Z y = torch.clone(x)
2025-09-28T04:24:38.6614393Z torch._dynamo.exc.InternalTorchDynamoError: OutOfMemoryError: CUDA out of memory. Tried to allocate 2.00 GiB. GPU 0 has a total capacity of 22.06 GiB of which 13.82 GiB is free. Process 116779 has 250.00 MiB memory in use. Including non-PyTorch memory, this process has 6.33 GiB memory in use. Process 119345 has 250.00 MiB memory in use. Process 119456 has 610.00 MiB memory in use. Process 122744 has 250.00 MiB memory in use. Process 123003 has 558.00 MiB memory in use. 6.40 GiB allowed; Of the allocated memory 6.01 GiB is allocated by PyTorch, and 15.35 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
```
### Error logs
_No response_
### Versions
NA
cc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @Lucaskabela @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4
Contributor guide
Assessment
This issue has not been assessed yet.