Skip to content

Commit

Permalink
python3Packages.jaxlib: unify fetchAttrs across all platforms
Browse files Browse the repository at this point in the history
Based on code from NixOS#221390 by @uri-canva.
  • Loading branch information
samuela committed Mar 30, 2023
1 parent d70820e commit aaf0d0a
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions pkgs/development/python-modules/jaxlib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,17 @@ let
"--cxxopt=-x" "--cxxopt=c++" "--host_cxxopt=-x" "--host_cxxopt=c++"
];

# We intentionally overfetch so we can share the fetch derivation across all the different configurations.
fetchAttrs = {
sha256 =
if cudaSupport then
"sha256-KN1akhisazX6bSAmCgPmw926c8lv232fMtgiouuwLb4="
else {
x86_64-linux = "sha256-3dYXATzG6gptSFpiPRa25668KRHYf5Z7SO5YTKsTUOI=";
aarch64-darwin = "sha256-QVAvjFe49wz6Jp43N8gWoo1PzQYTRSiFJ4R4CuEvyFw=";
}.${stdenv.system} or (throw "unsupported system ${stdenv.system}");
bazelFlags = [
"--config=avx_posix"
"--config=cuda"
"--config=mkl_open_source_only"
];
preBuild = ''
export TF_SYSTEM_LIBS=""
'';
sha256 = "sha256-jYgvy8Ci+K8DtrnEvkLUbqxZbF5+bgC7RqkBkkOuCU4=";
};

buildAttrs = {
Expand Down

0 comments on commit aaf0d0a

Please sign in to comment.