Files
pytorch/test
Guilherme Leobas 39839dbc39 Include one level of stack trace in the lru_cache warning msg (#171496)
Fixes #167991

Example of the new warning message:

```python
/home/guilhermel/git/pytorch313/torch/_dynamo/variables/functions.py:2159: UserWarning: Dynamo detected a call to a `functools.lru_cache`-wrapped function at 'script.py:12'. Dynamo ignores the cache wrapper and directly traces the wrapped function. Silent incorrectness is only a *potential* risk, not something we have observed. Enable TORCH_LOGS=+dynamo for a DEBUG stack trace.

This call originates from:
  File "/path/to/script.py", line 12, in bar
    return baz(x)

  torch._dynamo.utils.warn_once(msg)
```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/171496
Approved by: https://github.com/Lucaskabela
2026-01-01 18:17:57 +00:00
..
2025-12-23 11:57:32 +00:00
2025-12-23 11:57:32 +00:00
2025-12-22 11:39:09 +00:00
2025-12-23 11:57:32 +00:00
2025-10-21 03:30:57 +00:00
2025-12-24 06:24:17 +00:00