1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-27 08:01:14 +00:00

pythonPackages.tensorflow: add flags for efficent math on CPU

This commit is contained in:
Jean-Philippe Bernardy 2017-10-25 10:56:51 +02:00 committed by Nikolay Amiantov
parent bb87d2c81a
commit 6269306a8d

View file

@ -7,6 +7,9 @@
, cudaSupport ? false, nvidia_x11 ? null, cudatoolkit ? null, cudnn ? null
# Default from ./configure script
, cudaCapabilities ? [ "3.5" "5.2" ]
, sse42Support ? false
, avx2Support ? false
, fmaSupport ? false
}:
assert cudaSupport -> cudatoolkit != null
@ -77,6 +80,9 @@ let
hardeningDisable = [ "all" ];
bazelFlags = [ "--config=opt" ]
++ lib.optional sse42Support "--copt=-msse4.2"
++ lib.optional avx2Support "--copt=-mavx2"
++ lib.optional fmaSupport "--copt=-mfma"
++ lib.optional cudaSupport "--config=cuda";
bazelTarget = "//tensorflow/tools/pip_package:build_pip_package";