-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-picks for release 1.8.1 - Round3 (#8195)
* Revert the cuda algo finding change as this causes a significant memory bloat. (#8181) * Revert the cuda algo finding change as this causes a significant memory bloat. * Address PR comment * Make pipelines to support torch1.8.1 and torch1.9.0 (#8084) * Add post-install command to build PyTorch CPP extensions from within onnxruntime package (#8027) ORTModule requires two PyTorch CPP extensions that are currently JIT compiled. The runtime compilation can cause issues in some environments without all build requirements or in environments with multiple instances of ORTModule running in parallel This PR creates a custom command to compile such extensions that must be manually executed before ORTModule is executed for the first time. When users try to use ORTModule before the extensions are compiled, an error with instructions are raised PyTorch CPP Extensions for ORTModule can be compiled by running: python -m onnxruntime.training.ortmodule.torch_cpp_extensions.install Full build environment is needed for this * Patch orttraining-ortmodule pipeline with latest fix on master * add cuda version to build config * [rel-1.8.1][Objective-C API] Cherry-pick Objective-C API updates (#8197) * [Objective-C API] Add ORTSession methods to get input, overridable initializer, and output names. (#7837) * [Objective-C API] Fixes from package testing and clean up (#7866) * [Objective-C API] Enable CoreML EP (#7914) Enable CoreML EP in Objective-C API. * [Objective-C API] Add script to assemble pod package files. (#7958) Add a helper script for creating the Objective-C API pod package. It puts the necessary files and generates a podspec in a staging directory. * [Objective-C API] Add support for documentation generation (#7999) Adding support for generating API documentation with the Jazzy tool. It's a manual process now, but we can eventually make it a part of the release pipeline. Co-authored-by: Pranav Sharma <prs@microsoft.com> Co-authored-by: liqunfu <liqfu@microsoft.com> Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com> Co-authored-by: Baiju Meswani <bmeswani@microsoft.com> Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
- Loading branch information
1 parent
2e55002
commit 8d6825b
Showing
80 changed files
with
1,330 additions
and
715 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# ONNX Runtime Objective-C API | ||
|
||
ONNX Runtime provides an Objective-C API. | ||
|
||
It can be used from Objective-C/C++ or Swift with a bridging header. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module: ONNX Runtime Objective-C API | ||
author: ONNX Runtime Authors | ||
author_url: https://www.onnxruntime.ai | ||
github_url: https://github.com/microsoft/onnxruntime | ||
|
||
objc: true | ||
umbrella_header: ../include/onnxruntime.h | ||
framework_root: .. | ||
|
||
readme: ./docs.readme.md | ||
|
||
hide_documentation_coverage: true | ||
undocumented_text: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Objective-C API Documentation | ||
|
||
The API should be documented with comments in the [public header files](../include). | ||
|
||
## Documentation Generation | ||
|
||
The [Jazzy](https://github.com/realm/jazzy) tool is used to generate documentation from the code. | ||
|
||
For example, to generate documentation for a release version, from the repo root, run: | ||
|
||
```bash | ||
jazzy --config objectivec/docs/jazzy_config.yaml --output <output directory> --module-version $(cat VERSION_NUMBER) | ||
``` | ||
|
||
The generated documentation website files will be in `<output directory>`. | ||
|
||
[docs.readme.md](./docs.readme.md) contains content for the main page of the generated documentation website. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
#import "ort_session.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
/** | ||
* Gets whether the CoreML execution provider is available. | ||
*/ | ||
BOOL ORTIsCoreMLExecutionProviderAvailable(void); | ||
|
||
/** | ||
* Options for configuring the CoreML execution provider. | ||
*/ | ||
@interface ORTCoreMLExecutionProviderOptions : NSObject | ||
|
||
/** | ||
* Whether the CoreML execution provider should run on CPU only. | ||
*/ | ||
@property BOOL useCPUOnly; | ||
|
||
/** | ||
* Whether the CoreML execution provider is enabled on subgraphs. | ||
*/ | ||
@property BOOL enableOnSubgraphs; | ||
|
||
/** | ||
* Whether the CoreML execution provider is only enabled for devices with Apple | ||
* Neural Engine (ANE). | ||
*/ | ||
@property BOOL onlyEnableForDevicesWithANE; | ||
|
||
@end | ||
|
||
@interface ORTSessionOptions (ORTSessionOptionsCoreMLEP) | ||
|
||
/** | ||
* Enables the CoreML execution provider in the session configuration options. | ||
* It is appended to the execution provider list which is ordered by | ||
* decreasing priority. | ||
* | ||
* @param options The CoreML execution provider configuration options. | ||
* @param error Optional error information set if an error occurs. | ||
* @return Whether the provider was enabled successfully. | ||
*/ | ||
- (BOOL)appendCoreMLExecutionProviderWithOptions:(ORTCoreMLExecutionProviderOptions*)options | ||
error:(NSError**)error; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.