You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pytorch "vendors" a number of dependencies via git-submodules. The bundled libraries are complex enough that they suffer from the "cabal hell"/the "diamond problem"1. The Nixpkgs' pytorch expression currently keeps the submodules as is, which means that:
...we cannot configure or consistently apply patches to torch's dependencies,
cannot control the bootstrap process,
and potentially suffer the increased build times (as we cannot cache the built dependencies as separate store paths)
and increased closure sizes.
Pytorch's CMakeLists implement a custom mechanism, USE_SYSTEM_LIBS, that partially recovers the ability for dependency injection. Nonetheless, unbundling all of the vendored libraries apparently still takes substantial patching1234.
The Guix-HPC project has, apparently, made great progress addressing this issue12. Nixpkgs needs to catch up, but also we need to work with the upstream to render patching unnecessary.
EDIT: @ConnorBaker I updated the description to reflect the fact that unvendoring is provably feasible
SomeoneSerge
changed the title
python3Packages.torch: investigate switching from submodules to Nix-provided libraries
python3Packages.torch: "unbundle" git submodules
Apr 10, 2024
Describe the bug
Pytorch "vendors" a number of dependencies via git-submodules. The bundled libraries are complex enough that they suffer from the "cabal hell"/the "diamond problem"1. The Nixpkgs' pytorch expression currently keeps the submodules as is, which means that:
Pytorch's CMakeLists implement a custom mechanism,
USE_SYSTEM_LIBS
, that partially recovers the ability for dependency injection. Nonetheless, unbundling all of the vendored libraries apparently still takes substantial patching1234.The Guix-HPC project has, apparently, made great progress addressing this issue12. Nixpkgs needs to catch up, but also we need to work with the upstream to render patching unnecessary.
Footnotes
"What's in a package": https://hpc.guix.info/blog/2021/09/whats-in-a-package/ ↩ ↩2 ↩3
"[PATCH 00/31] Unbundle and update python-pytorch": https://issues.guix.gnu.org/69591 ↩ ↩2
"PyTorch with ROCm": https://lists.gnu.org/archive/html/guix-devel/2024-03/msg00242.html ↩
https://codeberg.org/dtelsing/Guix-HPC/commit/5da1afd389d5a0adcca83538d50c0a785f81eb29 ↩
The text was updated successfully, but these errors were encountered: