Commit Graph

33 Commits

Author SHA1 Message Date
Eli Uriegas
346a349111 Update all instances of 1.4.0 -> 1.5.0 (#31785)
Summary:
Done with:

```
❯ sed -i 's/1\.4\.0/1.5.0/g' $(find -type f -not -path "./third_party/*")
```

This was previously done in separate commits, but it would be beneficial to bump all included projects within this repository at the same time.

Old bumps for reference:
* [iOS]Update Cocoapods to 1.4.0: https://github.com/pytorch/pytorch/pull/30326
* [android] Change nightly builds version to 1.4.0-SNAPSHOT: https://github.com/pytorch/pytorch/pull/27381
* Roll master to 1.4.0: https://github.com/pytorch/pytorch/pull/27374

Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31785

Differential Revision: D19277925

Pulled By: seemethere

fbshipit-source-id: f72ad082f0566004858c9374879f4b1bee169f9c
2020-01-07 08:00:17 -08:00
Tao Xu
47033b49f3 Suppress XCode build warnings (#31000)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31000

## Summary

Add Fastlane configurations to suppress the build warnings from XCode.

Test Plan: Imported from OSS

Differential Revision: D18912489

Pulled By: xta0

fbshipit-source-id: f2c54d54a12ad2415695d1fcb1800684c7a9e560
2019-12-10 11:37:52 -08:00
Edward Yang
38986e1dea Split libtorch.so back into libtorch_{cpu,cuda,hip} (#30315)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30315

The new structure is that libtorch_cpu contains the bulk of our
code, and libtorch depends on libtorch_cpu and libtorch_cuda.
This is a reland of https://github.com/pytorch/pytorch/pull/29731 but
I've extracted all of the prep work into separate PRs which can be
landed before this one.

Some things of note:

* torch/csrc/cuda/nccl.cpp was added to the wrong list of SRCS, now fixed (this didn't matter before because previously they were all in the same library)
* The dummy file for libtorch was brought back from the dead; it was previously deleted in #20774
In an initial version of the patch, I forgot to make torch_cuda explicitly depend on torch_cpu. This lead to some very odd errors, most notably "bin/blob_test: hidden symbol `_ZNK6google8protobuf5Arena17OnArenaAllocationEPKSt9type_infom' in lib/libprotobuf.a(arena.cc.o) is referenced by DSO"
* A number of places in Android/iOS builds have to add torch_cuda explicitly as a library, as they do not have transitive dependency calculation working correctly
* I had to torch_cpu/torch_cuda caffe2_interface_library so that they get whole-archived linked into torch when you statically link. And I had to do this in an *exported* fashion because torch needs to depend on torch_cpu_library. In the end I exported everything and removed the redefinition in the Caffe2Config.cmake. However, I am not too sure why the old code did it in this way in the first place; however, it doesn't seem to have broken anything to switch it this way.
* There's some uses of `__HIP_PLATFORM_HCC__` still in `torch_cpu` code, so I had to apply it to that library too (UGH). This manifests as a failer when trying to run the CUDA fuser. This doesn't really matter substantively right now because we still in-place HIPify, but it would be good to fix eventually. This was a bit difficult to debug because of an unrelated HIP bug, see https://github.com/ROCm-Developer-Tools/HIP/issues/1706

Fixes #27215 (as our libraries are smaller), and executes on
part of the plan in #29235.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

Test Plan: Imported from OSS

Differential Revision: D18790941

Pulled By: ezyang

fbshipit-source-id: 01296f6089d3de5e8365251b490c51e694f2d6c7
2019-12-04 08:04:57 -08:00
Sebastian Messmer
bc2e6d10fa Back out "Revert D17908478: Switch PyTorch/Caffe2 to C++14"
Summary: Original commit changeset: 775d2e29be0b

Test Plan: CI

Reviewed By: mruberry

Differential Revision: D18775520

fbshipit-source-id: a350b3f86b66d97241f208786ee67e9a51172eac
2019-12-03 14:33:43 -08:00
Tao Xu
f114c33e69 Fix iOS CI (#30327)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30327

### Summary

Seems like starting from macOS 10.15, we can no longer get access to the `Downloads` folder in our macOS machines.

```
permissionError: [Errno 1] Operation not permitted: '/Users/distiller/Downloads'
```

The fix is to change the conda download directory to ${HOME}

### Test Plan

- iOS jobs are back to normal
- Don't break other jobs

Test Plan: Imported from OSS

Differential Revision: D18717380

Pulled By: xta0

fbshipit-source-id: cad754076bf4ae5035741aa57a310ad87c76726e
2019-12-03 11:24:21 -08:00
Sebastian Messmer
a2ed50c920 Revert D17908478: Switch PyTorch/Caffe2 to C++14
Test Plan: revert-hammer

Differential Revision:
D17908478

Original commit changeset: 6e340024591e

fbshipit-source-id: 775d2e29be0bc3a0db64f164c8960c44d4877d5d
2019-11-27 14:57:05 -08:00
Sebastian Messmer
d0acc9c085 Switch PyTorch/Caffe2 to C++14 (#30406)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30406

ghstack-source-id: 94642238

Test Plan: waitforsandcastle

Differential Revision: D17908478

fbshipit-source-id: 6e340024591ec2c69521668022999df4a33b4ddb
2019-11-27 10:47:31 -08:00
Hao Lu
9fb879934e Revert D18641413: add unit tests to iOS CI jobs
Test Plan: revert-hammer

Differential Revision:
D18641413

Original commit changeset: 12942206f1de

fbshipit-source-id: 4fa76d50fb897db4342d10a4e46a9887e37ef233
2019-11-22 15:24:27 -08:00
Tao Xu
638f4c1fb3 Update Cocoapods to 1.4.0 (#30326)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30326

Note that this PR won't trigger the cocoapods build. We'll push the binary and release the cocoapods after the branch cut.

Test Plan: Imported from OSS

Differential Revision: D18660308

Pulled By: xta0

fbshipit-source-id: 95dd97b7b67e70ecee3a65d8bbc125791872b7ca
2019-11-22 11:31:21 -08:00
Tao Xu
fa242246ee add unit tests to iOS CI jobs (#30133)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30133

### Summary

Recently we've found that the master branch was constantly broken due to some unwanted change being landed on mobile. The problem is that our CI was not able to detect the runtime errors.

### Previous work

- Add an unit test target to the iOS TestApp ( #29962 )
- Update Fastlane to run tests ( #29963 )

### What's been changed in CI

1. XCode version has been updated to 11.2.1
2. For iOS simulator build, we'll run some unit tests( currently only one) after the build test.

Test Plan: Imported from OSS

Differential Revision: D18641413

Pulled By: xta0

fbshipit-source-id: 12942206f1dee045b2addba3ae618760e992752c
2019-11-22 10:52:11 -08:00
Junjie Bai
352731bd6e Revert D18632773: Split libtorch.so back into libtorch_{cpu,cuda,hip}
Test Plan: revert-hammer

Differential Revision:
D18632773

Original commit changeset: ea717c81e0d7

fbshipit-source-id: 18601439f9f81c9f389020e5a0e4e04adb21772d
2019-11-21 15:01:09 -08:00
Edward Yang
ec30d9028a Split libtorch.so back into libtorch_{cpu,cuda,hip} (#29731)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/29731

The new structure is that libtorch_cpu contains the bulk of our
code, and libtorch depends on libtorch_cpu and libtorch_cuda.

Some subtleties about the patch:
- There were a few functions that crossed CPU-CUDA boundary without API macros. I just added them, easy enough. An inverse situation was aten/src/THC/THCTensorRandom.cu where we weren't supposed to put API macros directly in a cpp file.
- DispatchStub wasn't getting all of its symbols related to static members on DispatchStub exported properly. I tried a few fixes but in the end I just moved everyone off using DispatchStub to dispatch CUDA/HIP (so they just use normal dispatch for those cases.) Additionally, there were some mistakes where people incorrectly were failing to actually import the declaration of the dispatch stub, so added includes for those cases.
- torch/csrc/cuda/nccl.cpp was added to the wrong list of SRCS, now fixed (this didn't matter before because previously they were all in the same library)
- The dummy file for libtorch was brought back from the dead; it was previously deleted in #20774
- In an initial version of the patch, I forgot to make torch_cuda explicitly depend on torch_cpu. This lead to some very odd errors, most notably "bin/blob_test: hidden symbol `_ZNK6google8protobuf5Arena17OnArenaAllocationEPKSt9type_infom' in lib/l
ibprotobuf.a(arena.cc.o) is referenced by DSO"
- A number of places in Android/iOS builds have to add torch_cuda explicitly as a library, as they do not have transitive dependency calculation working correctly. This situation also happens with custom C++ extensions.
- There's a ROCm compiler bug where extern "C" on functions is not respected. There's a little workaround to handle this.
- Because I was too lazy to check if HIPify was converting TORCH_CUDA_API into TORCH_HIP_API, I just made it so HIP build also triggers the TORCH_CUDA_API macro. Eventually, we should translate and keep the nature of TORCH_CUDA_API constant in all cases.

Fixes #27215 (as our libraries are smaller), and executes on
part of the plan in #29235.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

Test Plan: Imported from OSS

Differential Revision: D18632773

Pulled By: ezyang

fbshipit-source-id: ea717c81e0d7554ede1dc404108603455a81da82
2019-11-21 11:27:33 -08:00
Tao Xu
5fa941d4e2 update fastlane to use Scanfile (#29963)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/29963

### Summary

To run unit tests via Fastlane, simply run `fastlane scan`. Under the hood, it uses `xcodebuild` to run the unit tests. The Scanfile serves as a config file for Fastlane where you can specify parameters you want to pass to `xcodebuild`. More about Scan - https://docs.fastlane.tools/actions/scan/

### Test Plan

- `fastlane scan` is able to run on CI machines.

Test Plan: Imported from OSS

Differential Revision: D18606098

Pulled By: xta0

fbshipit-source-id: b4727d964fa56076b2ff383b40d1b13607721394
2019-11-19 16:32:26 -08:00
Tao Xu
57acc2ff3a add an unit test target to TestApp (#29962)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/29962

### Summary

Recently we've found that the master branch was constantly broken due to some unwanted change being landed on mobile. The problem is that our CI was not able to detect the runtime errors. Starting from this PR, we'll add some unit tests to the iOS Simulator build. As follows:

1. Add an unit test target to XCode (this PR)
2. Use Fastlane to run the tests on CI
3. Modify the CI scripts to trigger tests

### Test Plan

- Don't break the existing CI jobs unless they are flaky.

Test Plan: Imported from OSS

Differential Revision: D18582908

Pulled By: xta0

fbshipit-source-id: f960c47d3bbda79e754a0513e8711867fd3588d2
2019-11-19 11:03:45 -08:00
Tao Xu
30f88bb05a Fix the TestApp (#29247)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/29247

### Summary

If you run the TestApp using Cocoapods, you'll likely run into an error due to the lack of `config.json` in the main bundle. This PR fixes this crash and updates the README as well.

### Test Plan

- Don't break CIs

Test Plan: Imported from OSS

Differential Revision: D18339047

Pulled By: xta0

fbshipit-source-id: 244cf1ca8729c7ac918258d4eff14d34363e8389
2019-11-05 16:28:51 -08:00
Tao Xu
ebf5dd447e Cocoapods 1.3.1 release (#29240)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/29240

### Summary

The 1.3.1 binary has been uploaded to AWS - https://ossci-ios.s3.amazonaws.com/libtorch_ios_1.3.1.zip. This PR updates the cocoapods version to 1.3.1

### Test Plan

- The 1.3.1 binary works well

Test Plan: Imported from OSS

Differential Revision: D18333750

Pulled By: xta0

fbshipit-source-id: fe6e42c51f3902ad42cab33f473dffb0f6f33333
2019-11-05 14:50:46 -08:00
Tao Xu
73d77626b8 Check device connection before running xcodebuild (#28996)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28996

### Summary

It'd be frustrated to realize the device is not connected after waiting for the build finishes. This PR checks the device connection status before xcodebuild.

### Test Plan

- Don't break `bootstrap.sh`

Test Plan: Imported from OSS

Differential Revision: D18258348

Pulled By: xta0

fbshipit-source-id: dda90e7194114e99b2774a3b64ed41f78221f827
2019-11-02 14:38:08 -07:00
Tao Xu
a0339c8d8f bootstrap.sh refactor (#28809)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28809

### Summary

This PR adds the interactive mode to `bootstrap.sh`. Instead of passing the credential information from command parameters(`-t`,`-p`), we're going to ask the user enter that information and save it to a config file, such that next time you don't have to enter again. So all you need now, is one line command

```shell
./bootstrap
```

### Test Plan

- TestApp.ipa can be installed on any devices
- Don't break CI jobs

Test Plan: Imported from OSS

Differential Revision: D18194032

Pulled By: xta0

fbshipit-source-id: a416ef7f13fa565e2c10bb55f94a8ce994b4e869
2019-10-28 22:20:29 -07:00
Tao Xu
e96ea288a8 Automation scripts for perf testing (#28622)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28622

### Summary

As discussed in #28405 , this is the third PR.  The`bootstrap.sh` script is mainly for those who want to do perf on iOS but don't want to touch XCode or any iOS code.  But it does require you have valid iOS dev credentials installed on your machine. (You can easily acquire those stuff from any experienced iOS developers. Takes only 5 mins to setup )

 All you need to do is run

```shell
./bootstrap -t ${TEAM_ID} -p ${PROFILE}
```

The testing app will be automatically installed on your device. The log of the benchmark function will be displayed on the screen.

### Test plan

Don't break any CI jobs unless they're flaky.

Test Plan: Imported from OSS

Differential Revision: D18156178

Pulled By: xta0

fbshipit-source-id: cd7ba8d87bf26db885262888b9d6a5fd072309d1
2019-10-25 19:50:24 -07:00
Tao Xu
896b5d9113 Scripts for setting up benchmark projects (#28469)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28469

### Summary

As described [here](https://github.com/pytorch/pytorch/pull/28405), This PR is the second one that contains scripts for setting up the benchmark projects.

### Test Plan

Don't break CI jobs unless they are flaky.

Test Plan: Imported from OSS

Differential Revision: D18097248

Pulled By: xta0

fbshipit-source-id: 6f9d1275a07aecae21afd81d5e90a89a75d0270f
2019-10-23 16:16:57 -07:00
Tao Xu
636fbcdd0a add benchmark code to iOS TestApp (#28405)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28405

### Summary

As discussed with AshkanAliabadi  and ljk53, the iOS TestApp will share the same benchmark code with Android's speed_benchmark_torch.cpp. This PR is the first part which contains the Objective-C++ code.

The second PR will include the scripts to setup and run the benchmark project. The third PR will include scripts that can automate the whole "build - test - install" process.

There are many ways to run the benchmark project. The easiest way is to use cocoapods. Simply run `pod install`. However, that will pull the 1.3 binary which is not what we want, but we can still use this approach to test the benchmark code. The second PR will contain scripts to run custom builds that we can tweak.

### Test Plan
- Don't break any existing CI jobs  (except for those flaky ones)

Test Plan: Imported from OSS

Differential Revision: D18064187

Pulled By: xta0

fbshipit-source-id: 4cfbb83c045803d8b24bf6d2c110a55871d22962
2019-10-22 12:52:30 -07:00
Tao Xu
d403410e0d Fastlane update (#28356)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28356

### Summary

I'm working on setting up a benchmark test project for iOS, which will reuse this Fastlane file. This PR removes the "cert install" code from "before_all" to a standalone lane target.

### Test Plan

- don't break any existing CI jobs

Test Plan: Imported from OSS

Differential Revision: D18053675

Pulled By: xta0

fbshipit-source-id: e4760a8494916c410af19ca43f040fc463551d11
2019-10-21 19:31:55 -07:00
Tao Xu
6385a39eec add testing code to PR jobs (#27594)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27594

## Summary

Since the nightly jobs are lack of  testing phases, we don't really have a way to test the binary before uploading it to AWS. To make the work more solid, we need to figure out a way to verify the binary.

Fortunately, the XCode tool chain offers a way to build your app without XCode app, which is the [xcodebuild](https://developer.apple.com/library/archive/technotes/tn2339/_index.html) command. Now we can link our binary to a testing app and run `xcodebuild` to to see if there is any linking error. The PRs below have already done some of the preparation jobs

- [#26261](https://github.com/pytorch/pytorch/pull/26261)
- [#26632](https://github.com/pytorch/pytorch/pull/26632)

The challenge comes when testing the arm64 build as we don't have a way to code-sign our TestApp. Circle CI has a  [tutorial](https://circleci.com/docs/2.0/ios-codesigning/)  but is too complicated to implement. Anyway, I figured out an easier way to do it

1. Disable automatically code sign in XCode
2. Export the encoded developer certificate and provisioning profile to org-context in Circle CI (done)
3. Install the developer certificate to the key chain store on CI machines via Fastlane.
4. Add the testing code to PR jobs and verify the result.
5. Add the testing code to nightly jobs and verify the result.

## Test Plan

- Both PR jobs and nightly jobs can finish successfully.
- `xcodebuild` can finish successfully

Test Plan: Imported from OSS

Differential Revision: D17850703

Pulled By: xta0

fbshipit-source-id: ab220061c6e2ec75cae23684ad999c4f9c276820
2019-10-10 17:36:12 -07:00
Tao Xu
52985a3501 Install developer certificate for code signing (#27593)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27593

## Summary

Since the nightly jobs are lack of  testing phases, we don't really have a way to test the binary before uploading it to AWS. To make the work more solid, we need to figure out a way to verify the binary.

Fortunately, the XCode tool chain offers a way to build your app without XCode app, which is the [xcodebuild](https://developer.apple.com/library/archive/technotes/tn2339/_index.html) command. Now we can link our binary to a testing app and run `xcodebuild` to to see if there is any linking error. The PRs below have already done some of the preparation jobs

- [#26261](https://github.com/pytorch/pytorch/pull/26261)
- [#26632](https://github.com/pytorch/pytorch/pull/26632)

The challenge comes when testing the arm64 build as we don't have a way to code-sign our TestApp. Circle CI has a  [tutorial](https://circleci.com/docs/2.0/ios-codesigning/)  but is too complicated to implement. Anyway, I figured out an easier way to do it

1. Disable automatically code sign in XCode
2. Export the encoded developer certificate and provisioning profile to org-context in Circle CI (done)
3. Install the developer certificate to the key chain store on CI machines via Fastlane.
4. Add the testing code to PR jobs and verify the result.
5. Add the testing code to nightly jobs and verify the result.

## Test Plan

- Both PR jobs and nightly jobs can finish successfully.
- `xcodebuild` can finish successfully

Test Plan: Imported from OSS

Differential Revision: D17848814

Pulled By: xta0

fbshipit-source-id: 48353f001c38e61eed13a43943253cae30d8831a
2019-10-09 20:07:30 -07:00
Tao Xu
7591010077 Disable automatically code signing for TestApp (#27591)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27591

## Summary

Since the nightly jobs are lack of  testing phases, we don't really have a way to test the binary before uploading it to AWS. To make the work more solid, we need to figure out a way to verify the binary.

Fortunately, the XCode tool chain offers a way to build your app without XCode app, which is the [xcodebuild](https://developer.apple.com/library/archive/technotes/tn2339/_index.html) command. Now we can link our binary to a testing app and run `xcodebuild` to to see if there is any linking error. The PRs below have already done some of the preparation jobs

- [#26261](https://github.com/pytorch/pytorch/pull/26261)
- [#26632](https://github.com/pytorch/pytorch/pull/26632)

The challenge comes when testing the arm64 build as we don't have a way to code-sign our TestApp. Circle CI has a  [tutorial](https://circleci.com/docs/2.0/ios-codesigning/)  but is too complicated to implement. Anyway, I figured out an easier way to do it

1. Disable automatically code sign in XCode
2. Export the encoded developer certificate and provisioning profile to org-context in Circle CI (done)
3. Install the developer certificate to the key chain store on CI machines via Fastlane.
4. Add the testing code to PR jobs and verify the result.
5. Add the testing code to nightly jobs and verify the result.

## Test Plan

- Both PR jobs and nightly jobs can finish successfully.
- `xcodebuild` can finish successfully

Test Plan: Imported from OSS

Differential Revision: D17844036

Pulled By: xta0

fbshipit-source-id: 741f0442a718c9bda706107a2c4c3baed4c37137
2019-10-09 16:23:15 -07:00
Tao Xu
75d8dab9be Update the link for iOS demo app in README.md (#27145)
Summary:
Update the link for iOS demo app in README.md
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27145

Differential Revision: D17746591

Pulled By: xta0

fbshipit-source-id: 6f49a0daddc8b79804e1b8487ba1db3807a3f481
2019-10-03 13:43:58 -07:00
Tao Xu
f7742d2b21 Prepare for Cocoapods 1.3 Release (#26751)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26751

### Summary

We're going to use the AWS s3 bucket - `s3://ossci-ios` to store the release binary. To release the cocoapods, we can follow the steps below:

1.  Open a fake PR to trigger the CI job that pulls the code from the 1.3.0 tag branch and does the building and uploading.
2. Verify the binary locally  - Run tests on both arm64 and simulator
3. Publish the cocoapods officially

### Test plan

- podspec lint command succeeds
    - `pod spec lint --verbose --allow-warnings --no-clean --use-libraries --skip-import-validation`

Test Plan: Imported from OSS

Differential Revision: D17577131

Pulled By: xta0

fbshipit-source-id: 55fee918ecc5c4e0b6d714488a12351b4370afac
2019-09-25 12:16:06 -07:00
Tao Xu
781f861847 Add testing script for iOS x86 build (#26632)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26632

### Summary

This script builds the TestApp (located in ios folder) to generate an iOS x86 executable via the `xcodebuild` toolchain on macOS. The goal is to provide a quick way to test the generated static libraries to see if there are any linking errors. The script can also be used by the iOS CI jobs. To run the script, simply see description below:

```shell
$ruby scripts/xcode_ios_x86_build.rb --help

-i, --install                    path to the cmake install folder
-x, --xcodeproj                  path to the XCode project file
```

### Note

The script mainly deals with the iOS simulator build. For the arm64 build, I haven't found a way to disable the Code Sign using the `xcodebuiild` tool chain (XCode 10). If anyone knows how to do that, please feel free to leave a comment below.

### Test Plan

- The script can build the TestApp and link the generated static libraries successfully
- Don't break any CI job

Test Plan: Imported from OSS

Differential Revision: D17530990

Pulled By: xta0

fbshipit-source-id: f50bef7127ff8c11e884c99889cecff82617212b
2019-09-23 11:21:21 -07:00
Lu Fang
72aeafd3d0 Fix no tab check (#26399)
Summary:
ignore the folder and its children ios/TestApp
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26399

Differential Revision: D17451239

Pulled By: houseroad

fbshipit-source-id: d6ba666bf955454eca4a10c00784ee5947a70f59
2019-09-18 09:11:32 -07:00
Tao Xu
cc61af3c3d Add iOS test app skeleton (#26261)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26261

### Summary

Previously we have enabled the CI jobs for Pull Requests and nightly build

-  **#25840 [iOS][Circle CI] Add PR jobs for iOS builds**
-  **#26074 [IOS][CIRCLE CI] Nightly jobs for iOS builds**

The testing phase is missing in the nightly build process.  Although we are able to generate the build and upload it to the AWS,  there is no way to know whether the binary is valid or not (there could be a linking error). To add the test phase to the process, we need

1. Put a dummy test App in the repo.
2. After the build jobs finishes, manually link the static libs to the dummy app to produce an executable using the xcode tool chain.
3. If there is no linking error, then upload the binaris to AWS. If there is an error, then stops the following process and reports an error in CI.

The second and third steps depends on the first step which needs to be landed first.

### Test Plan
- Don't break any existing CI jobs

Test Plan: Imported from OSS

Differential Revision: D17408929

Pulled By: xta0

fbshipit-source-id: e391da242639943005453d1318795f981034cc72
2019-09-17 11:06:57 -07:00
Tao Xu
3051e36e05 Remove armv7s build from iOS (#26222)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26222

### Summary

The last generation of armv7s device is Phone 5C. As discussed with David offline, we decided not to support iOS armv7s devices.

### Test plan

- CI finishes successfully
- Builds can be run only on X86_64 and arm64 devices

Test Plan: Imported from OSS

Differential Revision: D17385308

Pulled By: xta0

fbshipit-source-id: f883999aed18224ea3386b1f016964a33270fa34
2019-09-14 11:07:37 -07:00
Tao Xu
b5a3a8b427 Change the source link in podspec (#26089)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26089

### Summary

A couple of changes

1. Replace the source link with the newly nightly build address
2. Remove module support for Swift and Objective-C
3. Expose all static libraries instead of archiving them into one single library. This is because those static libraries might contain object files that have the same name, e.g. `init.c.o` in both `libcupinfo.a` and `libqnnpack.a`. If we archive them into one using this `libtool -static` command, by default, it only picks one object file and discards the others, which could result in undefined symbols when linking the executable. The change here is to expose all the static libraries and let the linker decide which one to use.

### Test Plan

- pod spec lint succeed
 - `pod spec lint --verbose --allow-warnings --no-clean --use-libraries --skip-import-validation`

Test Plan: Imported from OSS

Differential Revision: D17363037

Pulled By: xta0

fbshipit-source-id: ba77b0001b58e6e2353d8379d932db598166d37d
2019-09-13 15:00:31 -07:00
Tao Xu
115494b00b Cocoapods for iOS OSS release (#25847)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/25847

### Summary

The Podspec file for iOS OSS release. This podspec contains the C++ header files and a static library that supports three architectures.

Please ignore the link for `s.source` for now, as I'm still working on the CI nightly build. This is a temporary link for testing purpose.

### Note

Previously I have a cocoapods release proposal  -  https://github.com/pytorch/pytorch/pull/25543 which contains two podspec files. However, for the time being, we haven't decided whether we want to release the Objective-C API wrapper or not. Please review and refer to this one if you have questions.

Test Plan: Imported from OSS

Differential Revision: D17262459

Pulled By: xta0

fbshipit-source-id: 4cc60787a41beab14cf9b1c0e9ab62b8b14603c5
2019-09-09 14:50:03 -07:00