viable/strict/1792517296: [fx] Make _Patcher's already-patched guard actually fire (#201464)
- PyTorch 近 90 天出现 2597 次
- PyTorch 近 90 天第 2558 次发版
- 上一次:同一天稍早 · viable/strict/1792504417
发生了什么
Summary: _Patcher.patch and _Patcher.patch_method mark each new wrapper with new_fn.__fx_already_patched = deduplicate . Inside class _Patcher , Python name-mangles that attribute to _Patcher__fx_already_patched , while the guard reads getattr(..., "__fx_already_patched", False) , so the guard never fires. As a result, a re-entrant trace (one that starts while a module global already holds FX's wrapper for a torch.f…
摘要按规则整理自下方来源原文