mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Summary: Context: https://github.com/pytorch/pytorch/pull/53299#discussion_r587882857 These are the only hand-written parts of this diff: - the addition to `.github/workflows/lint.yml` - the file endings changed in these four files (to appease FB-internal land-blocking lints): - `GLOSSARY.md` - `aten/src/ATen/core/op_registration/README.md` - `scripts/README.md` - `torch/csrc/jit/codegen/fuser/README.md` The rest was generated by running this command (on macOS): ``` git grep -I -l ' $' -- . ':(exclude)**/contrib/**' ':(exclude)third_party' | xargs gsed -i 's/ *$//' ``` I looked over the auto-generated changes and didn't see anything that looked problematic. Pull Request resolved: https://github.com/pytorch/pytorch/pull/53406 Test Plan: This run (after adding the lint but before removing existing trailing spaces) failed: - https://github.com/pytorch/pytorch/runs/2043032377 This run (on the tip of this PR) succeeded: - https://github.com/pytorch/pytorch/runs/2043296348 Reviewed By: walterddr, seemethere Differential Revision: D26856620 Pulled By: samestep fbshipit-source-id: 3f0de7f7c2e4b0f1c089eac9b5085a58dd7e0d97
PyTorch for iOS
Cocoapods Developers
PyTorch is now available via Cocoapods, to integrate it to your project, simply add the following line to your Podfile
and run pod install
pod 'LibTorch'
Import the library
For Objective-C developers, simply import the umbrella header
#import <LibTorch/LibTorch.h>
For Swift developers, you need to create an Objective-C class as a bridge to call the C++ APIs. We highly recommend you to follow the Image Classification demo where you can find out how C++, Objective-C and Swift work together.
Disable Bitcode
Since PyTorch is not yet built with bitcode support, you need to disable bitcode for your target by selecting the Build Settings, searching for Enable Bitcode and set the value to No.
LICENSE
PyTorch is BSD-style licensed, as found in the LICENSE file.