Skip to content

install_requirements.py: use argparse, minor cleanup #7703

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

Merged
merged 5 commits into from
Jan 17, 2025

Conversation

swolchok
Copy link
Contributor

Replace the bespoke argument parser with argparse in preparation for separating requirements installation from building and installing ExecuTorch itself.

Test Plan: (with debug print of args.pybind to save time)
install_requirements.sh --pybind xnnpack --pybind mps --pybind coreml
install_requirements.sh --pybind xnnpack mps coreml
install_requirements.sh --clean

CI should cover use-pt-pinned-commit

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Jan 16, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/7703

Note: Links to docs will display an error until the docs builds have been completed.

⏳ No Failures, 1 Pending

As of commit 1d4dfab with merge base 1b7b10e (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 16, 2025
Copy link
Contributor

@mergennachin mergennachin left a comment

Choose a reason for hiding this comment

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

See inline

elif arg == "--use-pt-pinned-commit":
for pybind_arg in args.pybind:
if pybind_arg not in ["coreml", "mps", "xnnpack"]:
continue
Copy link
Contributor

Choose a reason for hiding this comment

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

raise exception here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whoops! I misinterpreted the original code after I'd made some modifications to it. will fix.

EXECUTORCH_BUILD_PYBIND = "ON"
CMAKE_ARGS += f" -DEXECUTORCH_BUILD_{pybind_arg.upper()}=ON"

if args.clean:
Copy link
Contributor

Choose a reason for hiding this comment

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

do this if statement first?

@swolchok swolchok added the release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc. label Jan 16, 2025
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@swolchok swolchok merged commit 007ea3e into main Jan 17, 2025
9 checks passed
@swolchok swolchok deleted the gh/swolchok/134/head branch January 17, 2025 00:37
digantdesai pushed a commit that referenced this pull request Jan 17, 2025
Replace the bespoke argument parser with argparse in preparation for separating requirements installation from building and installing ExecuTorch itself.
huydhn added a commit that referenced this pull request Jan 24, 2025
YIWENX14 pushed a commit that referenced this pull request Jan 28, 2025
Replace the bespoke argument parser with argparse in preparation for separating requirements installation from building and installing ExecuTorch itself.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants