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
caffe2: init at 0.8.1 #34956
caffe2: init at 0.8.1 #34956
Conversation
stdenv.mkDerivation rec { | ||
name = "caffe2-${version}"; | ||
version = "0.8.1"; | ||
src = fetchurl { |
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.
Consider re-using version
when fetching the source, for easier bumping. Also consider
using the fetchFromGitHub
helper, it is a little bit more succinct & "safer" when using autogenerated archives.
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.
Makes sense, thanks! Have updated the PR.
ff7cd3d
to
7bb870a
Compare
@GrahamcOfBorg build caffe2 |
Failure on aarch64-linux (full log) Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Partial log (click to expand)
|
Success on x86_64-linux (full log) Partial log (click to expand)
|
7bb870a
to
600b1d3
Compare
600b1d3 tries to fix the build failure on x86_64-darwin. As for the build failure on aarch64-linux, probably |
@@ -0,0 +1,55 @@ | |||
diff --git a/caffe2/perfkernels/cvtsh_ss_bugfix.h b/caffe2/perfkernels/cvtsh_ss_bugfix.h |
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.
Is there an external source for this patch? It is generally preferred to fetch patches (using e.g., fetchpatch
).
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.
Thanks for the suggestion. As a single patch, I suspect not.
557f877 in https://github.com/caffe2/caffe2/commits/master/caffe2/perfkernels/cvtsh_ss_bugfix.h is in v0.8.1 and there're 4-5 patches upstream to cover various versions/flavors of clang.
But then, what the patch does is to replace cvtsh_ss_bugfix.h
at v0.8.1 by that of the current master, so I could fetch a newer cvtsh_ss_bugfix.h
and override by it in one of the build hooks.
; | ||
propagatedBuildInputs = [ numpy future six python-protobuf pydot ]; | ||
|
||
patches = if stdenv.cc.isClang then [ ./update_clang_cvtsh_bugfix.patch ] else [ ]; |
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.
The pattern if foo then [ x ] else [ ]
can be reduced to optional foo x
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 should have noticed that, thanks.
600b1d3
to
976ba47
Compare
Motivation for this change
Caffe2 is a lightweight, modular, and scalable deep learning framework developed at Facebook.
It is a successor to the widely used Caffe framework, and provides both C++ and Python APIs.
Requests for review:
(1) package location
I've tentatively put the package to
pkgs/development/library/science/math
,although it might fit nicer to
pkgs/development/library/science/machine-learning
if there's such a directory.
Notes:
pkgs/applications/science/machine-learning/
caffe
resides in:pkgs/applications/science/math/
tensorflow
&pytorch
) are registered as python packages.(2) CUDA issues
18.03pre
(overrideCC stdenv pkgs.gcc5
). It compiles (and seems to work fine) with Cuda Toolkit8 and gcc5.4 fromrelease-17.09
.Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)