git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.tensorflow: add flags for efficent math on CPU
commit6269306a8dfa0744ddc4609946a8105b996cd23a authorJean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com> dateWed 25 Oct 2017, 10:56 (9 years ago) parentbb87d2c
1 file changed+6
pkgs/development/python-modules/tensorflow/default.nix+6
pkgs/development/python-modules/tensorflow/default.nix+6
@@ -7,6 +7,9 @@
77, cudaSupport ? false, nvidia_x11 ? null, cudatoolkit ? null, cudnn ? null
88# Default from ./configure script
99, cudaCapabilities ? [ "3.5" "5.2" ]
10+, sse42Support ? false
11+, avx2Support ? false
12+, fmaSupport ? false
1013}:
1114
1215assert cudaSupport -> cudatoolkit != null
@@ -77,6 +80,9 @@ let
7780 hardeningDisable = [ "all" ];
7881
7982 bazelFlags = [ "--config=opt" ]
83+ ++ lib.optional sse42Support "--copt=-msse4.2"
84+ ++ lib.optional avx2Support "--copt=-mavx2"
85+ ++ lib.optional fmaSupport "--copt=-mfma"
8086 ++ lib.optional cudaSupport "--config=cuda";
8187
8288 bazelTarget = "//tensorflow/tools/pip_package:build_pip_package";