-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[iOS] Change the source link in podspec #26089
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
Changes from all commits
3a4b3fa
ca6cc05
52ecec1
13417e3
83cf671
979c4b6
f64c13a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,6 @@ | ||
| #ifndef LibTorch_h | ||
| #define LibTorch_h | ||
|
|
||
| #include <torch/script.h> | ||
|
|
||
| #if TARGET_OS_IPHONE | ||
| #define AT_NNPACK_ENABLED() 1 | ||
| #define USE_NNPACK ON | ||
| #undef CAFFE2_PERF_WITH_AVX512 | ||
| #endif |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,24 +1,24 @@ | ||||||
| Pod::Spec.new do |s| | ||||||
| s.name = 'LibTorch' | ||||||
| s.version = '0.0.1' | ||||||
| s.version = '0.0.2' | ||||||
| s.authors = 'PyTorch Team' | ||||||
| s.license = { :type => 'BSD' } | ||||||
| s.homepage = 'https://github.com/pytorch/pytorch' | ||||||
| s.source = { :http => 'http://ossci-macos.s3.amazonaws.com/libtorch_x86_arm64.zip' } | ||||||
| s.source = { :http => 'https://ossci-ios-build.s3.amazonaws.com/libtorch_ios_nightly_build.zip' } | ||||||
| s.summary = 'The PyTorch C++ library for iOS' | ||||||
| s.description = <<-DESC | ||||||
| The PyTorch C++ library for iOS. | ||||||
| DESC | ||||||
| s.default_subspec = 'Core' | ||||||
| s.subspec 'Core' do |ss| | ||||||
| ss.dependency 'LibTorch/Torch' | ||||||
| ss.source_files = 'src/*.{h,cpp,cc}' | ||||||
| ss.source_files = 'src/*.{h,cpp,c,cc}' | ||||||
| ss.public_header_files = ['src/LibTorch.h'] | ||||||
| end | ||||||
| s.subspec 'Torch' do |ss| | ||||||
| ss.header_mappings_dir = 'install/include/' | ||||||
| ss.preserve_paths = 'install/include/**/*.{h,cpp,cc,c}' | ||||||
| ss.vendored_libraries = 'install/lib/libtorch.a' | ||||||
| ss.vendored_libraries = 'install/lib/*.a' | ||||||
| ss.libraries = ['c++', 'stdc++'] | ||||||
| end | ||||||
| s.user_target_xcconfig = { | ||||||
|
|
@@ -27,8 +27,9 @@ Pod::Spec.new do |s| | |||||
| 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++11', | ||||||
| 'CLANG_CXX_LIBRARY' => 'libc++' | ||||||
| } | ||||||
| s.pod_target_xcconfig = { 'VALID_ARCHS' => 'x86_64 armv7s arm64' } | ||||||
| s.module_name='LibTorch' | ||||||
| s.module_map = 'src/framework.modulemap' | ||||||
| s.pod_target_xcconfig = { | ||||||
| 'HEADER_SEARCH_PATHS' => '$(inherited) "$(PODS_ROOT)/LibTorch/install/include/"', | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: May like to reuse
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, actually this won't work, Cocoapods won't inline this |
||||||
| 'VALID_ARCHS' => 'x86_64 armv7s arm64' | ||||||
| } | ||||||
| s.library = ['c++', 'stdc++'] | ||||||
| end | ||||||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qq: Curious if it's needed to introduce subspecs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically, just to modulelize the code, keep the C++ libraries as a seperate podspec. If people just want to use the raw C++ API, they could say
pod Libtorch/Torch