summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorFrederik Rietdijk <freddyrietdijk@fridh.nl>2016-06-21 14:26:51 +0200
committerGitHub <noreply@github.com>2016-06-21 14:26:51 +0200
commit8ef747baed3a3313c229d86e8c410b731d3a9124 (patch)
treef86c3b494439d5e8473a40fa2288950bd42e0244 /pkgs/development/python-modules
parent0a8e613cea27d4a32ea43e73c2b5bf0ebcb54211 (diff)
parent465d6a211370ed635fac338b59e718b4056f1142 (diff)
downloadnixlib-8ef747baed3a3313c229d86e8c410b731d3a9124.tar
nixlib-8ef747baed3a3313c229d86e8c410b731d3a9124.tar.gz
nixlib-8ef747baed3a3313c229d86e8c410b731d3a9124.tar.bz2
nixlib-8ef747baed3a3313c229d86e8c410b731d3a9124.tar.lz
nixlib-8ef747baed3a3313c229d86e8c410b731d3a9124.tar.xz
nixlib-8ef747baed3a3313c229d86e8c410b731d3a9124.tar.zst
nixlib-8ef747baed3a3313c229d86e8c410b731d3a9124.zip
Merge pull request #16334 from artuuge/theano_cudnn
Theano-cuda: init at 0.8.2
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/theano/cuda/default.nix62
1 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/theano/cuda/default.nix b/pkgs/development/python-modules/theano/cuda/default.nix
new file mode 100644
index 000000000000..bf49d3918611
--- /dev/null
+++ b/pkgs/development/python-modules/theano/cuda/default.nix
@@ -0,0 +1,62 @@
+{ buildPythonPackage
+, fetchFromGitHub
+, blas
+, numpy
+, six
+, scipy
+, nose
+, nose-parameterized
+, pydot_ng
+, sphinx
+, pygments
+, libgpuarray
+, python
+, pycuda
+, cudatoolkit
+, cudnn
+, stdenv
+}:
+
+buildPythonPackage rec {
+  name = "Theano-cuda-${version}";
+  version = "0.8.2";
+
+  src = fetchFromGitHub {
+    owner = "Theano";
+    repo = "Theano";
+    rev = "46fbfeb628220b5e42bf8277a5955c52d153e874";
+    sha256 = "1sl91gli3jaw5gpjqqab4fiq4x6282spqciaid1s65pjsf3k55sc";
+  };
+
+  doCheck = false;
+
+  patchPhase = ''
+    pushd theano/sandbox/gpuarray
+    sed -i -re '2s/^/from builtins import bytes\n/g' subtensor.py
+    sed -i -re "s/(b'2')/int(bytes(\1))/g" subtensor.py
+    sed -i -re "s/(ctx.bin_id\[\-2\])/int(\1)/g" subtensor.py
+
+    sed -i -re '2s/^/from builtins import bytes\n/g' dnn.py
+    sed -i -re "s/(b'30')/int(bytes(\1))/g" dnn.py
+    sed -i -re "s/(ctx.bin_id\[\-2:\])/int(\1)/g" dnn.py
+    popd
+  '';
+
+  dontStrip = true;
+
+  propagatedBuildInputs = [
+    blas
+    numpy
+    six
+    scipy
+    nose
+    nose-parameterized
+    pydot_ng
+    sphinx
+    pygments
+    pycuda
+    cudatoolkit
+    libgpuarray
+  ] ++ (stdenv.lib.optional (cudnn != null) [ cudnn ]);
+
+}