Debian Patches

Status for pytorch/2.6.0+dfsg-9

Patch Description Author Forwarded Bugs Origin Last update
0002-cmake-4.patch [PATCH] [Cherry-pick] Make PyTorch buildable with cmake-4 (#150460)
* [Cmake] Make PyTorch buildable by CMake-4.x (#150203)

By turning on compatibility mode for protobuf, nnpack, PSimd and FP16, ittapi, TensorPipe and Gloo
Update CMake requirements

Revert 0ece461ccafe5649d2d0f058ff5477765fd56499 and b0901d62ae2c2e909f91401eacebf3731df20cbe to test that it actually works

TODO:
- Update/get rid of those libraries

Fixes https://github.com/pytorch/pytorch/issues/150149

Pull Request resolved: https://github.com/pytorch/pytorch/pull/150203
Approved by: https://github.com/clee2000

(cherry picked from commit 493c7fa66f82cf781ee0f9d0cc9e305688f0a286)

* Make PyTorch buildable by CMake-4.x on s390x (#150294)

This is a continuation of
https://github.com/pytorch/pytorch/pull/150203
that fixes nightly build on s390x.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/150294
Approved by: https://github.com/malfet

(cherry picked from commit ab342d3793472c65aaa0b007ca13a98fc9206dc5)
Nikita Shulga <2453524+malfet@users.noreply.github.com> no 2025-04-01
0003-gloo-shared-store.patch [PATCH] gloo: use shared Stores (#150230)
Summary:

This modifies `connectFullMesh` to take in a shared_ptr<IStore> instead of a reference. This is an API breaking change but fairly easy to work around.

To have backwards compatibility in PyTorch during the commit phase we add a new ifdef `GLOO_SHARED_STORE` which can provide backwards compatibility until we update the pinned Gloo version in pytorch OSS repo.

This also adds a new `wait_get` method to `IStore` which will allow us to do a more efficient operation in PyTorch TCPStore. PyTorch's `Store::get` automatically waits so we want to make sure we can avoid waiting twice to reduce network traffic.

This change will land simultaneously in PyTorch and Gloo repos.

Test Plan:
```
buck2 test //gloo/... //caffe2/caffe2/contrib/gloo:
```

Differential Revision: D72084111

Pull Request resolved: https://github.com/pytorch/pytorch/pull/150230
Approved by: https://github.com/fduwjj
Tristan Rice <tristanr@meta.com> no 2025-04-01
1020-dirtyhack.patch The elegant patching work is based on the master branch https://github.com/pytorch/pytorch/issues/14699
And we will be able to use that solution in the next upstream release.
I don't want to rebase my patches back to this version, so let's go with a fast, yet dirty hack.
Mo Zhou no 2023-09-30
1030-use-system-dnnl.patch Enable DNNL/ideep integration Mo Zhou not-needed 2023-09-30
1040-cmake-strip-3rdparty.patch Patch cmake to strip third-party directory includes/checks. Mo Zhou not-needed 2023-08-22
1050-use-system-httplib.patch use system cpp-httplib instead.
===================================================================
not-needed
1060-remove-pkg-resources.patch Remove use of deprecated pkg_resources module. Replace with importlib.metadata from stdlib Shengqi Chen <harry-chen@outlook.com> yes debian upstream 2024-10-29
2000-version.patch make the "torch.__version__" and wheel version correct. The upstream use env vars instead. debian specific. Never forward this.
===================================================================
not-needed 2024-10-22
2050-pytorch_glog_update.patch move IsGoogleLoggingInitialized() to public API It was an internal function and project used hacks to reach it. Now it's part
of the public API.
Laszlo Boszormenyi (GCS) <gcs@debian.org> not-needed 2022-03-08
2060-fix-wrong-shebang.patch fix wrong shebang
--
===================================================================
Mo Zhou not-needed 2023-07-17
2080-fix-aten-config-cmake-path.patch avoid including the build path in the cmake configuration file not-needed 2023-09-06
2100-remove-opentelemetry.patch get rid of opentelemetry dependency which is not yet in debian
===================================================================
Mo Zhou <lumin@debian.org> not-needed
2101-fix-ftbfs-ld-sleef.patch =================================================================== not-needed
2200-remove-astunparse-dep.patch Remove dependency on astunparse It has been replaced with ast.unparse since Python 3.9.
Upstream needs it to support python 3.8.
Shengqi Chen <harry-chen@outlook.com> not-needed debian 2024-11-06
2210-disable-fno-math-errno-on-arm64-to-workaround-gcc14-bug.patch Disable -fno-math-errno on arm64 to workaroun gcc 14 bug (#1094828) Shengqi Chen <harry@debian.org> yes debian upstream 2025-02-18
2220-disable-sve-on-arm64.patch Disable use of SVE on arm64 Shengqi Chen <harry@debian.org> yes upstream 2025-02-24
2300-torch-cuda-no-use-nvtx3.patch let it fallback to use the old NVTX3 headers. Grep the code with TORCH_CUDA_USE_NVTX3 can you will find the simple fallback logic. The new
header needs new nvtx packages. The old one is already in nvidia-cuda-dev.
===================================================================
no
2310-disable-non-portable-flags.patch Disable non-portable flags
===================================================================
Santiago Vila <sanvila@debian.org> no debian 2025-04-09
0001-143299.patch [PATCH 1/5] Update
[ghstack-poisoned]
drisspg <drisspguessous@gmail.com> no 2024-12-16

All known versions for source package 'pytorch'

Links