File tree 3 files changed +49
-31
lines changed
development/python-modules/Theano
3 files changed +49
-31
lines changed Original file line number Diff line number Diff line change 1
1
{ buildPythonPackage
2
2
, fetchFromGitHub
3
- , blas
4
3
, numpy
5
4
, six
6
5
, scipy
@@ -45,7 +44,7 @@ buildPythonPackage rec {
45
44
dontStrip = true ;
46
45
47
46
propagatedBuildInputs = [
48
- blas
47
+ numpy . blas
49
48
numpy
50
49
six
51
50
scipy
@@ -59,4 +58,5 @@ buildPythonPackage rec {
59
58
libgpuarray
60
59
] ++ ( stdenv . lib . optional ( cudnn != null ) [ cudnn ] ) ;
61
60
61
+ passthru . cudaSupport = true ;
62
62
}
Original file line number Diff line number Diff line change
1
+ { stdenv
2
+ , fetchurl
3
+ , buildPythonPackage
4
+ , isPyPy
5
+ , pythonOlder
6
+ , isPy3k
7
+ , nose
8
+ , numpy
9
+ , pydot_ng
10
+ , scipy
11
+ , six
12
+ } :
13
+
14
+ buildPythonPackage rec {
15
+ name = "Theano-0.8.2" ;
16
+
17
+ disabled = isPyPy || pythonOlder "2.6" || ( isPy3k && pythonOlder "3.3" ) ;
18
+
19
+ src = fetchurl {
20
+ url = "mirror://pypi/T/Theano/${ name } .tar.gz" ;
21
+ sha256 = "7463c8f7ed1a787bf881f36d38a38607150186697e7ce7e78bfb94b7c6af8930" ;
22
+ } ;
23
+
24
+ #preCheck = ''
25
+ # mkdir -p check-phase
26
+ # export HOME=$(pwd)/check-phase
27
+ #'';
28
+ doCheck = false ;
29
+ # takes far too long, also throws "TypeError: sort() missing 1 required positional argument: 'a'"
30
+ # when run from the installer, and testing with Python 3.5 hits github.com/Theano/Theano/issues/4276,
31
+ # the fix for which hasn't been merged yet.
32
+
33
+ # keep Nose around since running the tests by hand is possible from Python or bash
34
+ propagatedBuildInputs = [ stdenv nose numpy numpy . blas pydot_ng scipy six ] ;
35
+
36
+ meta = {
37
+ homepage = http://deeplearning.net/software/theano/ ;
38
+ description = "A Python library for large-scale array computation" ;
39
+ license = stdenv . lib . licenses . bsd3 ;
40
+ maintainers = [ stdenv . lib . maintainers . bcdarwin ] ;
41
+ } ;
42
+
43
+ passthru . cudaSupport = false ;
44
+ }
Original file line number Diff line number Diff line change @@ -23350,37 +23350,11 @@ in {
23350
23350
};
23351
23351
};
23352
23352
23353
- Theano = buildPythonPackage rec {
23354
- name = "Theano-0.8.2";
23353
+ Theano = self.TheanoWithoutCuda;
23355
23354
23356
- disabled = isPyPy || pythonOlder "2.6" || (isPy3k && pythonOlder "3.3") ;
23355
+ TheanoWithoutCuda = callPackage ../development/python-modules/Theano/theano-without-cuda { } ;
23357
23356
23358
- src = pkgs.fetchurl {
23359
- url = "mirror://pypi/T/Theano/${name}.tar.gz";
23360
- sha256 = "7463c8f7ed1a787bf881f36d38a38607150186697e7ce7e78bfb94b7c6af8930";
23361
- };
23362
-
23363
- #preCheck = ''
23364
- # mkdir -p check-phase
23365
- # export HOME=$(pwd)/check-phase
23366
- #'';
23367
- doCheck = false;
23368
- # takes far too long, also throws "TypeError: sort() missing 1 required positional argument: 'a'"
23369
- # when run from the installer, and testing with Python 3.5 hits github.com/Theano/Theano/issues/4276,
23370
- # the fix for which hasn't been merged yet.
23371
-
23372
- # keep Nose around since running the tests by hand is possible from Python or bash
23373
- propagatedBuildInputs = [ stdenv ] ++ (with self; [ nose numpy numpy.blas pydot_ng scipy six ]);
23374
-
23375
- meta = {
23376
- homepage = http://deeplearning.net/software/theano/;
23377
- description = "A Python library for large-scale array computation";
23378
- license = stdenv.lib.licenses.bsd3;
23379
- maintainers = [ maintainers.bcdarwin ];
23380
- };
23381
- };
23382
-
23383
- Theano-cuda = callPackage ../development/python-modules/theano/cuda (
23357
+ TheanoWithCuda = callPackage ../development/python-modules/Theano/theano-with-cuda (
23384
23358
let
23385
23359
boost = pkgs.boost159.override {
23386
23360
inherit (self) python numpy scipy;
You can’t perform that action at this time.
4 commit comments
tindzk commentedon Nov 30, 2016
Theano doesn't require CUDA. It also works with OpenCL: http://tinyfool.org/2016/04/how-to-install-theano-opencl-on-mac-os-x-ei-caption/
We might need to modify the libgpuarray package to support OpenCL.
FRidh commentedon Nov 30, 2016
Yes, eventually the TheanoWithoutCuda should use the open OpenCL
tindzk commentedon Nov 30, 2016
I was thinking to name it
theanoWithGpu
andtheanoWithoutGpu
, then the former would support either OpenCL or CUDA (or both).Alternatively, both packages could be merged and we can have two boolean options
openClSupport
andcudaSupport
.FRidh commentedon Nov 30, 2016
OpenCL can be used on any system, Cuda, because it is proprietary, cannot. Therefore there has to be a derivation or option for Cuda and which is why I renamed them.