-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
theano: init at 0.8.1 #14605
theano: init at 0.8.1 #14605
Conversation
IMO even without GPU support it's useful to get this in, and then to update in a second commit. I was going to have a construct like this:
So people can pick the with-gpu version like this:
My reasoning is that for libgpuarray to be useful it needs to pull in all of cuda, but theano is also useful without having the full cuda dependency pulled in. |
# the fix for which hasn't been merged yet. | ||
|
||
# keep Nose around since running the tests by hand is possible from Python or bash | ||
propagatedBuildInputs = [ stdenv pkgs.blas ] ++ (with self; [ nose numpy pydot_ng scipy six ]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it really need blas during runtime? Likely it compiles something against it during build time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested without this, but I suspect it's necessary since compiling Theano itself is relatively trivial, but Theano itself compiles code at 'runtime'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Well, use numpy.blas
instead. That way we can guarantee numpy, scipy, scikitlearn and also now theano use the same blas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need pkgs.blas explicitly in here because it's already in numpy which is a hard dependency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But blas is a buildInput
to numpy, not a propagatedBuiltInput
. When theano is build, blas would not be available, unless explicitly added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right - for some reason theano works without for me, I think it might be picked up by scipy if I'm reading that correctly. Probably better to explicitly communicate the blas dependency in any case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just saw I was wrong. blas is added as a propagatedBuildInput to both numpy and scipy. Therefore you get it for free in theano, and I don't think that is correct. I'll move blas to buildInput for both numpy and scipy (if it works, it should...).
Anyway, for here we need a (propagated) buildinput on numpy.blas. I would imagine theno would build a wrapper around blas, so just buildInput would be sufficient, but who knows, maybe it really does compile against blas during runtime.
edit: no we really need blas as propagatedBuildInput! silly me
OK, I've switched to numpy.blas, and the tests still seem to work. Let me know if you'd prefer this commit squashed. I guess we can revisit whether to change |
@bcdarwin I was wrong there. It is supposed to be a propagatedBuildInput because blas is needed during runtime because it is a shared library. I imagined for a moment they would statically compile it. This looks good to me. Thanks. |
Built on Linux. See inline comments regarding testing.
No GPU support yet as I haven't built libgpuarray -- maybe the WIP tag should be added?