mirror of
https://github.com/pytorch/pytorch.git
synced 2026-11-20 09:04:25 +08:00
c6155b1bc8
## Summary - Add an offline check that each `test/cpython/v3_13` adapted test and its `.diff` stay in sync: reverse-apply the diff, match `sha256(pristine)` from `upstream_manifest.json` (tag/path taken from each file header), and assert `apply(pristine, diff) == adapted`. - Add `tools/regenerate_cpython_diffs.py` to fetch upstream sources, regenerate stale diffs, and refresh the manifest. - Regenerate drifted `.diff` files, add the missing source URL on `test_unittest/test_assertions.py`, and fix three headers that pointed at the wrong upstream file (`test_binop`, `test_heapq`, `test_patma`). Fixes #189607 ## Test plan - [x] `python tools/regenerate_cpython_diffs.py --check` - [ ] `python test/dynamo/test_cpython_diff_sync.py CPythonDiffSyncTests` - [ ] Confirm CI runs the new dynamo sync test Pull Request resolved: https://github.com/pytorch/pytorch/pull/191767 Approved by: https://github.com/guilhermeleobas, https://github.com/williamwen42 Co-authored-by: Guilherme Leobas <guilhermeleobas@gmail.com>
This directory contains the useful tools.