Replies: 1 comment
-
It's probably beneficial for us, core developers, to optimize the building process. And we should keep in mind that ideally most of the customers rarely need to build anything, if at all. E.g. most of the Apple devs never used or even heard of Cmake in their career, so no matter how easy it is for them to build ET runtime locally, it's still an extra effort. That why on Apple platforms we provide Swift PM binary packages built nightly that devs can just add to their project in a few clicks in Xcode and never care how exactly those are built - with Cmake, Buck or any sort of custom scripts. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is a public version of an internal doc proposing “build presets” for ExecuTorch.
Problem
Goal
Proposal
ExecuTorch builds will be configured with two options:
The build preset file will be a cmake file that conforms to a known API to set build configurations. Example for targeting macos-arm64:
The default preset options will be centrally configured, thus they are validated and ensure valid inter-dependencies:
Types of presets and available targets
Given build presets are just a set of configurations, they can be scoped and packaged arbitrarily. For example, these scopes can be based on:
We propose to go with application presets, and platform presets that compose the application presets. This will provide us the most flexibility, and ability to consolidate in the future if needed.
Building with CLI
By leveraging cmake-presets, we can achieve a minimal consistent build step:
Building as a 3rd party library
Including ExecuTorch should automatically determine the preset for well known platforms, otherwise fallback to the default:
add_subdirectory(executorch)
Preset options can be overridden:
Presets can be explicitly set:
Presets can be extended for custom presets:
Building in CI
By eliminating the bespoke build scripts, CI builds should only use the presets.
Extendability
The presets will be designed with an API that will allow for composability, and encourage developers to create their own bespoke presets. Let’s walk through some examples:
FAQ
Beta Was this translation helpful? Give feedback.
All reactions