-
Notifications
You must be signed in to change notification settings - Fork 22.1k
-
Notifications
You must be signed in to change notification settings - Fork 22.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Libtorch iOS Build can't be used in unit test target #32040
Comments
@mjjimenez As discussed in the forum, this is a known issue, as NNPACK doesn’t support the iOS simulator architecture - https://github.com/Maratyszcza/NNPACK. We've actively working on enabling XNNPACK which will replace NNPACK in the future. |
@xta0 What is the ETA on the fix? The lack of simulator is a blocker for our production team's ability to go next-stage with PyTorch. We have opened discussions to use TensorFlow instead as a result of this blocker, but PyTorch would have been preferred by some elements in our development pipeline. If you can estimate a time range for when the issue will be resolved: We can create a plan around that as to go with PyTorch instead of TensorFlow. |
Hey we've already enabled the XNNPACK for our mobile build. The official cocoapods (1.6.0) release will be in July. |
### Summary why disable NNPACK on iOS - To stay consistency with our internal version - It's currently blocking some external users due to its lack support of x86 architecture - #32040 - https://discuss.pytorch.org/t/undefined-symbols-for-architecture-x86-64-for-libtorch-in-swift-unit-test/84552/6 - NNPACK uses fast convolution algorithms (FFT, winograd) to reduce the computational complexity of convolutions with large kernel size. The algorithmic speedup is limited to specific conv params which are unlikely to appear in mobile networks. - Since XNNPACK has been enabled, it performs much better than NNPACK on depthwise-separable convolutions which is the algorithm being used by most of mobile computer vision networks. ### Test Plan - CI Checks [ghstack-poisoned]
### Summary why disable NNPACK on iOS - To stay consistency with our internal version - It's currently blocking some external users due to its lack support of x86 architecture - #32040 - https://discuss.pytorch.org/t/undefined-symbols-for-architecture-x86-64-for-libtorch-in-swift-unit-test/84552/6 - NNPACK uses fast convolution algorithms (FFT, winograd) to reduce the computational complexity of convolutions with large kernel size. The algorithmic speedup is limited to specific conv params which are unlikely to appear in mobile networks. - Since XNNPACK has been enabled, it performs much better than NNPACK on depthwise-separable convolutions which is the algorithm being used by most of mobile computer vision networks. ### Test Plan - CI Checks [ghstack-poisoned]
Summary: Pull Request resolved: #39868 ### Summary why disable NNPACK on iOS - To stay consistency with our internal version - It's currently blocking some external users due to its lack support of x86 architecture - #32040 - https://discuss.pytorch.org/t/undefined-symbols-for-architecture-x86-64-for-libtorch-in-swift-unit-test/84552/6 - NNPACK uses fast convolution algorithms (FFT, winograd) to reduce the computational complexity of convolutions with large kernel size. The algorithmic speedup is limited to specific conv params which are unlikely to appear in mobile networks. - Since XNNPACK has been enabled, it performs much better than NNPACK on depthwise-separable convolutions which is the algorithm being used by most of mobile computer vision networks. ### Test Plan - CI Checks Test Plan: Imported from OSS Differential Revision: D22087365 Pulled By: xta0 fbshipit-source-id: 89a959b0736c1f8703eff10723a8fbd02357fd4a
Summary: Pull Request resolved: pytorch#39868 ### Summary why disable NNPACK on iOS - To stay consistency with our internal version - It's currently blocking some external users due to its lack support of x86 architecture - pytorch#32040 - https://discuss.pytorch.org/t/undefined-symbols-for-architecture-x86-64-for-libtorch-in-swift-unit-test/84552/6 - NNPACK uses fast convolution algorithms (FFT, winograd) to reduce the computational complexity of convolutions with large kernel size. The algorithmic speedup is limited to specific conv params which are unlikely to appear in mobile networks. - Since XNNPACK has been enabled, it performs much better than NNPACK on depthwise-separable convolutions which is the algorithm being used by most of mobile computer vision networks. ### Test Plan - CI Checks Test Plan: Imported from OSS Differential Revision: D22087365 Pulled By: xta0 fbshipit-source-id: 89a959b0736c1f8703eff10723a8fbd02357fd4a
🐛 Bug
The current build for libtorch for iOS installed using cocoapods can't be included in a unit test target.
I've filed a cocoapods issue on this and they discovered that
libnnpack.a
is not a universal library,causing the build error.
CocoaPods/CocoaPods#9473
To Reproduce
Steps to reproduce the behavior:
I just cloned your demo app here https://github.com/pytorch/ios-demo-app and added a unit test target to the HelloWorld demo.
I forked the repo and added the unit test target here:
https://github.com/mjjimenez/ios-demo-app
Expected behavior
Environment
Podfile
The text was updated successfully, but these errors were encountered: