Skip to content

Use "pybind" preset when building a wheel #10951

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 1 commit into from
May 20, 2025
Merged

Conversation

jathu
Copy link
Contributor

@jathu jathu commented May 16, 2025

Summary

Now that we have presets for pybind, lets use that and eliminate the need to set cmake configurations in setup.py. Moreover, we now stop relying on defaults and fully rely on the cmake configurations. This includes relying on CMakeCache.txt to determine what features are enabled to determine what extensions to copy.

Test plan

CI +

$ rm -rf pip-out && python setup.py bdist_wheel
$ rm -rf pip-out && ./install_executorch.sh

cc @larryliu0820

@jathu jathu added module: build/install Issues related to the cmake and buck2 builds, and to installing ExecuTorch ciflow/trunk ciflow/binaries release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc. labels May 16, 2025
Copy link

pytorch-bot bot commented May 16, 2025

🔗 Helpful Links

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

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

⏳ No Failures, 2 Pending

As of commit b9434fa with merge base 9c1186f (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 May 16, 2025
@jathu jathu force-pushed the jathu/use-pybind-preset branch 24 times, most recently from 05c5365 to 48acde6 Compare May 17, 2025 19:01
@jathu jathu force-pushed the jathu/use-pybind-preset branch 15 times, most recently from 174fab9 to 98a3cdf Compare May 20, 2025 02:04
@jathu jathu force-pushed the jathu/use-pybind-preset branch from 98a3cdf to b9434fa Compare May 20, 2025 16:37
@jathu jathu marked this pull request as ready for review May 20, 2025 17:31
Copy link
Contributor

@larryliu0820 larryliu0820 left a comment

Choose a reason for hiding this comment

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

Thank you for making CMake much cleaner

export CMAKE_BUILD_ARGS="--target openvino_backend"

# Build the package
pip install . --no-build-isolation
./install_executorch.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

ah so good

Comment on lines +693 to +703
subprocess.run(
[
"cmake",
*cmake_configuration_args,
"--preset",
"pybind",
"-B",
cmake_cache_dir,
],
check=True,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Much better!

@jathu jathu merged commit 7d532ce into main May 20, 2025
289 of 291 checks passed
@jathu jathu deleted the jathu/use-pybind-preset branch May 20, 2025 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/binaries ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: build/install Issues related to the cmake and buck2 builds, and to installing ExecuTorch 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.

4 participants