News for hackers. Stuff that matters.
Re:My First Impressions of Nix by hamandcheese on Monday June 19, 2023 @04:23AM (#36388614)
Yes, you have unfortunately discovered that sometimes the hardware itself is an input that isn't always captured explicitly, but also isn't controlled for with sandboxing. Ideally enabling avx512 would be an explicit input to the tensorflow package, but based on your experience it sounds like this feature is detected during the build automatically.

I hope that issues like this get better over time thanks to projects like Trustix, which would make non-reproducibility like this more apparent.

Re:My First Impressions of Nix by lloeki on Monday June 19, 2023 @07:33AM (#36389816)
> Ideally enabling avx512 would be an explicit input to the tensorflow package, but based on your experience it sounds like this feature is detected during the build automatically

Looks like it sets e.g avx2 on the flags, forcing the package to be most compatible, thus removing the hardware state (the builder may or may not have avx512, ideally Nix packages should remove hardware autodetection to make it pure and consistent in face of cross-compiling).

It should indeed have an input in some way, e.g to add more flags. Then AIUI (still learning Nix) one would be able to call the package function with that input from the dependent package function, thus defining another package than the default one, which would be reified as its own specific derivation for that package to depend on.

https://github.com/NixOS/nixpkgs/blob/master/pkgs/developmen...