Debian Patches

Status for pytorch/2.12.0+dfsg2-4

Patch Description Author Forwarded Bugs Origin Last update
0001-c10d-add-missing-Utils.hpp-include-in-GlooDeviceFact.patch Add missing include to `GlooDeviceFactory.cpp`
When `GLOO_HAVE_TRANSPORT_IBVERBS` is defined the functions
`getCvarString` & `getCvarInt` are used for which `Utils.hpp` needs to
be included.
Alexander Grund <alexander.grund@tu-dresden.de> yes 2026-05-07
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-use-system-mimalloc.patch Link against system libmimalloc instead of the embedded copy. Upstream auto-enables USE_MIMALLOC on Windows and non-Apple aarch64
(CMakeLists.txt l.418) and bundles its own copy under
third_party/mimalloc. The embedded directory is dropped from the
Debian +dfsg2 tarball, which broke arm64 builds at the CMake configure
stage (add_subdirectory complains the directory does not exist).
.
Replace the embedded reference with find_package(mimalloc), provided
by Debian's libmimalloc-dev. c10's link site is updated to use the
imported target name "mimalloc" exported by Debian's CMake config.
.
amd64/ppc64el/riscv64/s390x are unaffected: upstream leaves
USE_MIMALLOC=OFF on those arches and the block below is skipped.
Aron Xu <aron@debian.org> not-needed 2026-05-17
2000-version.patch make the "torch.__version__" and wheel version correct. The upstream use env vars instead. debian specific. Never forward this.
===================================================================
not-needed 2026-05-13
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
2090-drop-six-from-pyproject.patch drop unused six dependency from pyproject.toml python3-six is being phased out in Debian. The "six" entry is only
reachable through the optional NNPACK -> PeachPy chain, which is
disabled in the Debian build, so each Debian binary package must
declare only the dependencies it actually needs. Removing the entries
here prevents python3-torch from pulling python3-six back in via
pybuild.
no debian 2026-05-18
2101-fix-ftbfs-ld-sleef.patch =================================================================== not-needed
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-qconv-fp8-non-x86-gate.patch Gate qconv FP8 cpuinfo helper by architecture. When the system oneDNN/ideep is >= 3.9 the ONEDNN_FP8_QCONV_SUPPORTED
macro is defined (aten/.../OnednnUtils.h:467), and qconv.cpp +
qconv_prepack.cpp call cpuinfo_has_x86_amx_fp16() unconditionally to
decide whether to take the AMX-accelerated FP8 path. The helper is
only declared on x86, so non-x86 builds (ppc64el, aarch64, etc.) fail
with "'cpuinfo_has_x86_amx_fp16' was not declared in this scope".
.
Upstream already added a __powerpc__ guard in qlinear.cpp and
qlinear_prepack.cpp (commit a4c7e7f9837, "[PowerPC]: Fixed build
issue that occur because of datatype f8 enablement for onednn in
qlinear and prepack") but forgot to apply the same fix to the qconv
pair. We extend the gate to all non-x86 arches so the simple
fp8-fallback path is taken everywhere except x86.
Aron Xu <aron@debian.org> invalid 2026-05-17
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
2400-vulkan-spv-reproducible-order.patch gen_vulkan_spv: sort shader files for reproducible builds tools/gen_vulkan_spv.py collects the Vulkan GLSL shaders and template YAML
files with glob.glob(), which returns them in filesystem (readdir) order.
That order is not stable across builds, and it is preserved all the way into
the generated spv.cpp: the SPIR-V byte arrays, the shader-name strings and the
register_shader() calls are emitted in glob order. As a result libtorch_cpu.so
differs between builds (reordered .rodata strings, different .data.rel.ro
shader-registry pointers, and different register allocation in the generated
registration function), breaking reproducible builds. Sort the glob results so
the registry order is deterministic. This is only relevant with USE_VULKAN=1

===================================================================
Aron Xu <aron@debian.org> no 2026-06-01

All known versions for source package 'pytorch'

Links