ov-update-pytorch-version
Installation
SKILL.md
Update PyTorch Version in OpenVINO
End-to-end procedure for bumping the PyTorch version used by OpenVINO layer tests and the PyTorch frontend, and fixing the regressions that typically follow.
Step 0: Confirm Scope
Before editing anything, confirm with the user:
- Target versions for
torch,torchvision:torchvisionminor = torch minor + 15 — e.g. torch2.9.0↔ torchvision0.24.0, torch2.12.0↔ torchvision0.27.0. Always confirm against the official release matrix.torchaudiois not pinned by tests/requirements_pytorch: it is unused by these tests and PyTorch removed it from the official installation instructions starting with the 2.8 release. Do not re-add it. If a future task genuinely needs torchaudio, note that it is in a maintenance phase and its latest release can lag torch by one or more minors (e.g. torch2.12.0↔ torchaudio2.11.0), sotorchaudio==<torch version>may not exist — look up the latest available wheel athttps://download.pytorch.org/whl/cpu/torchaudio/. Recent torchaudio wheels carry noRequires-Dist: torchpin, so a slightly older torchaudio installs cleanly alongside a newer torch.
- Whether tests/model_hub_tests/pytorch/envs/compile_gptq.txt (pinned at
torch==2.3.1,torchaudio==2.3.1for auto-gptq) should be touched. Default: leave it alone. - Both the default TorchScript path and
PYTORCH_TRACING_MODE=EXPORT(FX) path must be validated. Skip the FX run only if the user explicitly opts out.
Step 1: Update Version Pins
Edit the following files. Keep ~= style in constraints.txt, exact == in requirements_*. A.B is the torchvision version (torch minor + 15):