Skip to content

Revamp iOS documentations #7903

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

Closed
mergennachin opened this issue Jan 23, 2025 · 3 comments
Closed

Revamp iOS documentations #7903

mergennachin opened this issue Jan 23, 2025 · 3 comments
Assignees
Labels
module: doc Issues related to documentation, both in docs/ and inlined in code module: ios Issues related to iOS code, build, and execution module: user experience Issues related to reducing friction for users triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Milestone

Comments

@mergennachin
Copy link
Contributor

mergennachin commented Jan 23, 2025

📚 The doc issue

Currently there are a few different places for iOS that we wrote over the lifecycle of ExecuTorch development phase (MVP, alpha, beta etc) with different purposes. Some were to showcase functionality (e.g., MV3 and Llama can actually run iOS device), some were to showcase delegate capabilities (XNNPACK, CoreML, MPS integration)... It's time to step back and see from a developer's perspective, and make sure the sum of all the parts make sense and coherent.


User journey:

Here's a typical developer user journey from an engineer who's just looking at ExecuTorch for the first time. Their ultimate goal is to build an AI powered iOS app which is performant enough.

  • Let's assume modeling is done by different researchers, but still have relatively close, constant communication

Part 1:

  • Set up
    -- Clone executorch repo and do minimal setup/installation (./install_executorch.sh --pybind coreml xnnpack)
    -- Ideally should just be able to do pip install executorch in the near future.
  • Get a model from somewhere
    -- Download from HuggingFace
    -- Or existing example models e.g., MV3 and Llama3
  • Export a model (use XNNPACK as default)
    -- Either export file
    -- Download existing pte file from somewhere like HuggingFace
  • Run the model desktop in python via pybind

Part 2:

  • Build and run an app. Use swift prebuilts. Not compiling from source
    -- Build and run custom app out-of-source tree.
    -- Use existing demo apps (MV3 and Llama3/Llava) as an example usage
  • Further optimizations (CoreML and MPS)

Suggest a potential alternative/fix

No response

cc @byjlw @shoumikhin

@bluejack
Copy link

Can confirm. Note that while building from stable release is surely going to be best advice, and you take your lumps when building from the head of the repo, the current instructions don't fully work in several key areas for ios builds when building from current state of the repo:

  1. Instructions that specify ./install_requirements.sh do not build executorch. ./install_executorch.sh is also required.

  2. the ./build/build_apple_frameworks.sh does not appear to work as documented

  3. this recommended guideline does not take a --clean flag. Not sure if that did anything other than rm -rf on cmake-out, but it doesn't do whatever it did.

# Clean cmake cache directory (cmake-out). It's a good practice to do this
# whenever cloning or pulling the upstream repo.
bash install_requirements.sh --clean

@swolchok
Copy link
Contributor

swolchok commented Jan 24, 2025

Instructions that specify ./install_requirements.sh do not build executorch. ./install_executorch.sh is also required.

FYI, docs that are supposed to reflect the current state of the repo are available at https://pytorch.org/executorch/main/ ; you can get there by clicking the chevron next to 0.4 in the left sidebar. Bug reports against the current state will be easier for us to take action on.

@bluejack
Copy link

I did not notice that chevron! Thanks for the tip. (1) && (3) are resolved by this; and (2) was an oddity in my own environment!

Still support a "developer journey" approach to documentation!

@kirklandsign kirklandsign added the module: doc Issues related to documentation, both in docs/ and inlined in code label Jan 27, 2025
@mergennachin mergennachin added the module: user experience Issues related to reducing friction for users label Jan 27, 2025
@github-project-automation github-project-automation bot moved this to To triage in ExecuTorch DevX Jan 27, 2025
@orionr orionr added the module: ios Issues related to iOS code, build, and execution label Jan 30, 2025
@mergennachin mergennachin changed the title [WIP] Revamp iOS documentations Revamp iOS documentations Jan 30, 2025
@mergennachin mergennachin moved this from To triage to Ready in ExecuTorch DevX Jan 31, 2025
@digantdesai digantdesai added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Feb 4, 2025
@mergennachin mergennachin added this to the 0.6.0 milestone Feb 6, 2025
@mergennachin mergennachin moved this from Ready to In progress in ExecuTorch DevX Mar 27, 2025
@mergennachin mergennachin moved this from In progress to Done in ExecuTorch DevX Apr 25, 2025
@mergennachin mergennachin closed this as completed by moving to Done in ExecuTorch DevX Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: doc Issues related to documentation, both in docs/ and inlined in code module: ios Issues related to iOS code, build, and execution module: user experience Issues related to reducing friction for users triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
Status: Done
Development

No branches or pull requests

8 participants