Commit Graph

159 Commits

Author SHA1 Message Date
bd53c8eb93 Move torchvision install out of onnx test script
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/20890

Differential Revision: D15486657

Pulled By: bddppq

fbshipit-source-id: 3acd7386d1f070cad9bd43d6e74244b706c0dc16
2019-05-23 18:02:48 -07:00
90182a7332 Install torchvision from master
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/20836

Differential Revision: D15464705

Pulled By: bddppq

fbshipit-source-id: abe2ac2de2bf4c8d07334e6b2565c738c40428ae
2019-05-23 02:16:57 -07:00
4ba28deb6e Unify libtorch and libcaffe2 (#17783)
Summary:
This PR is an intermediate step toward the ultimate goal of eliminating "caffe2" in favor of "torch".  This PR moves all of the files that had constituted "libtorch.so" into the "libcaffe2.so" library, and wraps "libcaffe2.so" with a shell library named "libtorch.so".  This means that, for now, `caffe2/CMakeLists.txt` becomes a lot bigger, and `torch/CMakeLists.txt` becomes smaller.

The torch Python bindings (`torch_python.so`) still remain in `torch/CMakeLists.txt`.

The follow-up to this PR will rename references to `caffe2` to `torch`, and flatten the shell into one library.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17783

Differential Revision: D15284178

Pulled By: kostmo

fbshipit-source-id: a08387d735ae20652527ced4e69fd75b8ff88b05
2019-05-10 09:50:53 -07:00
3ac4d92824 tweak scripts/build_android.sh for ABI and header install (#20152)
Summary:
We now can build libtorch for Android.
This patch aims to provide two improvements to the build
- Make the architecture overridable by providing an environment variable `ANDROID_ABI`.
- Use `--target install` when calling cmake to actually get the header files nicely in one place.

I ran the script without options to see if the caffe2 builds are affected (in particularly by the install), but they seem to run OK and probably only produce a few files in build_android/install.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20152

Differential Revision: D15249020

Pulled By: pjh5

fbshipit-source-id: bc89f1dcadce36f63dc93f9249cba90a7fc9e93d
2019-05-07 17:44:07 -07:00
8f0603b128 C++ changes toward libtorch and libcaffe2 unification (#19554)
Summary:
* adds TORCH_API and AT_CUDA_API in places
* refactor code generation Python logic to separate
  caffe2/torch outputs
* fix hip and asan
* remove profiler_cuda from hip
* fix gcc warnings for enums
* Fix PythonOp::Kind
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19554

Differential Revision: D15082727

Pulled By: kostmo

fbshipit-source-id: 83a8a99717f025ab44b29608848928d76b3147a4
2019-04-26 01:38:10 -07:00
bbedadddce Fix Circle CI for ONNX repo (#19725)
Summary:
New pip package becomes more restricted. We need to add extra flag to make the installation work.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19725

Differential Revision: D15078698

Pulled By: houseroad

fbshipit-source-id: bbd782a0c913b5a1db3e9333de1ca7d88dc312f1
2019-04-25 10:48:41 -07:00
68c4ebbeeb Sync fbcode/caffe2 and xplat/caffe2 (1) (#19218)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19218

Sync some contents between fbcode/caffe2 and xplat/caffe2 to move closer towards a world where they are identical.

Reviewed By: dzhulgakov

Differential Revision: D14919916

fbshipit-source-id: 29c6b6d89ac556d58ae3cd02619aca88c79591c1
2019-04-13 21:45:52 -07:00
7db4c8ed76 fix the onnx ci
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/19048

Reviewed By: yinghai

Differential Revision: D14844917

Pulled By: houseroad

fbshipit-source-id: 30719e05a443981284dedf34a9e51213271aa934
2019-04-08 23:07:31 -07:00
0c5d444b28 change to use clang if NDK >= 18 (#18914)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18914
ghimport-source-id: 4d9d9322ee5559d96e13533ec37ff3be86a0227c

Reviewed By: ezyang

Differential Revision: D14794162

Pulled By: ljk53

fbshipit-source-id: caac55e12b1e62bf6ebcc6e2062d5ed122ad4e64
2019-04-05 10:02:03 -07:00
0829ef00dd Unify caffe2 and libtorch build scripts on Windows (#18683)
Summary:
`scripts/build_windows.bat` is the original way to build caffe2 on Windows, but since it is merged into libtorch, the build scripts should be unified because they actually do the same thing except there are some different flags.

The follow-up is to add the tests. Looks like the CI job for caffe2 windows is defined [here](https://github.com/pytorch/ossci-job-dsl/blob/master/src/jobs/caffe2.groovy#L906). Could we make them a separate file, just like what we've done in `.jenkins/pytorch/win-build.sh`? There's a bunch of things we can do there, like using ninja and sccache to accelerate build.

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

Differential Revision: D14730188

Pulled By: ezyang

fbshipit-source-id: ea287d7f213d66c49faac307250c31f9abeb0ebe
2019-04-05 07:47:32 -07:00
1c3428af31 Enhance build_ios.sh to be consistent with build_android.sh (#18564)
Summary:
1, Enhance build_ios.sh to be consistent with build_android.sh;
2, Add docs for build_ios.sh.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18564

Differential Revision: D14680752

Pulled By: soumith

fbshipit-source-id: 6d2667ed8a3c85a057a522838f5d0461dd4788cf
2019-03-28 21:37:55 -07:00
19c13eee39 Correct cmake flags passing (#18217)
Summary:
Fixes #18214.

According to the CMake manual, we should pass the arguments first, and put the directory as the last element. Otherwise, these flags may not be passed correctly.

Reference:
1. https://cmake.org/cmake/help/latest/manual/cmake.1.html#synopsis
2. https://stackoverflow.com/a/27169347
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18217

Differential Revision: D14540588

Pulled By: ezyang

fbshipit-source-id: a027f585dde66c5da7bbbe584fa42c3e56027d59
2019-03-20 09:21:31 -07:00
c65b0cbe3d Fix target name.
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/17365

Differential Revision: D14195831

Pulled By: soumith

fbshipit-source-id: fdf03f086f650148c34f4c548c66ef1eee698f05
2019-02-22 17:27:16 -08:00
3ab2080047 Fix install libcaffe2_protos.a issue mentioned in #14317 (#17393)
Summary:
Fix install libcaffe2_protos.a issue mentioned in #14317.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17393

Differential Revision: D14195359

Pulled By: soumith

fbshipit-source-id: ed4da594905d708d03fcd719dc50aec6811d5d3f
2019-02-22 17:05:48 -08:00
c3a23379ea add install step and docs for Android build (#17298)
Summary:
This commit did below enhancements:
1, add doc for build_android.sh;
2, add install step for build_android.sh, thus the headers and libraries can be collected together for further usage conveniently;
3, change the default INSTALL_PREFIX from $PYTORCH_ROOT/install to $PYTORCH_ROOT/build_android/install to make the project directory clean.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17298

Differential Revision: D14149709

Pulled By: soumith

fbshipit-source-id: a3a38cb41f26377e21aa89e49e57e8f21c9c1a39
2019-02-20 07:05:24 -08:00
fc2d8c6889 Eliminate PYCMD in favor of PYTHON_EXECUTABLE in CMake.
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/16522

Differential Revision: D13867376

Pulled By: resistor

fbshipit-source-id: 6bce68facea83c5161a31fcdfafe08827999eb2b
2019-01-30 17:13:43 -08:00
9d6be6ac09 Remove redundant "build" setup.py commond from onnx scripts
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/16487

Differential Revision: D13858628

Pulled By: bddppq

fbshipit-source-id: e1ff3fc5f9be5d3dbbf96ee73c3a8c901b440b82
2019-01-28 22:59:33 -08:00
b792bfec0e s/fwdproxy.any/fwdproxy/g in fbsource (#16024)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16024

codemod with 'Yes to all': s/fwdproxy.any/fwdproxy/g in fbsource

Reviewed By: maxgeorg

Differential Revision: D13666336

fbshipit-source-id: a5a694d66efec5304a1c8c231d638441f88efe1d
2019-01-15 17:26:31 -08:00
8964a2e6e6 Split Caffe2 CI into cmake-only and python builds (#15917)
Summary:
bypass-lint

- Change all Caffe2 builds to use setup.py instead of cmake
- Add a -cmake- Caffe2 build configuration that uses cmake and only builds cpp
- Move skipIfCI logic from onnx test scripts to the rest of CI logic
- Removal of old PYTHONPATH/LD_LIBRARY_PATH/etc. env management
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15917

Reviewed By: orionr

Differential Revision: D13637583

Pulled By: pjh5

fbshipit-source-id: c5c5639db0251ba12b6e4b51b2ac3b26a8953153
2019-01-14 15:20:44 -08:00
04f5605ba1 Fix several DeprecationWarning: invalid escape sequence (#15733)
Summary:
Hello,

This is a little patch to fix `DeprecationWarning: invalid escape sequence`.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15733

Differential Revision: D13587291

Pulled By: soumith

fbshipit-source-id: ce68db2de92ca7eaa42f78ca5ae6fbc1d4d90e05
2019-01-05 08:53:35 -08:00
12cf5178aa caffe2 mobile opengl (#15322)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15322

caffe2 mobile opengl code is not used, deleting it to reduce complications when we perform other changes

Reviewed By: Maratyszcza

Differential Revision: D13499943

fbshipit-source-id: 6479f6b9f50f08b5ae28f8f0bc4a1c4fc3f3c3c2
2018-12-18 08:20:52 -08:00
0d1f382e39 Removing Caffe2-specific conda infra
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/11961

Differential Revision: D10045909

Pulled By: pjh5

fbshipit-source-id: e9c12124897ee586aeb8b6654b31e4b81687199a
2018-11-26 12:18:17 -08:00
351478439f Disable QNNPACK for multi-architecture iOS builds (#14125)
Summary:
QNNPACK contains assembly files, and CMake tries to build them for wrong architectures in multi-arch builds. This patch has two effects:
- Disables QNNPACK in multi-arch iOS builds
- Specifies a single `IOS_ARCH=arm64` by default (covers most iPhones/iPads on the market)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14125

Differential Revision: D13112366

Pulled By: Maratyszcza

fbshipit-source-id: b369083045b440e41d506667a92e41139c11a971
2018-11-16 21:18:01 -08:00
62b27d27b7 Re-enable experimental ops build (#12821)
Summary:
The experimental ops for the c10 dispatcher have accidentally been disabled in the oss build when the directory changed from `c10` to `experimental/c10`. This PR re-enables them.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/12821

Differential Revision: D10446779

Pulled By: smessmer

fbshipit-source-id: ac58cd1ba1281370e62169ec26052d0962225375
2018-10-29 11:28:54 -07:00
fcf801f061 Support building binary on windows machines
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/13059

Reviewed By: llyfacebook

Differential Revision: D10560147

Pulled By: sf-wind

fbshipit-source-id: c8f38b30c9acdf6ae494e56a5876fd4493696e5d
2018-10-24 12:24:42 -07:00
8482ea8774 Update develop install command in onnx scripts
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/12561

Differential Revision: D10340194

Pulled By: bddppq

fbshipit-source-id: 10fb7261028d56f73111e2ca39d4eb2ab930812a
2018-10-11 10:38:52 -07:00
38f3d1fc40 move flags to c10 (#12144)
Summary:
still influx.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/12144

Reviewed By: smessmer

Differential Revision: D10140176

Pulled By: Yangqing

fbshipit-source-id: 1a313abed022039333e3925d19f8b3ef2d95306c
2018-10-04 02:09:56 -07:00
2217c0b408 create the onnx_root in local, and link it
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/12294

Reviewed By: BIT-silence

Differential Revision: D10178208

Pulled By: houseroad

fbshipit-source-id: 6105b88ea5f3ce9164961cf13b356d85178c374d
2018-10-03 13:55:56 -07:00
7c678746ef update the script to match the current build process
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/12262

Reviewed By: BIT-silence

Differential Revision: D10148658

Pulled By: houseroad

fbshipit-source-id: c083346cc40154f7baea1be713cac799cf076cbf
2018-10-02 14:01:37 -07:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
e323f02277 Fixing missing PyCObject_Type bug (#8467) 2018-06-14 08:08:25 -07:00
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
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
a890a0be07 Renanme ZFNet to ZFNet512 (#7723) 2018-05-21 11:37:39 +08:00
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
bf9676180f Update the name of env var for triggering integrated conda build (#7557) 2018-05-14 16:28:39 -07:00
cf9913d569 Install torchvision before running integration tests (#7552) 2018-05-14 11:49:10 -07:00