mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-28 03:20:58 +00:00
Add iOS build instruction (#5125)
* ios build instruction * fix logger issue in onnx_model_info * Revert "fix logger issue in onnx_model_info" This reverts commit 72f2b88256ccf29c75fefbcd1daf6b4dcf7e0c61. * Address comments and fix small issue in iOS build
This commit is contained in:
parent
7511021e0e
commit
698eccf15e
2 changed files with 42 additions and 1 deletions
35
BUILD.md
35
BUILD.md
|
|
@ -32,6 +32,7 @@
|
|||
* [x86](#x86)
|
||||
* [ARM](#ARM)
|
||||
* [Android](#Android)
|
||||
* [iOS](#iOS)
|
||||
|
||||
**[Training](#Training)**
|
||||
|
||||
|
|
@ -1036,6 +1037,40 @@ Android NNAPI Execution Provider can be built using building commands in [Androi
|
|||
|
||||
---
|
||||
|
||||
### iOS
|
||||
|
||||
#### Prerequisites
|
||||
* A Mac computer with latest macOS
|
||||
* Xcode, https://developer.apple.com/xcode/
|
||||
* CMake, https://cmake.org/download/
|
||||
* Python 3, https://www.python.org/downloads/mac-osx/
|
||||
|
||||
#### General Info:
|
||||
* iOS Platforms
|
||||
|
||||
The following two platforms are supported
|
||||
* iOS device (iPhone, iPad) with arm64 architecture
|
||||
* iOS simulator with x86_64 architecture
|
||||
|
||||
armv7, armv7s and i386 architectures are not currently supported.
|
||||
* apple_deploy_target
|
||||
|
||||
Specify the minimum version of the target platform (iOS) on which the target binaries are to be deployed.
|
||||
|
||||
#### Build Instructions
|
||||
Run one of the following build scripts from the ONNX Runtime repository root,
|
||||
##### Cross build for iOS device
|
||||
```
|
||||
/build.sh --config <Release|Debug|RelWithDebInfo|MinSizeRel> --use_xcode \
|
||||
--ios --ios_sysroot iphoneos --osx_arch arm64 --apple_deploy_target 12
|
||||
```
|
||||
##### Cross build for iOS simulator
|
||||
```
|
||||
/build.sh --config <Release|Debug|RelWithDebInfo|MinSizeRel> --use_xcode \
|
||||
--ios --ios_sysroot iphonesimulator --osx_arch x86_64 --apple_deploy_target 12
|
||||
```
|
||||
---
|
||||
|
||||
### AMD MIGraphX
|
||||
|
||||
See more information on the MIGraphX Execution Provider [here](./docs/execution_providers/MIGraphX-ExecutionProvider.md).
|
||||
|
|
|
|||
|
|
@ -14,7 +14,13 @@ endif()
|
|||
# Support OS X versions 10.12+
|
||||
# This variable is ignored on non-Apple platforms and needs to be set prior to the first project(...) invocation
|
||||
# TODO: Make the miniumum deployment target MacOSX version configurable
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment version for ORT" FORCE)
|
||||
# If the CMAKE_OSX_DEPLOYMENT_TARGET was set (currently valid only for iOS build),
|
||||
# we will cache its value instead of the default "10.12"
|
||||
if (NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment version for ORT" FORCE)
|
||||
else()
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET ${CMAKE_OSX_DEPLOYMENT_TARGET} CACHE STRING "Minimum OS X deployment version for ORT" FORCE)
|
||||
endif()
|
||||
|
||||
# Project
|
||||
project(onnxruntime C CXX)
|
||||
|
|
|
|||
Loading…
Reference in a new issue