Skip to content

[iOS] Clean up the iOS build script#25822

Closed
xta0 wants to merge 3 commits intogh/xta0/9/basefrom
gh/xta0/9/head
Closed

[iOS] Clean up the iOS build script#25822
xta0 wants to merge 3 commits intogh/xta0/9/basefrom
gh/xta0/9/head

Conversation

@xta0
Copy link
Contributor

@xta0 xta0 commented Sep 7, 2019

Stack from ghstack:

Summary

Since protobuf has been removed from mobile, the build_host_protoc.sh can be removed from build_ios.sh as well. However, the old caffe2 mobile build still depend on it, therefore, I introduced this BUILD_PYTORCH_MOBILE flag to gate the build.

  • iOS device build
BUILD_PYTORCH_MOBILE=1 IOS_ARCH=arm64 ./scripts/build_ios.sh
BUILD_PYTORCH_MOBILE=1 IOS_ARCH=armv7s ./scripts/build_ios.sh
  • iOS simulator build
BUILD_PYTORCH_MOBILE=1 IOS_PLATFORM=SIMULATOR ./scripts/build_ios.sh

Test Plan

All device and simulator builds run successfully

Differential Revision: D17264469

Summary

Since protobuf has been removed from mobile, the `build_host_protoc.sh` can be removed from `build_ios.sh` as well. However, the old caffe2 mobile build might still depends on it, therefore, I introduced this `BUILD_PYTORCH_MOBILE` flag to gate the build.

- iOS device build

```
BUILD_PYTORCH_MOBILE=1 IOS_ARCH=arm64 ./scripts/build_ios.sh
BUILD_PYTORCH_MOBILE=1 IOS_ARCH=armv7s ./scripts/build_ios.sh
```

- iOS simulator build

```
BUILD_PYTORCH_MOBILE=1 IOS_PLATFORM=SIMULATOR ./scripts/build_ios.sh
```

Test Plan

All device and simulator builds run successfully
@pytorchbot pytorchbot added the module: build Build system issues label Sep 7, 2019
Summary

Since protobuf has been removed from mobile, the `build_host_protoc.sh` can be removed from `build_ios.sh` as well. However, the old caffe2 mobile build might still depends on it, therefore, I introduced this `BUILD_PYTORCH_MOBILE` flag to gate the build.

- iOS device build

```
BUILD_PYTORCH_MOBILE=1 IOS_ARCH=arm64 ./scripts/build_ios.sh
BUILD_PYTORCH_MOBILE=1 IOS_ARCH=armv7s ./scripts/build_ios.sh
```

- iOS simulator build

```
BUILD_PYTORCH_MOBILE=1 IOS_PLATFORM=SIMULATOR ./scripts/build_ios.sh
```

Test Plan

All device and simulator builds run successfully
@xta0 xta0 requested review from dreiss, kostmo and ljk53 September 7, 2019 18:28
@xta0 xta0 added the module: ios Related to iOS support - build, API, Continuous Integration, document label Sep 7, 2019
### Summary

Since protobuf has been removed from mobile, the `build_host_protoc.sh` can be removed from `build_ios.sh` as well. However, the old caffe2 mobile build  still depend on it, therefore, I introduced this `BUILD_PYTORCH_MOBILE` flag to gate the build.

- iOS device build

```
BUILD_PYTORCH_MOBILE=1 IOS_ARCH=arm64 ./scripts/build_ios.sh
BUILD_PYTORCH_MOBILE=1 IOS_ARCH=armv7s ./scripts/build_ios.sh
```

- iOS simulator build

```
BUILD_PYTORCH_MOBILE=1 IOS_PLATFORM=SIMULATOR ./scripts/build_ios.sh
```

### Test Plan

All device and simulator builds run successfully
xta0 added a commit that referenced this pull request Sep 7, 2019
Summary

Since protobuf has been removed from mobile, the `build_host_protoc.sh` can be removed from `build_ios.sh` as well. However, the old caffe2 mobile build might still depends on it, therefore, I introduced this `BUILD_PYTORCH_MOBILE` flag to gate the build.

- iOS device build

```
BUILD_PYTORCH_MOBILE=1 IOS_ARCH=arm64 ./scripts/build_ios.sh
BUILD_PYTORCH_MOBILE=1 IOS_ARCH=armv7s ./scripts/build_ios.sh
```

- iOS simulator build

```
BUILD_PYTORCH_MOBILE=1 IOS_PLATFORM=SIMULATOR ./scripts/build_ios.sh
```

Test Plan

All device and simulator builds run successfully

ghstack-source-id: 94701cc
Pull Request resolved: #25822
Copy link
Contributor

@ljk53 ljk53 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@facebook-github-bot
Copy link
Contributor

@xta0 merged this pull request in 001ba1c.

ljk53 added a commit that referenced this pull request Sep 10, 2019
Summary:
Similar change as PR #25822.

Test Plan:
- Updated CI to use the new script.
- Will check pytorch android CI output to make sure it builds libtorch
  instead of libcaffe2.
ljk53 added a commit that referenced this pull request Sep 10, 2019
… for libtorch"

Summary:
Similar change as PR #25822.

Test Plan:
- Updated CI to use the new script.
- Will check pytorch android CI output to make sure it builds libtorch
  instead of libcaffe2.

Pull Request resolved: #25896

Differential Revision: [D17279722](https://our.internmc.facebook.com/intern/diff/D17279722)
ljk53 added a commit that referenced this pull request Sep 10, 2019
Summary:
Similar change as PR #25822.

Test Plan:
- Updated CI to use the new script.
- Will check pytorch android CI output to make sure it builds libtorch
  instead of libcaffe2.

ghstack-source-id: 63efddf
Pull Request resolved: #25896
facebook-github-bot pushed a commit that referenced this pull request Sep 10, 2019
Summary:
Pull Request resolved: #25896

Similar change as PR #25822.

Test Plan:
- Updated CI to use the new script.
- Will check pytorch android CI output to make sure it builds libtorch
  instead of libcaffe2.

Reviewed By: dreiss

Differential Revision: D17279722

Pulled By: ljk53

fbshipit-source-id: 93abcef0dfb93df197fabff29e53d71db5674255
@facebook-github-bot facebook-github-bot deleted the gh/xta0/9/head branch October 28, 2019 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: build Build system issues module: ios Related to iOS support - build, API, Continuous Integration, document

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants