pytorch-lightning
f9751d27 - ci: drop PyTorch 2.1-2.5 and raise minimum to 2.6 (#21851)

Commit
91 days ago
ci: drop PyTorch 2.1-2.5 and raise minimum to 2.6 (#21851) * ci: drop PyTorch 2.1-2.5 and raise minimum to 2.6 (1/n) Prune the oldest PyTorch minors (2.1-2.5) from the CPU test matrices now that we test up to 2.13, and raise the supported floor to 2.6: - ci-tests-{pytorch,fabric}: replace the 2.1-2.5 'lightning' rows with coverage at the new floor (2.6) and latest (2.13); bump the 'oldest' job from 2.1 to 2.6. - requirements: torch >=2.1.0 -> >=2.6.0 (base/pytorch/fabric); fix the stale upper bound <2.10.0 -> <2.14.0; torchvision >=0.16.0 -> >=0.21.0 with upper bound <0.26.0 -> <0.29.0. - remove per-version special-cases for versions no longer tested: the torch 2.7 test-channel URL switch and the torch 2.4 Windows libuv workaround. PyTorch upstream only patches the newest minor, and Lightning's own policy supports the latest 5 minors (2.9-2.13); 2.6 is a conservative floor above every current ecosystem minimum. * ci: raise deepspeed and onnx floors for torch 2.6 The 'oldest' job pins every dependency to its lower bound, which broke against the new torch 2.6 floor: - deepspeed: Lightning itself raises 'PyTorch >= 2.6 requires DeepSpeed >= 0.16.0' (strategies/deepspeed.py), but the pin allowed 0.15.0. - onnxruntime: 1.12.0 supports at most model IR version 8, while torch 2.6 exports IR version 10; bump to the first release covering it. onnx is bumped alongside for IR-10 consistency. * ci: retire CUDA 12.1 images in favor of 12.6 (cu126) The cu121 wheel index stops at torch 2.5.1, so the GPU jobs could not resolve any torch once the floor moved to >=2.6.0: Because only torch<=2.5.1+cu121 is available and lightning-fabric==2.6.2 depends on torch>=2.6.0,<2.14.0 ... cu126 publishes wheels for the whole 2.6-2.13 range (cp310 and cp312), so point the remaining nvidia/cuda:12.1.1 images at 12.6.3. Adding a cu130 lane is left for a follow-up since it needs a runner driver bump. * ci: cap torch <2.13 and move GPU 3.12 lanes to cu130 torch-tensorrt has no build for torch 2.13 on any CUDA lane, so the GPU install was unresolvable. cu130 is the only lane shipping torch-tensorrt for torch 2.12; the oldest 3.10 lane stays on cu126, which is the only lane carrying torch 2.6. Images are now set per matrix row rather than inherited from the default, so checkgroup job names are updated to match. * fix: honor torch.device context in _DeviceDtypeModuleMixin on torch <2.8 torch.get_default_device() only started reading the function mode stack in 2.8, so on 2.3-2.7 it returned cpu inside a 'with torch.device(...)' block and the mixin recorded the wrong device. Gate on 2.8 instead of 2.3 and cover it with a meta-device parametrization. Also drops a duplicated _TORCH_GREATER_EQUAL_2_6 definition. * ci: decouple torch-tensorrt from the GPU install torch-tensorrt hard-pins to one torch minor and lags new releases, so as a hard dependency it made every new torch version unresolvable. Install it separately, matched to the resolved torch: when no build exists the step is a no-op and the RunIf(tensorrt=True) tests skip instead of failing CI. Pinning to the torch minor is deliberate - _TORCH_TRT_AVAILABLE falls back to importing the module, so a mismatched build would pass the gate and then fail on import. * update image names and versions * update image versions * revert a few changes * tests: ignore torch.distributed.nn.functional.all_gather FutureWarning Deprecated in torch 2.12 and escalated to an error by our filterwarnings config. The suggested replacement is a private torch API, so the ignore is keyed to the message (stacklevel makes a module-based filter unreliable), matching the existing torch deprecation entries. * add ignore * update * revert the test gpu change * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * ci: raise bitsandbytes ceiling to pick up cuda130 binaries bitsandbytes only started shipping a libbitsandbytes_cuda130.so in 0.48.0, so the <0.47.0 cap was resolving to a build with no cu130 binary on the L4 cu130 lane. * ci: drop redundant Darwin marker for torch-tensorrt in test_gpu This file is only ever installed by the GPU CI workflow, which never runs on Darwin, so the platform_system check was dead weight. * tests: tolerate torch.compile cleanup leakers on newer torch Testing against newer torch surfaced new torch.compile subprocess-pool side effects that the cleanup fixtures didn't account for: - allowlist the TRITON_PTXAS_PATH env var (set by inductor) - teach thread_police about the subproc_worker_timer watchdog thread and native _DummyThreads that can't be joined/stopped * update * revert change in test_gpu.txt * update comments --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Deependu <deependujha21@gmail.com>
Author
Parents
Loading