The ‘__local’ bit in the name comes from PeachPy, in peachpy/name.py:
Toggle snippet (8 lines) suffixed_name = "__local" + str(suffix) for name_object in iter(unnamed_objects): # Generate a non-conflicting name by appending a suffix while suffixed_name in self.names: suffix += 1 suffixed_name = "__local" + str(suffix)
So the problem may be that these things get generated in parallel, andthus numbering is non-deterministic. NNPACK/CMakeLists.txt has this bit to generate targets to build allthat:
PyTorch upstream noted that the problem is in NNPACK, not PyTorchproper. Having unbundled NNPACK in d326dec8115cf5e2cac9497633dc11ecc970361b, Ican confirm that PyTorch itself is now reproducible, but NNPACK isn’t. Reported at https://github.com/Maratyszcza/NNPACK/issues/206. Ludo’.
Toggle quote (12 lines)> On Fri, 24 Sept 2021 at 16:11, Ludovic Courtès <email@example.com> wrote:>>> Having unbundled NNPACK in d326dec8115cf5e2cac9497633dc11ecc970361b, I>> can confirm that PyTorch itself is now reproducible, but NNPACK isn’t.>> I reproduce: "guix build nnpack --no-grafts --check" differs. Pytorch, not.>>> PyTorch upstream noted that the problem is in NNPACK, not PyTorch>> proper.>> Closing this report?
Toggle quote (4 lines)> No, I’ve retitled it. Now looking at PeachPy:>> https://github.com/Maratyszcza/PeachPy/issues/88
For the record, I tried the attached patch in an attempt to sort thingsas discussed in the issue above, but it doesn’t have the intendedeffect. There must be other unsorted dictionaries elsewhere. Suggestions welcome! Ludo’.
Toggle diff (15 lines)diff --git a/peachpy/name.py b/peachpy/name.pyindex b6a03dc..c069fc2 100644--- a/peachpy/name.py+++ b/peachpy/name.py@@ -95,6 +95,10 @@ class Namespace: self.prenames[scope_name.prename].add(scope) def assign_names(self):+ # Step 0: sort the dictionary for deterministic output+ self.prenames = dict(sorted(self.prenames.items(),+ key=lambda item: "" if item == None else item))+ # Step 1: assign names to symbols with prenames with no conflicts for prename in six.iterkeys(self.prenames): if prename is not None: