Skip to content
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

[Objective-C API] Add script to assemble pod package files. #7958

Merged
merged 2 commits into from
Jun 8, 2021

Conversation

edgchen1
Copy link
Contributor

@edgchen1 edgchen1 commented Jun 5, 2021

Description
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.

Motivation and Context
Automate Objective-C API package creation.

@edgchen1 edgchen1 requested a review from a team as a code owner June 5, 2021 01:38
"${OBJC_ROOT}/include/ort_value.h"
)
file(GLOB onnxruntime_objc_headers CONFIGURE_DEPENDS
"${OBJC_ROOT}/include/*.h")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now that we have to specify this in two places, it's less maintenance to just match everything in the include directory

podspec_template = _script_dir / "onnxruntime-mobile-objc.podspec.template"
podspec = staging_dir / "onnxruntime-mobile-objc.podspec"
gen_file_from_template(podspec_template, podspec, variable_substitutions)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, do you want to create the zip archive here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think zipping and uploading would happen at a later point, after testing the package. Once we have this staging directory, we can run pod lib lint in it to test it.

s.default_subspec = "Core"

s.subspec "Core" do |core|
core.dependency "onnxruntime-mobile-c", "#{s.version}"
Copy link
Contributor

@guoyu-wang guoyu-wang Jun 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this depends on the same version number, maybe you can extract that out of the VERSION_NUMBER file, instead of supply it as a param to the script?
Not sure how it works at our current setup, ort-mobile-c ~> 1.8.0 ort-mobile-objc ~> 1.8.0-experimental

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what the best approach is yet - getting it from VERSION_NUMBER would only work for release versions right? But I think most of the time the versions of the C/C++ and Objective-C pods should be the same. Will go with this for now.

@edgchen1 edgchen1 merged commit 0696e2f into master Jun 8, 2021
@edgchen1 edgchen1 deleted the edgchen1/objc_pod_packaging branch June 8, 2021 02:16
edgchen1 added a commit that referenced this pull request Jun 30, 2021
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.
harshithapv pushed a commit that referenced this pull request Jun 30, 2021
* [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.
harshithapv added a commit that referenced this pull request Jun 30, 2021
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants