Commit Graph

430 Commits

Author SHA1 Message Date
Fei Sun
d09041bd81 Add an option to statically link cuda (#10596)
Summary:
Need to link CUDA statically for benchmarking purpose.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/10596

Reviewed By: llyfacebook

Differential Revision: D9370738

Pulled By: sf-wind

fbshipit-source-id: 4464d62473e95fe8db65b0bd3b301f262bf269bf
2018-09-11 11:09:29 -07:00
Orion Reblitz-Richardson
a175282776 Flags for LMDB, LevelDB, and Caffe2 ops (#11462)
Summary:
Add flags for LMDB and LevelDB, default `OFF`. These can be enabled with

```
USE_LMDB=1 USE_LEVELDB=1 python setup.py build_deps
```

Also add a flag to build Caffe2 ops, which is default `ON`. Disable with

```
NO_CAFFE2_OPS=1 python setup.py build_deps
```

cc Yangqing soumith pjh5 mingzhe09088
Pull Request resolved: https://github.com/pytorch/pytorch/pull/11462

Reviewed By: soumith

Differential Revision: D9758156

Pulled By: orionr

fbshipit-source-id: 95fd206d72fdf44df54fc5d0aeab598bff900c63
2018-09-10 17:27:50 -07:00
Orion Reblitz-Richardson
802d21c8f4 Remove FULL_CAFFE2 flag (#11321)
Summary:
Continuing pjh5's work to remove FULL_CAFFE2 flag completely.

With these changes you'll be able to also do something like

```
NO_TEST=1 python setup.py build_deps
```
and this will skip building tests in caffe2, aten, and c10d. By default the tests are built.

cc mingzhe09088 Yangqing
Pull Request resolved: https://github.com/pytorch/pytorch/pull/11321

Reviewed By: mingzhe09088

Differential Revision: D9694950

Pulled By: orionr

fbshipit-source-id: ff5c4937a23d1a263378a196a5eda0cba98af0a8
2018-09-07 15:09:44 -07:00
Will Feng
c9e66351a7 Port all PyTorch and Caffe2 jobs to CircleCI (#11264)
Summary:
This PR adds all PyTorch and Caffe2 job configs to CircleCI.

Steps for the CircleCI mini-trial:
- [ ] Make sure this PR passes Jenkins CI and fbcode internal tests
- [x] Approve this PR
- [ ] Ask CircleCI to turn up the number of build machines
- [ ] Land this PR so that the new `.circleci/config.yml` will take effect

Several Caffe2 tests are flaky on CircleCI machines and hence skipped when running on CircleCI. A proper fix for them will be worked on after a successful mini-trial.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/11264

Differential Revision: D9656793

Pulled By: yf225

fbshipit-source-id: 7832e90018f3dff7651489c04a179d6742168fe1
2018-09-05 16:28:11 -07:00
Orion Reblitz-Richardson
6508db7421 Remove BUILD_CAFFE2 and build everything (#8338)
Summary:
This completely removes BUILD_CAFFE2 from CMake. There is still a little bit of "full build" stuff in setup.py that enables USE_CUDNN and BUILD_PYTHON, but otherwise everything should be enabled for PyTorch as well as Caffe2. This gets us a lot closer to full unification.

cc mingzhe09088, pjh5, ezyang, smessmer, Yangqing
Pull Request resolved: https://github.com/pytorch/pytorch/pull/8338

Reviewed By: mingzhe09088

Differential Revision: D9600513

Pulled By: orionr

fbshipit-source-id: 9f6ca49df35b920d3439dcec56e7b26ad4768b7d
2018-08-31 13:10:24 -07:00
Mingzhe Li
f0d8a36e70 Completely remove build_aten and use_aten (#10469)
Summary:
Breaking out of #8338 to completely remove build_aten and use_aten.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/10469

Reviewed By: orionr

Differential Revision: D9413639

Pulled By: mingzhe09088

fbshipit-source-id: b7203aa4f5f2bb95c504c8dc187a3167f2570183
2018-08-20 20:26:42 -07:00
Fei Sun
319fefe9e6 Support benchmark on windows machines
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/10564

Reviewed By: llyfacebook

Differential Revision: D9356389

Pulled By: sf-wind

fbshipit-source-id: f6c58e68d3eaf3a39c9f89b8f04e6039c75b4cd9
2018-08-16 10:56:23 -07:00
Yinghai Lu
1756daaa75 Use FULL_CAFFE2 to build caffe2 and python in one shot (#10427)
Summary:
Building caffe2 and pytorch separately will end up duplicated symbols as they now share some basic libs. And it's especially bad for registry. This PR fixes our CI and build them in one shot with shared symbols.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/10427

Reviewed By: bddppq

Differential Revision: D9282372

Pulled By: yinghai

fbshipit-source-id: 0514931ea88277029a68fa5368ff4336472f132e
2018-08-12 15:39:12 -07:00
Mingzhe Li
c9eab34e63 Fix Caffe2 with ATen conda build failure (#10020)
Summary:
Extracted from 627624627e and in support of https://github.com/pytorch/pytorch/pull/10019

cc pjh5 mingzhe09088 ezyang smessmer
Pull Request resolved: https://github.com/pytorch/pytorch/pull/10020

Reviewed By: pjh5

Differential Revision: D9068124

Pulled By: orionr

fbshipit-source-id: 4dd4910136a312b6517c65ce8802837108475f89
2018-07-30 14:10:02 -07:00
Junjie Bai
3be8e4db51 Do not run ONNX integration tests in parallel
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/9861

Differential Revision: D9011458

Pulled By: bddppq

fbshipit-source-id: 7ab1b1763d56f1290ade7a99682ad461c97f807b
2018-07-25 21:54:29 -07:00
Jesse Hellemn
9cf76cfb4c Chaning conda build script to use current python version
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/9780

Reviewed By: ml7

Differential Revision: D8983501

Pulled By: pjh5

fbshipit-source-id: 79208796247433cbe271a2d06f66254587d96f80
2018-07-24 18:40:40 -07:00
Mingzhe Li
29b1c2cfce Install typing for Mac (#9271)
Summary:
Breaking this out of #8338

When BUILD_CAFFE2 and BUILD_ATEN are removed, we need to install typing on Mac.

cc orionr
Pull Request resolved: https://github.com/pytorch/pytorch/pull/9271

Reviewed By: orionr

Differential Revision: D8768701

Pulled By: mingzhe09088

fbshipit-source-id: 052b96e90e64b01e6b5dd48b91c0fb12fb96b54a
2018-07-09 14:58:50 -07:00
Lu Fang
63233f98ad Bump up opset version to 7 in Caffe2 ONNX exporter (#8854)
Summary:
Will bump up to opset 8 in another PR to match the current opset version.

Already tested through generating the models in current model zoo.
Closes https://github.com/pytorch/pytorch/pull/8854

Reviewed By: ezyang

Differential Revision: D8666437

Pulled By: houseroad

fbshipit-source-id: feffdf704dd3136aa59c0f1ff1830c14d1bd20aa
2018-06-28 07:39:02 -07:00
Jesse Hellemn
a898a8f1f0 Adding pyyaml to mac and windows builds
Summary: Closes https://github.com/pytorch/pytorch/pull/8851

Reviewed By: mingzhe09088

Differential Revision: D8666075

Pulled By: pjh5

fbshipit-source-id: a3fdc9f9801f814b1e4010bd20ba51afbb048a1d
2018-06-27 13:10:57 -07:00
Paul Jesse Hellemn
e323f02277 Fixing missing PyCObject_Type bug (#8467) 2018-06-14 08:08:25 -07:00
Yangqing Jia
56b1dcccf6
[cmake] deprecate caffe2_* specific cuda function in cmake. (#8200)
* deprecate caffe2_* specific cuda function in cmake.

* ENV{} -> $ENV{}

* CUDA_ARCH_NAME -> TORCH_CUDA_ARCH_LIST

* .

* .

* .
2018-06-06 14:13:26 -07:00
Paul Jesse Hellemn
fa1bdcf4d2
Pinning opencv to < 3.4 in conda builds (#7923)
* Pinning opencv to 3.1.0 in conda builds

* Also pinning numpy to 1.11

* Trying only specifying <3.4
2018-06-05 13:16:02 -07:00
Lu Fang
a890a0be07
Renanme ZFNet to ZFNet512 (#7723) 2018-05-21 11:37:39 +08:00
bddppq
3af3d13599
Run onnx integration tests in caffe2 CI (#7565)
* Run onnx integration tests in caffe2 CI

* verbose log

* turn off onnx verbose installation log

* can not install ninja

* Do not use all cores to build pytorch

* install tests require

* pip install to user dir

* use determined path to improve (s)ccache hit

* Do not change path in test.sh

* Add the compile cache hit trick to conda install as well

* cover jenkins in CI environment detection
2018-05-15 13:25:24 -07:00
bddppq
bf9676180f
Update the name of env var for triggering integrated conda build (#7557) 2018-05-14 16:28:39 -07:00
bddppq
cf9913d569
Install torchvision before running integration tests (#7552) 2018-05-14 11:49:10 -07:00
bddppq
141d81d095
Move ONNX integration tests from onnx-fb-universe to PyTorch repo (#7397)
* Move ONNX integration tests from onnx-fb-universe to PyTorch repo

* Switch to use torchvision

* Delete single rnn operator tests, they have been covered in e2e tests in test_caffe2.py

* Mirror the fix in onnx-fb-universe to bypass cuda check

667326d84b
2018-05-11 15:05:18 -07:00
Paul Jesse Hellemn
9396740406
Updating condas to build for all CUDA archs (#7379) 2018-05-08 11:45:45 -07:00
Bram Wasti
75dbf9b113 [caffe2][build] Update python cmake flag print script (#7306) 2018-05-08 00:34:42 -07:00
Paul Jesse Hellemn
0859f0e3e6
Pinning numpy version in conda builds (#7314) 2018-05-04 16:38:53 -07:00
Paul Jesse Hellemn
0259d9c8d3
Changing underscores to hypens in conda package names (#7299) 2018-05-04 12:50:41 -07:00
Paul Jesse Hellemn
1313791015
Need an explicit flag since opencv is on by default (#7225) 2018-05-02 21:00:34 -07:00
Paul Jesse Hellemn
d154d32890
Fix to a conda hack (#7212) 2018-05-02 17:35:15 -07:00
Paul Jesse Hellemn
8ac6856e54
Removing features for a sec (#7211) 2018-05-02 17:11:19 -07:00
Paul Jesse Hellemn
1ca6e77615
Fix to comput_70 error + some more lowercasing (#7205) 2018-05-02 15:34:35 -07:00
Paul Jesse Hellemn
4d2693973e
[Caffe2] Turning on ATEN for Caffe2 in integrated builds (#7169)
* Turning on ATEN for Caffe2 in integrated builds

* Adding slim version

* Fixing missing name suffix, fixing conda tests
2018-05-02 11:16:29 -07:00
Paul Jesse Hellemn
90026f59a3
Switching to conda's --no-test flag (#7099)
* Switching to conda's --no-test flag

* Also updating callsite in .jenkins/build.sh
2018-04-30 11:22:25 -07:00
Paul Jesse Hellemn
2a56666196
Removing leveldb to make special gcc builds unnecessary (#7098) 2018-04-30 10:55:37 -07:00
Paul Jesse Hellemn
fc6a846cc5
[Caffe2] Fixing bug in conda builds (#7061)
* Fixing bug in conda builds

* Update to other PR
2018-04-27 21:52:40 -07:00
Paul Jesse Hellemn
1048d0dd67
[Caffe2] Moving all conda package information into package name rather than build string (#7041)
* Lowercasing script internal variables

* Removing nccl from name
2018-04-27 21:42:49 -07:00
Paul Jesse Hellemn
902579602b
[wip] [Caffe2] Changes to integrated binaries (#6997)
* Changes to integrated binaries

* Changes for cpu version of integrated binary

* Disabling static linking of CUDA for pytorch for integrated builds
2018-04-26 15:43:24 -07:00
Paul Jesse Hellemn
8109b3065e
Slight changes to anaconda script (#6994) 2018-04-26 10:04:58 -05:00
Paul Jesse Hellemn
b038b3d7be
Always dumping final meta.yaml for debugging (#6977) 2018-04-25 19:00:24 -05:00
Lu Fang
8028162103
Update the script to avoid the protobuf lib issue and add ZFNet (#6966) 2018-04-25 16:38:43 -07:00
Paul Jesse Hellemn
2e32e8df75
Statically linking CUDA for Anaconda builds (#6680)
* Statically linking CUDA for Anaconda builds

* typo

* Adding a summary line

* Comments

* Typo fix

* Fix faulty parameter passing

* Removing problem CUDA modules for now

* Fixing unused debugging function

* Turning off static cuda linking until script changes are in

* Disabling mkl
2018-04-25 18:22:54 -05:00
bddppq
0d0dcde5a8 Fix caffe2 eigen + cuda9 windows build (#6746) 2018-04-22 09:36:09 -07:00
Lu Fang
db540c9e7b
Fix the bug in fb devgpu setup script (#6823)
* Update onnx_c2_setup.sh

* More fix
2018-04-20 15:15:41 -07:00
Paul Jesse Hellemn
ad8bfb7359
Adding package name parameter for conda builds (#6727) 2018-04-18 14:02:09 -07:00
なるみ
084e3a755b fix incorrect path (#6605) 2018-04-15 21:22:11 -07:00
Paul Jesse Hellemn
be86500244
Conda binary changes (#6534)
* Adding integrated pytorch-caffe2 package

* Updates

* Fixing more substitution

* Fix to pytorch build location

* Bugfixes, progress towards including CUDA libs in package

* Fix to sed call

* Putting off packaing CUDA libs for Caffe2

* Progress towards packaging CUDA libs

* Progress towards packaging CUDA libs

* Changes to CUDA copying

* Turning on CUDA lib packaging

* Correction to env variables passed into meta.yaml

* typo

* Adding more needed variables in build.sh

* Adding some debugging info

* Changing versioning to have dates and be in build string

* Removing version from build string

* Removing packaging CUDA logic for static linking (later)

* Changing version to mirror pytorch

* Removing env variable req in build.sh

* Change to sed to port to mac
2018-04-12 16:51:06 -07:00
Paul Jesse Hellemn
774601c04c
[Caffe2] Consolidating conda build scripts (#6359)
* Consolidating conda build scripts

* Grep bug

* Naming bug

* Correcting quoting of variable passing
2018-04-06 16:54:42 -07:00
Paul Jesse Hellemn
38b995a13b
Fixing conda test builds (#6261)
* Moving conda test package installs into docker image

* Small nits

* Onnx setup.py still needs PROTOBUF_INCDIR passed in
2018-04-05 13:27:43 -07:00
Paul Jesse Hellemn
4375dfd0b2 Changes without protoc conditions (#6142) 2018-04-03 09:50:14 -04:00
Lu Fang
80cf134aff Adjust the setup script according to the repo changes (#6218) 2018-04-03 09:44:52 -04:00
Orion Reblitz-Richardson
a409f959e8
Remove ShuffleNet from model zoo. (#6203)
* No longer supported.
2018-04-02 15:00:06 -07:00
bddppq
28e66705ff Move helper scripts to new repo (#6159) 2018-04-02 14:06:29 -04:00
Orion Reblitz-Richardson
368f96acde Remove tutorials from main repository.
* They now live at https://github.com/caffe2/tutorials
* Updating caffe2.ai website to match in a separate commit.
2018-03-29 09:31:09 -07:00
Paul Jesse Hellemn
02d5ae6c9b Removing verbose logging from windows (#2455) 2018-03-27 18:19:55 -07:00
Dmytro Dzhulgakov
e977825c01 Merge the conflicts 2018-03-27 18:10:39 -07:00
Orion Reblitz-Richardson
2017c9caef Add script for removing Apache header.
* Can be used to remove the license header added with add_apache_header.sh
2018-03-27 13:10:18 -07:00
Paul Jesse Hellemn
f393c90cda Moving conda/ to caffe2/conda (#2428)
* Moving conda/ to caffe2/conda

* fix

* Moving caffe2/conda to conda/caffe2
2018-03-27 07:48:23 -07:00
Marat Dukhan
44039ffcea Use -DCMAKE_BUILD_TYPE=Release for local build by default 2018-03-21 16:12:32 -04:00
Paul Jesse Hellemn
3f667176cc Fixing the conda-gcc-cuda builds (#2305)
* Fixing mistakes in earlier PR

* Allowing cuda builds of different gccs
2018-03-19 09:32:32 -07:00
Paul Jesse Hellemn
c18dba9fe7 Adding gcc4 conda builds (#2283)
* Changes without centos changes

* Changes for protobuf 3.5 and gcc 4.8

* Changing 3.4.1 back to 3.5.1

* Preventing installing two versions of setuptools

* Fixing setuptools bug
2018-03-17 17:26:37 -07:00
Paul Jesse Hellemn
74f0b270ea Fixing conda (#2123)
* Fixing conda

* Adding hypothesis and onnx to conda builds

* Updates but still not working

* Adding required changes to conda_full

* Updates

* Moving to more general build_anaconda script

* Adding check for gcc version

* Adding general ways to add/remove packages from meta.yaml?

* Changes for specific packages to build on gcc 5.4

* Fix with glog spec

* Requiring >numpy 1.12 for python 3 to satisfy opencv dependency

* Adding pydot to required testing packages

* Adding script to read conda versions for gcc ABI

* Trying to fix segfault by installing in env instead

* conda activate -> source activate

* Trying adding back leveldb

* Setting locale for ONNX + conda-search changed its format

* read_conda_versions handles libprotobuf

* Conda script updates

* Adding a protobuf-working test

* Removing changes to proto defs b/c they will require internal changes in a separate diff
2018-03-14 12:24:37 -07:00
Marat Dukhan
bbc2c642c9 Use Ninja build system when available
When Ninja is installed, use it instead of Make for native builds and for Android cross-builds.
2018-03-07 20:49:30 -05:00
Marat Dukhan
fc7ee0c941 Use NEON for Android build 2018-03-03 01:04:56 +01:00
Koan-Sin Tan
72d5d9016a move -s to CMakeLists.txt 2018-03-02 20:31:33 +01:00
Koan-Sin Tan
ca90d4c356 Add -s for Android back
Android libraries are statically linked, we'd better strip binaries
2018-03-02 20:31:33 +01:00
Paul Jesse Hellemn
c3e4d7ff87 Cuda full (#2084)
* Removing leveldb for ubuntu

* changes

* Removing ibverbs

* Moving cuda_full back to default channels for gcc >5
2018-02-28 18:21:00 -08:00
Paul Jesse Hellemn
6341a0fd79 Fix cuda full (#2070)
* Trying fuller cuda_cull

* changes

* Migrating to conda-forge for openmpi

* Adding openmpi

* Adding leveldb

* Fixing unrelated minor conda bug

* Another unrelated fix
2018-02-27 16:26:41 -08:00
Marat Dukhan
e07083f00a Cleanup CMake files and build scripts for Android (#2067)
- Remove USE_ARM64 option because it doesn't do what is expected
- Disable ARM ComputeLibrary for non-ARM/ARM64 builds
- Remove analysis of CMake options from scripts/build_android.sh
- Add user-specified CMake options at the end of command line to allow overriding defaults
- Update README for ARM ComputeLibrary integration and do not require to disable NNPACK for ARM64 build with ARM ComputeLibrary
2018-02-27 16:05:21 -08:00
Paul Jesse Hellemn
ff3ef8301c [WIP] splitting conda-builds into separate build and test phases for PRs (#2031)
* [WIP] moving conda scripts to separate build+test

* [WIP] Splitting conda-builds into build and test phases

* Migrating build_local to call build_anaconda

* Tidying up a regex
2018-02-23 18:47:14 -08:00
Jerry Zhang
c0866e45c7 Caffe2 ARM ComputeLibrary integration (#2015)
Caffe2 ARM Compute Library Integration
2018-02-23 18:09:05 -08:00
Yangqing Jia
99e99130f5 Remove build_host_protoc.bat as it is no longer needed after protobuf update. (#2020) 2018-02-23 16:13:01 -08:00
Paul Jesse Hellemn
ee71eab4c6 Adding 'full' version of conda build (#1934)
Adds another package to Anaconda.org with a "-full" suffix which includes more libraries by default. This also installs NCCL 2.1 onto the CI Ubuntu docker images to accomplish this.
2018-02-20 10:20:07 -08:00
Jesse Hellemn
1d044dc459 Changing sed call in CUDA conda-builds to keep friendly package name
Summary: Closes https://github.com/caffe2/caffe2/pull/1893

Reviewed By: orionr

Differential Revision: D6903915

Pulled By: pjh5

fbshipit-source-id: 4cdd98f7cc0be68f6aa9a455c4d4d8478c4e8869
2018-02-05 17:36:37 -08:00
joncrall
61ad0e486b cmake: python packages now install to the cannonical directory
Summary:
Addresses issue #1676

Now when `make install` is run, the `caffe2` (and `caffe`) python modules will be installed into the correct site-packages directory (relative to the prefix) instead of directly in the prefix.
Closes https://github.com/caffe2/caffe2/pull/1677

Reviewed By: pietern

Differential Revision: D6710247

Pulled By: bddppq

fbshipit-source-id: b49167d48fd94d87f7b7c1ebf0f187ec6a203470
2018-02-05 17:05:34 -08:00
Jesse Hellemn
019c1c4ca5 Removing some default dependencies of CUDA conda builds
Summary: Closes https://github.com/caffe2/caffe2/pull/1847

Reviewed By: orionr

Differential Revision: D6900615

Pulled By: pjh5

fbshipit-source-id: 5c9fec941b13bcb1007e0a29801e8e70ec042840
2018-02-05 11:20:11 -08:00
Zhiyong Dang
4d656842d9 enable USE_MOBILE_OPENGL by default
Summary:
iOS is also depend on USE_MOBILE_OPENGL, so I think we should only disable it for Android.
Closes https://github.com/caffe2/caffe2/pull/1835

Differential Revision: D6880522

Pulled By: Maratyszcza

fbshipit-source-id: b2c2fa052ad5948bc52fa49eb22c86eb08f59a39
2018-02-01 18:57:38 -08:00
Yangqing Jia
91d76f5dbd Reapply Windows fix
Summary:
Last fix was uncommitted due to a bug in internal build (CAFFE2_API causing error). This one re-applies it as well as a few more, especially enabling gtest.

Earlier commit message: Basically, this should make windows {static_lib, shared_lib} * {static_runtime, shared_runtime} * {cpu, gpu} work other than gpu shared_lib, which willyd kindly pointed out a symbol limit problem. A few highlights:
(1) Updated newest protobuf.
(2) use protoc dllexport command to ensure proper symbol export for windows.
(3) various code updates to make sure that C2 symbols are properly shown
(4) cmake file changes to make build proper
(5) option to choose static runtime and shared runtime similar to protobuf
(6) revert to visual studio 2015 as current cuda and msvc 2017 do not play well together.
(7) enabled gtest and fixed testing bugs.

Earlier PR is #1793

Closes https://github.com/caffe2/caffe2/pull/1827

Differential Revision: D6832086

Pulled By: Yangqing

fbshipit-source-id: 85f86e9a992ee5c53c70b484b761c9d6aed721df
2018-01-29 10:03:28 -08:00
Zhiyong Dang
c3596c2dfa remove "-s" compilation flag from clang when build for Android
Summary:
Now we use **clang** to build Caffe2 for Android with arm64-v8a ABI, but clang doesn't support "-s" compilation flag. If we append this flag to clang, it will report a warning:

> clang++: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]

This submit will check we use gcc or clang to build Caffe2 for Android.
Closes https://github.com/caffe2/caffe2/pull/1834

Differential Revision: D6833011

Pulled By: Yangqing

fbshipit-source-id: e4655d126fb3586e7af605a31a6b1c1ed66b9bcb
2018-01-29 00:03:02 -08:00
Yangqing Jia
73ed0d5ced Modernizing the gflags dependency in cmake.
Summary:
Historically, for interface dependent libraries (glog, gflags and protobuf), exposing them in Caffe2Config.cmake is usually difficult.

New versions of glog and gflags ship with new-style cmake targets, so one does not need to use variables. New-style targets also make it easier for people to depend on them in installed config files.

This diff modernizes the gflags library, and still provides a fallback path if the installed gflags does not have cmake config files coming with it.

It does change one behavior of the build process though - when one specifies -DUSE_GFLAGS=ON but gflags cannot be found, the old script automatically turns it off but the new script crashes, forcing the user to specify USE_GFLAGS=OFF.
Closes https://github.com/caffe2/caffe2/pull/1819

Differential Revision: D6826604

Pulled By: Yangqing

fbshipit-source-id: 210f3926f291c8bfeb24eb9671e5adfcbf8cf7fe
2018-01-27 19:31:14 -08:00
Jesse Hellemn
51feaee007 Assorted small change to conda scripts
Summary:
More changes to be added later. I need to make a PR so that I can point jenkins to this
Closes https://github.com/caffe2/caffe2/pull/1767

Reviewed By: orionr

Differential Revision: D6817174

Pulled By: pjh5

fbshipit-source-id: 0fc73ed7d781b5972e0234f8c9864c5e57180591
2018-01-26 09:32:36 -08:00
Vladimir Chalyshev
8c02674964 Revert D6817719: [caffe2][PR] Better support for windows
Summary:
This reverts commit d286264fccc72bf90a2fcd7da533ecca23ce557e

bypass-lint

An infra SEV is better than not reverting this diff.
If you copy this password, see you in SEV Review!
cause_a_sev_many_files

Differential Revision: D6817719

fbshipit-source-id: 8fe0ad7aba75caaa4c3cac5e0a804ab957a1b836
2018-01-26 06:08:49 -08:00
Yangqing Jia
8aa8eaabb1 Better support for windows
Summary:
Basically, this should make windows {static_lib, shared_lib} * {static_runtime, shared_runtime} * {cpu, gpu} work. A few highlights:

(1) Updated newest protobuf.
(2) use protoc dllexport command to ensure proper symbol export.
(3) various code updates to make sure that C2 symbols are properly shown
(4) cmake file changes to make build proper
(5) option to choose static runtime and shared runtime similar to protobuf
(6) revert to visual studio 2015 as current cuda and msvc 2017 do not play well together.
Closes https://github.com/caffe2/caffe2/pull/1793

Reviewed By: dzhulgakov

Differential Revision: D6817719

Pulled By: Yangqing

fbshipit-source-id: d286264fccc72bf90a2fcd7da533ecca23ce557e
2018-01-26 00:48:43 -08:00
Marat Dukhan
a7ef4e4d46 Use android.cmake.toolchain from Android NDK
Summary:
The android.cmake.toolchain file we use from a submodule is unmaintained and not updated since 2015.
It causes numerous problems in Caffe2 build:
- Caffe2 can't be built for Android ARM64, because gcc toolchain for ARM64 doesn't support NEON-FP16 intrinsics, and the android.cmake.toolchain we use doesn't allow us specify clang-5.0 from NDK r15c
- Caffe2 can't be built with Android NDK r16 (the most recent NDK version)
- Caffe2 can't be built for Android with Ninja generator

This change updates the build script to use $ANDROID/build/cmake/android.cmake.toolchain instead, which is maintained by Android team, and synchronized with Android NDK version.
As this toolchain file doesn't support "armeabi-v7a with NEON FP16" ABI, I had to disable mobile OpenGL backend, which requires NEON-FP16 extension to build. With some work, it can be re-enabled in the future.
Closes https://github.com/caffe2/caffe2/pull/1740

Differential Revision: D6707099

Pulled By: Maratyszcza

fbshipit-source-id: 8488594c4225deed0323c1e54c8d71c804b328df
2018-01-23 11:32:41 -08:00
Jesse Hellemn
a9a2b9ee3e Adding a separate script for anaconda builds
Summary:
Lots of unwanted stuff here that shouldn't be in this branch. I just need to make a PR so I can test it
Closes https://github.com/caffe2/caffe2/pull/1765

Reviewed By: orionr

Differential Revision: D6752610

Pulled By: pjh5

fbshipit-source-id: cc93290773640a9eb029f350b17f520ac5f2504e
2018-01-18 16:03:45 -08:00
Fei Sun
47de6f47f3 Use GCC to compile Android Caffe2
Summary:
It seems GCC performs better. Always use it to compile.
Closes https://github.com/caffe2/caffe2/pull/1725

Reviewed By: Yangqing

Differential Revision: D6690581

Pulled By: sf-wind

fbshipit-source-id: 3fceb25fc081bd4f875e914a0465b959c7fd5eda
2018-01-10 13:09:14 -08:00
Jesse Hellemn
f90feac38b Adding conda specific script to macos builds
Summary: Closes https://github.com/caffe2/caffe2/pull/1640

Reviewed By: pietern

Differential Revision: D6624013

Pulled By: pjh5

fbshipit-source-id: 0e980f020bce7bca1cb0845114a6071a004443af
2018-01-03 17:14:27 -08:00
Fei Sun
53f9a0f03d Ipython notebook directory name is changed, Change from ipython to jupyter, Also pass arguments instead of fixing --ip
Summary:
Change the directory name for ipython notebook.
Change the executable name fro ipython to jupyter
Pass arguments to the script to the notebook, instead of fixing --ip='*'. In some setup, --ip='*' cause jupyter notebook not displayed.
Closes https://github.com/caffe2/caffe2/pull/1546

Reviewed By: pietern

Differential Revision: D6460324

Pulled By: sf-wind

fbshipit-source-id: f73d7be96525e2ab97f3d0e7fcb4b1557934f873
2017-12-11 13:05:40 -08:00
Pieter Noordhuis
b3e5166d4c Run build_android.sh in Jenkins
Summary: Closes https://github.com/caffe2/caffe2/pull/1479

Differential Revision: D6386248

Pulled By: pietern

fbshipit-source-id: ac4ce163c164a49aa83e2c7015003763bc2fd0e7
2017-11-21 15:53:38 -08:00
Junjie Bai
303ed8af44 Allow specifying cmake build directory in the build scripts
Summary: Closes https://github.com/caffe2/caffe2/pull/1496

Reviewed By: pietern

Differential Revision: D6379743

Pulled By: bddppq

fbshipit-source-id: 1cb2238e5708547767729de3ac1d3e1a76ed5ba1
2017-11-20 20:32:30 -08:00
Pieter Noordhuis
b909fce358 Make macOS build use ccache via CMAKE_C*_COMPILER
Summary: Closes https://github.com/caffe2/caffe2/pull/1484

Reviewed By: Yangqing

Differential Revision: D6352137

Pulled By: pietern

fbshipit-source-id: f17c7c8cf38e7a4b8e2af60010bdde920f39e7c5
2017-11-16 14:24:54 -08:00
Pieter Noordhuis
39f0859749 Use ccache for macOS builds if present
Summary: Closes https://github.com/caffe2/caffe2/pull/1475

Reviewed By: Yangqing

Differential Revision: D6340034

Pulled By: pietern

fbshipit-source-id: a932b8b2fd6f94215162b1f15f8f3ea640f542be
2017-11-15 14:38:36 -08:00
Pieter Noordhuis
9575364d30 Update protobuf detection
Summary:
The scripts/build_local.sh script would always build protoc from the
third_party protobuf tree and override the PROTOBUF_PROTOC_EXECUTABLE
CMake variable. This variable is used by the protobuf CMake files, so
it doesn't let us detect whether the protoc was specified by the user
or by the protobuf CMake files (e.g. an existing installation). This
in turn led to a problem where system installed headers would be
picked up while using protoc built from third_party. This only works
if the system installed version matches the version included in the
Caffe2 tree. Therefore, this commit changes the variable to specify a
custom protoc executable to CAFFE2_CUSTOM_PROTOC_EXECUTABLE, and
forces the use of the bundled libprotobuf when it is specified.

The result is that we now EITHER specify a custom protoc (as required
for cross-compilation where protoc must be compiled for the host and
libprotobuf for the target architecture) and use libprotobuf from the
Caffe2 tree, OR use system protobuf.

If system protobuf cannot be found, we fall back to building protoc
and libprotobuf in tree and packaging it as part of the Caffe2 build
artifacts.
Closes https://github.com/caffe2/caffe2/pull/1328

Differential Revision: D6032836

Pulled By: pietern

fbshipit-source-id: b75f8dd88412f02c947dc81ca43f7b2788da51e5
2017-10-12 11:48:50 -07:00
Malek Doghman
3e9f0092eb Remove Redundant CMAKE_BUILD_TYPE
Summary: Closes https://github.com/caffe2/caffe2/pull/1323

Differential Revision: D6031534

Pulled By: Yangqing

fbshipit-source-id: de75523b17f67d092d45edb91fbb4e83c67b04be
2017-10-11 12:49:24 -07:00
Fei Sun
d2195218f6 Build local
Summary:
The build_local.sh script current is single thread, which is really slow. Use the same mechanism in build_android.sh to parallelize the build.
Closes https://github.com/caffe2/caffe2/pull/1282

Differential Revision: D5992231

Pulled By: sf-wind

fbshipit-source-id: 01ba06b6efcb0f535f974a2dfffbae9ba385d27d
2017-10-06 11:06:29 -07:00
Yangqing Jia
8286ce1e3a Re-license to Apache
Summary: Closes https://github.com/caffe2/caffe2/pull/1260

Differential Revision: D5906739

Pulled By: Yangqing

fbshipit-source-id: e482ba9ba60b5337d9165f28f7ec68d4518a0902
2017-09-28 16:22:00 -07:00
Edward Yang
7c45ac8e43 Officially support Python 3 in Conda build.
Summary: Closes https://github.com/caffe2/caffe2/pull/1188

Reviewed By: Yangqing

Differential Revision: D5898795

Pulled By: ezyang

fbshipit-source-id: 9d17c3239d8c76f6e0858a877242b6d2e11a4f18
2017-09-23 16:16:49 -07:00
Yangqing Jia
9b2c5501b8 Fix Windows build
Summary:
After this, windows should be all green.
Closes https://github.com/caffe2/caffe2/pull/1228

Reviewed By: bwasti

Differential Revision: D5888328

Pulled By: Yangqing

fbshipit-source-id: 98fd39a4424237f2910df69c8609455d7af3ca34
2017-09-21 20:13:15 -07:00
Yangqing Jia
93e12e75df Allow caffe2 to detect if cuda lib has been linked, and also fix oss build error.
Summary: Closes https://github.com/caffe2/caffe2/pull/1114

Reviewed By: pietern

Differential Revision: D5686557

Pulled By: Yangqing

fbshipit-source-id: 6b7245ebbe4eeb025ce9d0fe8fda427a0c3d9770
2017-08-23 18:41:15 -07:00
Yangqing Jia
5e0d434b4b Add build support for opengl and latest nnpack.
Summary:
(1) Changed android-cmake to use Yangqing/android-cmake, which supports NEON fp16.
(2) Added cmake scripts to build opengl.
(3) Updated nnpack to master, and changed the corresponding build files.
Closes https://github.com/caffe2/caffe2/pull/1061

Differential Revision: D5591387

Pulled By: Yangqing

fbshipit-source-id: 1d3f28511d33c09df6ecef5041448ac9a3246601
2017-08-09 00:31:53 -07:00
Geunsik Lim
02e5367bdd Support a build script for Tizen target
Summary:
There does not exist appropriate build script for Tizen software platform.
This commit is to fix #847.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Closes https://github.com/caffe2/caffe2/pull/877

Differential Revision: D5571335

Pulled By: Yangqing

fbshipit-source-id: 12759a3c0cb274ef93d7127b8185341e087f2bfa
2017-08-06 14:51:09 -07:00
Xiang Wei
5d721c1c14 Some adjustments for Windows build
Summary:
1. switch the protoc building system from msbuild to cmake
2. set default CMAKE_GENERATE to VS2015
3. set default CMAKE_BUILD_TYPE to Release
4. improve error handling
5. add the generated protobuf include path
6. exclude many optional dependencies from build_windows.bat
Closes https://github.com/caffe2/caffe2/pull/1014

Differential Revision: D5559402

Pulled By: Yangqing

fbshipit-source-id: 019e3a6c3c909154027fa932ce1d6549476b23bb
2017-08-03 17:54:12 -07:00
Luke Yeager
fda35fd19d TravisCI Overhaul
Summary:
Uncached build: https://travis-ci.org/lukeyeager/caffe2/builds/239677224
Cached build: https://travis-ci.org/lukeyeager/caffe2/builds/239686725

* Parallel builds everywhere
* All builds use CCache for quick build times (help from https://github.com/pytorch/pytorch/pull/614, https://github.com/ccache/ccache/pull/145)
* Run ctests when available (continuation of https://github.com/caffe2/caffe2/pull/550)
* Upgraded from cuDNN v5 to v6
* Fixed MKL build (by updating pkg version)
* Fixed android builds (b6f905a67b (commitcomment-22404119))

* ~~Building NNPACK fails with no discernible error message (currently disabled entirely)~~
* ~~Android builds continue to fail with existing error:~~
* ~~OSX builds time-out:~~

| Before | After | Changes |
| --- | --- | --- |
| COMPILER=g++ | linux | without CUDA |
| COMPILER=g++-5 | linux-gcc5 | without CUDA |
| COMPILER=g++ | linux-cuda | updated to cuDNN v6 |
| BLAS=MKL | linux-mkl | updated pkg version |
| BUILD_TARGET=android | linux-android | |
| COMPILER=clang++ | osx | |
| BUILD_TARGET=ios | osx-ios | |
| BUILD_TARGET=android | osx-android | |
| QUICKTEST | **GONE** | |
| COMPILER=g++-4.8 | **GONE** | |
| COMPILER=g++-4.9 | **GONE** | |
Closes https://github.com/caffe2/caffe2/pull/735

Reviewed By: Yangqing

Differential Revision: D5228966

Pulled By: bwasti

fbshipit-source-id: 6cfa6f5ff05fbd5c2078beea79564f1f3b9812fe
2017-06-16 10:18:05 -07:00
Arron Cao
7c3add4408 better android ndk path
Summary:
use user defined android ndk path instead of hard code.
Closes https://github.com/caffe2/caffe2/pull/506

Differential Revision: D5162646

Pulled By: Yangqing

fbshipit-source-id: 5093888e15607b3bf6682e05eb91aa94c6206b01
2017-05-31 20:35:23 -07:00
Herry
b5a215db0a Added python-pip and python-numpy into build_raspbian.sh
Summary:
Added python-pip and python-numpy into build_raspbian.sh script
because they are not installed in ubuntu/debian minimal image.
Closes https://github.com/caffe2/caffe2/pull/609

Differential Revision: D5121550

Pulled By: Yangqing

fbshipit-source-id: 14dd1450275fcc2aa9d2a06f0982f460528a1930
2017-05-24 10:09:16 -07:00
Anatoly Rosencrantz
1040b5f91c Enable bitcode for iOS builds
Summary:
build_ios.sh now have `-fembed-bitcode` flags for cmake and passes these flags to build_host_protoc.sh (which now accepts optional argument `--other-flags`). That allows to use output libs (libCaffe2_CPU.a, libCAFFE2_NNPACK.a, libCAFFE2_PTHREADPOOL.a and libprotobuf-lite.a, libprotobuf.a respectively) in Xcode projects with bitcode enabled.

Bitcode is enabled by default in all projects since Xcode7, is crucial for slicing and is mandatory for watchOS targets. Enabling bitcode for target requires bitcode to be enabled for all dependencies also, so Caffe2 built without bitcode forces developers to switch off bitcode for the whole app.
Closes https://github.com/caffe2/caffe2/pull/457

Reviewed By: bwasti

Differential Revision: D4978644

Pulled By: Yangqing

fbshipit-source-id: 5165abb507fb91bc8c38f7348d6836bccf8fcc22
2017-05-01 10:32:11 -07:00
Yangqing Jia
deb1327b6e Re-apply #266
Summary: Closes https://github.com/caffe2/caffe2/pull/404

Differential Revision: D4943280

Pulled By: Yangqing

fbshipit-source-id: c0988598d8ccb8329feac88382686324b90d4d46
2017-04-25 21:17:04 -07:00
yangyanzhan
2994dd6377 Fix python support problems caused by building script errors.
Summary:
When trying to build caffe2 with python provided by homebrew, I find out there are some errors in the building scripts. The "get_python_cmake_flags.py" script is supposed to find out the correct python library and header file locations. However, due to these errors, this script does not function correctly. After building, caffe2 is linked against the default python library provided by Apple which causes a crash when trying to validate whether or not the installation is successful:
```shell
python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"
```
The fix is as simple as follows:

- Add "shell" so that command substitution could work under Makefile.

- Add blank spaces between -D options so that they are treated as options not makefile targets.

- Print the "flags" variable without the newline character so that they could be utilized by command substitution correctly.
Closes https://github.com/caffe2/caffe2/pull/391

Differential Revision: D4943212

Pulled By: Yangqing

fbshipit-source-id: 04d3595fa2d89fe57aed5b6a7a91a95114a82a1b
2017-04-24 17:17:21 -07:00
Yangqing Jia
a48062b1a2 temporarily fix sync script bugs changes by reverting partially https://github.com/caffe2/caffe2/pull/266/files 2017-04-24 15:49:22 -07:00
Nay Oo
884690adb3 build_ios.sh comments fixes
Summary:
Changed _Android_ to _iOS_ in the comments in scripts/build_ios.sh.
Closes https://github.com/caffe2/caffe2/pull/364

Differential Revision: D4930101

Pulled By: Yangqing

fbshipit-source-id: 8f0a6aa1b43fd57c2f71f1c667c61d1f69b1e061
2017-04-21 10:52:29 -07:00
Yangqing Jia
9f86de2dc7 Support WatchOS build
Summary:
To build, run
`IOS_PLATFORM=WATCHOS scripts/build_ios.sh`
Closes https://github.com/caffe2/caffe2/pull/321

Reviewed By: Yangqing

Differential Revision: D4923400

Pulled By: salexspb

fbshipit-source-id: 3a87f068562a01e972ea915c9be32f0667e8ea19
2017-04-20 18:15:47 -07:00
Hannes Badertscher
9ef30b337e Add six to Tegra X1 install script
Summary:
When compiling Caffe2 on a Jetson TX2 using JetPack 3.0, the compilation with the Tegra X1 build script runs through perfectly fine. However, when running

    from caffe2.python import workspace

the following error shows up:

> ImportError: No module named six

After installing `six` manually using

    sudo pip install six

this works fine. I thus added the `six` module to the install script.

I assume this will also be required for the `build_raspbian.sh` script, however as I could test this, I didn't add it (yet).
Closes https://github.com/caffe2/caffe2/pull/293

Differential Revision: D4914121

Pulled By: Yangqing

fbshipit-source-id: 75947e8c295e1f5ad3f480a025fe8518dd91a957
2017-04-19 11:02:23 -07:00
Yangqing Jia
22f3825d8f Cmake mobile build improvements
Summary:
(1) integrate gcc compatible nnpack
(2) speed up the ios travis ci.
Closes https://github.com/caffe2/caffe2/pull/268

Differential Revision: D4897576

Pulled By: Yangqing

fbshipit-source-id: 729fa2e4b5be6f1d0b8d55305f047116969ff61f
2017-04-16 16:46:58 -07:00
Aaron Markham
b93a7b134a doxygen configs and updated python files to inc. doxygen tags (#266)
* updated ubuntu instructions

* updated ubuntu notes and troubleshooting

* updated tutorials using local files

* added doxygen python blocks for docs generation

* doxygen related files for generating docs
2017-04-14 16:30:33 -07:00
Bram Wasti
c101856214 Disable openmp when building for android
Summary: Closes https://github.com/caffe2/caffe2/pull/256

Reviewed By: salexspb

Differential Revision: D4853865

Pulled By: bwasti

fbshipit-source-id: 57768d538281bec2b18d8c6af7ae58009bbc257e
2017-04-07 14:35:01 -07:00
Yangqing Jia
92f2220589 Add whitelist capability for smaller mobile binaries
Summary:
This helps adjusting mobile build sizes when necessary.
Closes https://github.com/caffe2/caffe2/pull/228

Differential Revision: D4795135

Pulled By: Yangqing

fbshipit-source-id: 70a0dc35b31d5c8038081aedeb464e47e4284217
2017-03-29 08:47:08 -07:00
Aaron Markham
58f7f2b441 doxygen python block added
Summary: Closes https://github.com/caffe2/caffe2/pull/226

Differential Revision: D4793550

Pulled By: JoelMarcey

fbshipit-source-id: cc33e58186304fa8dcac2ee9115dcc271d785b1e
2017-03-29 06:46:16 -07:00
Yangqing Jia
463a28afcb Windows build for easier python usage
Summary:
Changed the windows python extension name to ".pyd" and did a manual copy from the {Debug,Release} folder to the main folder for easier automatic build.
Closes https://github.com/caffe2/caffe2/pull/222

Differential Revision: D4771065

Pulled By: Yangqing

fbshipit-source-id: 4a89d409fa66f0979cf4ecf502189b2f9cc11504
2017-03-24 11:33:27 -07:00
Yangqing Jia
aa4d07d3c4 bugfix for Windows, esp. VS 2017
Summary:
aaronmarkham this solves your Windows build issue. Basically:

(1) VS 2017 does not have CUDA support yet, and we will be waiting on NVidia to do so.

(2) VS 2015 and 2017 need different cmake generator strings.

This PR shows how to determine those and also updates appveyor to do contbuild guard for the following 3 settings:
- VS2015 without cuda
- VS2017 without cuda
- VS2015 with cuda
Closes https://github.com/caffe2/caffe2/pull/210

Differential Revision: D4745007

Pulled By: Yangqing

fbshipit-source-id: 50952552843abd0eb6f4145d9f132daeee3a6794
2017-03-21 05:17:59 -07:00
Yangqing Jia
1741fd839f Re-apply windows diff D4657831
Summary:
(Note: previous revert was due to a race condition between D4657831 and
D4659953 that I failed to catch.)

After this, we should have contbuild guarding the Windows build both with
and without CUDA.

This includes a series of changes that are needed to make Windows build,
specifically:

(1) Various flags that are needed in the cmake system, specially dealing
with /MD, /MT, cuda, cudnn, whole static linking, etc.
(2) Contbuild scripts based on appveyo.
(3) For Windows build, note that one will need to use "cmake --build" to
build stuff so that the build type is consistent between configuration and
actual build. see scripts\build_windows.bat for details.
(4) In logging.h, ERROR is already defined by Windows. I don't have a good
solution now, and as a result, LOG(ERROR) on windows is going to be
LOG(INFO).
(5) variable length array is not supported by MSVC (and it is not part of
C++ standard). As a result I replaced them with vectors.
(6) sched.h is not available on Windows, so akyrola 's awesome simple
async net might encounter some slowdown due to no affinity setting on
Windows.
(7) MSVC has a bug that does not work very well with template calls inide
a templated function call, which is a known issue that should be fixed in
MSVC 2017. However for now this means changes to conv_op_impl.h and
recurrent_net_op.h. No actual functionalities are changed.
(8) std host function calls are not supported in CUDA8+MSVC, so I changed
lp_pool (and maybe a few others) to use cuda device functions.
(9) The current Scale and Axpy has heavy templating that does not work
well with MSVC. As a result I reverted azzolini 's changes to the Scale
and Axpy interface, moved the fixed-length version to ScaleFixedSize and
AxpyFixedSize.
(10) CUDA + MSVC does not deal with Eigen well, so I guarded all Eigen
parts to only the non-CUDA part.
(11) In conclusion, it is fun but painful to deal with visual c++.

Differential Revision: D4666745

fbshipit-source-id: 3c9035083067bdb19a16d9c345c1ce66b6a86600
2017-03-07 11:02:12 -08:00
Avani Nandini
039c3cf0ba Revert D4657831: [caffe2][PR] Changes for Windows build to pass.
Summary: This reverts commit 070ded372ed78a7e3e3919fdffa1d337640f146e

Differential Revision: D4657831

fbshipit-source-id: 3a0fb403936a9257776d637ce3ba5dbd81e1119f
2017-03-06 21:02:36 -08:00
Yangqing Jia
7b8c7b11d2 Changes for Windows build to pass.
Summary:
After this, we should have contbuild guarding the Windows build both with
and without CUDA.

This includes a series of changes that are needed to make Windows build,
specifically:

(1) Various flags that are needed in the cmake system, specially dealing
with /MD, /MT, cuda, cudnn, whole static linking, etc.
(2) Contbuild scripts based on appveyo.
(3) For Windows build, note that one will need to use "cmake --build" to
build stuff so that the build type is consistent between configuration and
actual build. see scripts\build_windows.bat for details.
(4) In logging.h, ERROR is already defined by Windows. I don't have a good
solution now, and as a result, LOG(ERROR) on windows is going to be
LOG(INFO).
(5) variable length array is not supported by MSVC (and it is not part of
C++ standard). As a result I replaced them with vectors.
(6) sched.h is not available on Windows, so akyrola 's awesome simple
async net might encounter some slowdown due to no affinity setting on
Windows.
(7) MSVC has a
Closes https://github.com/caffe2/caffe2/pull/183

Reviewed By: ajtulloch

Differential Revision: D4657831

Pulled By: Yangqing

fbshipit-source-id: 070ded372ed78a7e3e3919fdffa1d337640f146e
2017-03-06 20:03:37 -08:00
Yangqing Jia
642b5a863f Adding changes that enable MSVC build
Summary:
MSVC 2015 has known bugs about template functions so these changes aim to fix them - no functional differences introduced.
Closes https://github.com/caffe2/caffe2/pull/179

Reviewed By: ajtulloch

Differential Revision: D4635241

Pulled By: Yangqing

fbshipit-source-id: a282a96e1e626e9440c1e3f3cb15b5b1fa710887
2017-03-01 16:47:58 -08:00
Bram Wasti
7a65736e46 Fix some python version issues with cmake
Summary:
This script will attempt to determine files that will be useful for building with the correct python version.  Currently on macOS with various python installations CMake fails to determine the correct location of python libraries.
Closes https://github.com/caffe2/caffe2/pull/163

Reviewed By: Yangqing

Differential Revision: D4594954

Pulled By: bwasti

fbshipit-source-id: c2b750ee9608a02fad4ce2f2293f5fa54dc7011c
2017-02-21 17:46:57 -08:00
Yangqing Jia
d4b1d347e9 minor: make cmake cuda ready
Summary: Closes https://github.com/caffe2/caffe2/pull/153

Differential Revision: D4571506

Pulled By: Yangqing

fbshipit-source-id: 4e887071774749fb84d34cab114dad4587d36ff1
2017-02-16 06:11:29 -08:00
Bram Wasti
7ee9984556 Added local build and apple fix for generating .so files
Summary: Closes https://github.com/caffe2/caffe2/pull/147

Reviewed By: bwasti

Differential Revision: D4564024

Pulled By: JoelMarcey

fbshipit-source-id: 526a5ab700f9356a3c93a6c64dc38e44a173559c
2017-02-16 06:11:28 -08:00
Yangqing Jia
e865c940a5 initial version of windows build
Summary:
This is essentially https://github.com/caffe2/caffe2/pull/146/ but shipit
failed to trigger task determinator.

Reviewed By: bwasti

Differential Revision: D4557698

fbshipit-source-id: b0e6777957e76df4e23671371098c2c6fe83b55c
2017-02-13 23:02:40 -08:00
Yangqing Jia
274ac2b590 Add cmake guard for python, build for tegra X1
Summary:
In short: cmake is lovely.
Closes https://github.com/caffe2/caffe2/pull/131

Differential Revision: D4517234

Pulled By: Yangqing

fbshipit-source-id: 1117878393f8fe7d6bebbc4a06a3c37b734f3222
2017-02-07 13:17:50 -08:00
Bram Wasti
8e1c513fb5 Make build_host_protoc more robust to weird system settings
Summary: If the PATH doesn't include cmake (such as when android studio wipes all the environment variables), this will still work.

Reviewed By: Yangqing

Differential Revision: D4504653

fbshipit-source-id: 56a8854e3daf6ee1f5b1cbeb83ca175a007dad12
2017-02-02 15:44:32 -08:00
Yangqing Jia
8553bd3f68 Ensure we are not using Eigen LGPL code, and build on raspbian.
Summary:
Turns out that building on raspbian is easy as a cake for caffe2 - cmake is awesome.
Closes https://github.com/caffe2/caffe2/pull/112

Differential Revision: D4480985

Pulled By: Yangqing

fbshipit-source-id: 5dbe5e1e71d8680dea7a5ec8a9ce7fbe6aa5270a
2017-01-30 09:44:27 -08:00
Yangqing Jia
3a82b33f84 Use protobuf's own cmake scripts and add travis for ios
Summary: Closes https://github.com/caffe2/caffe2/pull/110

Differential Revision: D4475170

Pulled By: Yangqing

fbshipit-source-id: 5964db04186619ac563f516cb202c5e2ba543403
2017-01-28 13:29:32 -08:00
Yangqing Jia
01e860505b Cmake for android
Summary:
Added cmake for android script under scripts, and set up the travis contbuild target.
Closes https://github.com/caffe2/caffe2/pull/109

Reviewed By: bwasti

Differential Revision: D4468767

Pulled By: Yangqing

fbshipit-source-id: 709f3eb6be24727b0a989d0901dbf377871b122a
2017-01-26 18:14:30 -08:00