mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-07 22:11:45 +03:00
tensorflow: bugfix for bazel settings (intel mkl, dnnl)
This commit is contained in:
parent
cef0110b84
commit
4a4b44803c
@ -18,6 +18,7 @@
|
|||||||
# it would also make the default tensorflow package unfree. See
|
# it would also make the default tensorflow package unfree. See
|
||||||
# https://groups.google.com/a/tensorflow.org/forum/#!topic/developers/iRCt5m4qUz0
|
# https://groups.google.com/a/tensorflow.org/forum/#!topic/developers/iRCt5m4qUz0
|
||||||
, cudaSupport ? false, nvidia_x11 ? null, cudatoolkit ? null, cudnn ? null, nccl ? null
|
, cudaSupport ? false, nvidia_x11 ? null, cudatoolkit ? null, cudnn ? null, nccl ? null
|
||||||
|
, mklSupport ? false, mkl ? null
|
||||||
# XLA without CUDA is broken
|
# XLA without CUDA is broken
|
||||||
, xlaSupport ? cudaSupport
|
, xlaSupport ? cudaSupport
|
||||||
# Default from ./configure script
|
# Default from ./configure script
|
||||||
@ -36,6 +37,8 @@ assert cudaSupport -> nvidia_x11 != null
|
|||||||
# unsupported combination
|
# unsupported combination
|
||||||
assert ! (stdenv.isDarwin && cudaSupport);
|
assert ! (stdenv.isDarwin && cudaSupport);
|
||||||
|
|
||||||
|
assert mklSupport -> mkl != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
withTensorboard = pythonOlder "3.6";
|
withTensorboard = pythonOlder "3.6";
|
||||||
|
|
||||||
@ -167,6 +170,8 @@ let
|
|||||||
cudatoolkit
|
cudatoolkit
|
||||||
cudnn
|
cudnn
|
||||||
nvidia_x11
|
nvidia_x11
|
||||||
|
] ++ lib.optionals mklSupport [
|
||||||
|
mkl
|
||||||
] ++ lib.optionals stdenv.isDarwin [
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
Foundation
|
Foundation
|
||||||
Security
|
Security
|
||||||
@ -284,7 +289,8 @@ let
|
|||||||
];
|
];
|
||||||
bazelBuildFlags = [
|
bazelBuildFlags = [
|
||||||
"--config=opt" # optimize using the flags set in the configure phase
|
"--config=opt" # optimize using the flags set in the configure phase
|
||||||
];
|
]
|
||||||
|
++ lib.optionals (mklSupport) [ "--config=mkl" ];
|
||||||
|
|
||||||
bazelTarget = "//tensorflow/tools/pip_package:build_pip_package //tensorflow/tools/lib_package:libtensorflow";
|
bazelTarget = "//tensorflow/tools/pip_package:build_pip_package //tensorflow/tools/lib_package:libtensorflow";
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
# it would also make the default tensorflow package unfree. See
|
# it would also make the default tensorflow package unfree. See
|
||||||
# https://groups.google.com/a/tensorflow.org/forum/#!topic/developers/iRCt5m4qUz0
|
# https://groups.google.com/a/tensorflow.org/forum/#!topic/developers/iRCt5m4qUz0
|
||||||
, cudaSupport ? false, nvidia_x11 ? null, cudatoolkit ? null, cudnn ? null, nccl ? null
|
, cudaSupport ? false, nvidia_x11 ? null, cudatoolkit ? null, cudnn ? null, nccl ? null
|
||||||
|
, mklSupport ? false, mkl ? null
|
||||||
# XLA without CUDA is broken
|
# XLA without CUDA is broken
|
||||||
, xlaSupport ? cudaSupport
|
, xlaSupport ? cudaSupport
|
||||||
# Default from ./configure script
|
# Default from ./configure script
|
||||||
@ -36,6 +37,8 @@ assert cudaSupport -> nvidia_x11 != null
|
|||||||
# unsupported combination
|
# unsupported combination
|
||||||
assert ! (stdenv.isDarwin && cudaSupport);
|
assert ! (stdenv.isDarwin && cudaSupport);
|
||||||
|
|
||||||
|
assert mklSupport -> mkl != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
withTensorboard = pythonOlder "3.6";
|
withTensorboard = pythonOlder "3.6";
|
||||||
|
|
||||||
@ -163,6 +166,8 @@ let
|
|||||||
cudatoolkit
|
cudatoolkit
|
||||||
cudnn
|
cudnn
|
||||||
nvidia_x11
|
nvidia_x11
|
||||||
|
] ++ lib.optionals mklSupport [
|
||||||
|
mkl
|
||||||
] ++ lib.optionals stdenv.isDarwin [
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
Foundation
|
Foundation
|
||||||
Security
|
Security
|
||||||
@ -278,7 +283,8 @@ let
|
|||||||
];
|
];
|
||||||
bazelBuildFlags = [
|
bazelBuildFlags = [
|
||||||
"--config=opt" # optimize using the flags set in the configure phase
|
"--config=opt" # optimize using the flags set in the configure phase
|
||||||
];
|
]
|
||||||
|
++ lib.optionals (mklSupport) [ "--config=mkl" ];
|
||||||
|
|
||||||
bazelTarget = "//tensorflow/tools/pip_package:build_pip_package //tensorflow/tools/lib_package:libtensorflow";
|
bazelTarget = "//tensorflow/tools/pip_package:build_pip_package //tensorflow/tools/lib_package:libtensorflow";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user