Merge pull request #74334 from veprbl/pr/tensorflow_darwin_enable

python3Packages.tensorflow-build: enable on darwin
This commit is contained in:
Dmitry Kalinkin 2019-12-07 21:08:56 -05:00 committed by GitHub
commit adbd96a2c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -25,6 +25,8 @@
, sse42Support ? builtins.elem (stdenv.hostPlatform.platform.gcc.arch or "default") ["westmere" "sandybridge" "ivybridge" "haswell" "broadwell" "skylake" "skylake-avx512"] , sse42Support ? builtins.elem (stdenv.hostPlatform.platform.gcc.arch or "default") ["westmere" "sandybridge" "ivybridge" "haswell" "broadwell" "skylake" "skylake-avx512"]
, avx2Support ? builtins.elem (stdenv.hostPlatform.platform.gcc.arch or "default") [ "haswell" "broadwell" "skylake" "skylake-avx512"] , avx2Support ? builtins.elem (stdenv.hostPlatform.platform.gcc.arch or "default") [ "haswell" "broadwell" "skylake" "skylake-avx512"]
, fmaSupport ? builtins.elem (stdenv.hostPlatform.platform.gcc.arch or "default") [ "haswell" "broadwell" "skylake" "skylake-avx512"] , fmaSupport ? builtins.elem (stdenv.hostPlatform.platform.gcc.arch or "default") [ "haswell" "broadwell" "skylake" "skylake-avx512"]
# Darwin deps
, Foundation, Security
}: }:
assert cudaSupport -> nvidia_x11 != null assert cudaSupport -> nvidia_x11 != null
@ -157,6 +159,9 @@ let
cudatoolkit cudatoolkit
cudnn cudnn
nvidia_x11 nvidia_x11
] ++ lib.optionals stdenv.isDarwin [
Foundation
Security
]; ];
# arbitrarily set to the current latest bazel version, overly careful # arbitrarily set to the current latest bazel version, overly careful
@ -326,7 +331,7 @@ let
homepage = http://tensorflow.org; homepage = http://tensorflow.org;
license = licenses.asl20; license = licenses.asl20;
maintainers = with maintainers; [ jyp abbradar ]; maintainers = with maintainers; [ jyp abbradar ];
platforms = platforms.linux; platforms = with platforms; linux ++ darwin;
# The py2 build fails due to some issue importing protobuf. Possibly related to the fix in # The py2 build fails due to some issue importing protobuf. Possibly related to the fix in
# https://github.com/akesandgren/easybuild-easyblocks/commit/1f2e517ddfd1b00a342c6abb55aef3fd93671a2b # https://github.com/akesandgren/easybuild-easyblocks/commit/1f2e517ddfd1b00a342c6abb55aef3fd93671a2b
broken = !(xlaSupport -> cudaSupport) || !isPy3k; broken = !(xlaSupport -> cudaSupport) || !isPy3k;

View file

@ -6201,9 +6201,10 @@ in {
cudnn = pkgs.cudnn_cudatoolkit_10; cudnn = pkgs.cudnn_cudatoolkit_10;
nccl = pkgs.nccl_cudatoolkit_10; nccl = pkgs.nccl_cudatoolkit_10;
openssl = pkgs.openssl_1_0_2; openssl = pkgs.openssl_1_0_2;
inherit (pkgs.darwin.apple_sdk.frameworks) Foundation Security;
}; };
tensorflow = if stdenv.isDarwin then self.tensorflow-bin else self.tensorflow-build; tensorflow = self.tensorflow-build;
tensorflowWithoutCuda = self.tensorflow.override { tensorflowWithoutCuda = self.tensorflow.override {
cudaSupport = false; cudaSupport = false;