diff --git a/pkgs/python-modules/torch/source/2_8/default.nix b/pkgs/python-modules/torch/source/2_8/default.nix index 5f41181..2c03b6c 100644 --- a/pkgs/python-modules/torch/source/2_8/default.nix +++ b/pkgs/python-modules/torch/source/2_8/default.nix @@ -439,6 +439,10 @@ buildPythonPackage rec { USE_MKLDNN = setBool mklDnnSupport; USE_MKLDNN_CBLAS = setBool mklDnnSupport; + # Enable distributed support (c10d, gloo, etc.) + # Required for torch.distributed and dependencies like transformers + USE_DISTRIBUTED = setBool true; + # Avoid using pybind11 from git submodule # Also avoids pytorch exporting the headers of pybind11 USE_SYSTEM_PYBIND11 = true; diff --git a/pkgs/python-modules/torch/source/2_9/default.nix b/pkgs/python-modules/torch/source/2_9/default.nix index 25b18a9..f435320 100644 --- a/pkgs/python-modules/torch/source/2_9/default.nix +++ b/pkgs/python-modules/torch/source/2_9/default.nix @@ -422,6 +422,10 @@ buildPythonPackage rec { USE_MKLDNN = setBool mklDnnSupport; USE_MKLDNN_CBLAS = setBool mklDnnSupport; + # Enable distributed support (c10d, gloo, etc.) + # Required for torch.distributed and dependencies like transformers + USE_DISTRIBUTED = setBool true; + # Avoid using pybind11 from git submodule # Also avoids pytorch exporting the headers of pybind11 USE_SYSTEM_PYBIND11 = true;