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

Build optimized operators lib with -fexceptions #7546

Draft
wants to merge 11 commits into
base: gh/swolchok/124/base
Choose a base branch
from

Conversation

swolchok
Copy link
Contributor

@swolchok swolchok commented Jan 7, 2025

Stack from ghstack (oldest at bottom):

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

Differential Revision: D67904052

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Jan 7, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure, 2 Cancelled Jobs

As of commit 3e3a3e9 with merge base e1c0bcf (image):

NEW FAILURE - The following job has failed:

  • trunk / test-coreml-delegate / macos-job (gh)
    /Users/runner/work/executorch/executorch/pytorch/executorch/examples/apple/coreml/executor_runner/include/executorch/runtime/core/portable_type/bfloat16.h:11:10: error: 'c10/util/BFloat16.h' file not found with <angled> include; use "quotes" instead

CANCELLED JOBS - The following jobs were cancelled. Please retry:

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 7, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67904052

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Jan 7, 2025
Pull Request resolved: #7546

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

ghstack-source-id: 260556841
@exported-using-ghexport

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67904052

@swolchok swolchok added the release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc. label Jan 7, 2025
@swolchok swolchok marked this pull request as draft January 7, 2025 22:28
@swolchok
Copy link
Contributor Author

swolchok commented Jan 7, 2025

converting to draft to prevent accidental merge until the PR is updated to include a proper PyTorch pin bump; right now it points directly at pytorch/pytorch#144341 . It will still be reviewable whenever I get CI fixed


message(STATUS "Generating operator lib:")
message(STATUS " LIB_NAME: ${GEN_LIB_NAME}")
message(STATUS " OPS_SCHEMA_YAML: ${GEN_OPS_SCHEMA_YAML}")
message(STATUS " ROOT_OPS: ${GEN_ROOT_OPS}")
message(STATUS " INCLUDE_ALL_OPS: ${GEN_INCLUDE_ALL_OPS}")
message(STATUS " ADD_EXCEPTION_BOUNDARY: ${GEN_ADD_EXCEPTION_BOUNDARTY}")
Copy link
Contributor

@huydhn huydhn Jan 8, 2025

Choose a reason for hiding this comment

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

Small typo

Suggested change
message(STATUS " ADD_EXCEPTION_BOUNDARY: ${GEN_ADD_EXCEPTION_BOUNDARTY}")
message(STATUS " ADD_EXCEPTION_BOUNDARY: ${GEN_ADD_EXCEPTION_BOUNDARY}")

)
)
if(GEN_ADD_EXCEPTION_BOUNDARY)
set(_gen_command "${_gen_command} --add-exception-boundary")
Copy link
Contributor

@huydhn huydhn Jan 8, 2025

Choose a reason for hiding this comment

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

I think the set command use semi-colon separator instead of space, i.e. /opt/conda/envs/py_3.10/bin/python3;-m;torchgen.gen_executorch;--source-path=/pytorch/executorch/configurations/../codegen;--install-dir=/pytorch/executorch/pip-out/temp.linux-x86_64-cpython-310/cmake-out/configurations/optimized_native_cpu_ops_lib;--tags-path=/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torchgen/packaged/ATen/native/tags.yaml;--aten-yaml-path=/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torchgen/packaged/ATen/native/native_functions.yaml;--op-selection-yaml-path=/pytorch/executorch/pip-out/temp.linux-x86_64-cpython-310/cmake-out/configurations/optimized_native_cpu_ops_lib/selected_operators.yaml;--add-exception-boundary

The failure is complaining about a wrong filename https://github.com/pytorch/executorch/actions/runs/12660296601/job/35287265644#step:14:1992

Suggested change
set(_gen_command "${_gen_command} --add-exception-boundary")
set(_gen_command "${_gen_command}" --add-exception-boundary)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

strange, I thought I built this locally. Giving it a shot now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this does seem to have improved the situation (thanks!) but the torchgen version still seems to be wrong: https://github.com/pytorch/executorch/actions/runs/12680876952/job/35343491373?pr=7546#step:9:2186

Copy link
Contributor Author

@swolchok swolchok Jan 9, 2025

Choose a reason for hiding this comment

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

@huydhn still seeing at least some wrong-torchgen-version failures:

however, we do have mac successes. looking into the common thread for these failures now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the ARM one is easy: the workflow directly invokes install_executorch from .ci/scripts/utils.sh without "use-pt-pinned-commit". Is there a reason "use-pt-pinned-commit" isn't the default or only option?

test-llava-runner-linux reruns install_requirements.sh and doesn't pass --use-pt-pinned-commit, same with test-phi-3-mini-runner, test-eval_llama-wikitext-linux, test-eval_llama-mmlu-linux, and test-llama_runner_eager-linux. I will send a PR to fix those.

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67904052

swolchok added a commit that referenced this pull request Jan 8, 2025
Pull Request resolved: #7546

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

ghstack-source-id: 260686358
@exported-using-ghexport

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)
It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)

[ghstack-poisoned]
swolchok added a commit that referenced this pull request Jan 9, 2025
Pull Request resolved: #7546

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

ghstack-source-id: 260777714
@exported-using-ghexport

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67904052

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67904052

swolchok added a commit that referenced this pull request Jan 9, 2025
Pull Request resolved: #7546

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

ghstack-source-id: 260814512
@exported-using-ghexport

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)
swolchok added a commit that referenced this pull request Jan 9, 2025
Without this, these builds don't respect the torchgen pinned commit and thus fail with #7546.

Differential Revision: [D67996459](https://our.internmc.facebook.com/intern/diff/D67996459/)

[ghstack-poisoned]
It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67904052

swolchok added a commit that referenced this pull request Jan 9, 2025
Pull Request resolved: #7546

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

ghstack-source-id: 260826290
@exported-using-ghexport

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)
It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)

[ghstack-poisoned]
swolchok pushed a commit that referenced this pull request Jan 10, 2025
…,reference}-delegation"

Without this, these builds don't respect the torchgen pinned commit and thus fail with #7546.

Differential Revision: [D67996459](https://our.internmc.facebook.com/intern/diff/D67996459/)

[ghstack-poisoned]
swolchok pushed a commit that referenced this pull request Jan 10, 2025
…gation"

Without this, these builds don't respect the torchgen pinned commit and thus fail with #7546.

Differential Revision: [D67996459](https://our.internmc.facebook.com/intern/diff/D67996459/)

[ghstack-poisoned]
swolchok pushed a commit that referenced this pull request Jan 10, 2025
Pull Request resolved: #7546

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

ghstack-source-id: 260914248
@exported-using-ghexport

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67904052

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)

[ghstack-poisoned]
swolchok pushed a commit that referenced this pull request Jan 10, 2025
…,reference}-delegation"

Without this, these builds don't respect the torchgen pinned commit and thus fail with #7546.

Differential Revision: [D67996459](https://our.internmc.facebook.com/intern/diff/D67996459/)

[ghstack-poisoned]
swolchok pushed a commit that referenced this pull request Jan 10, 2025
…gation"

Without this, these builds don't respect the torchgen pinned commit and thus fail with #7546.

Differential Revision: [D67996459](https://our.internmc.facebook.com/intern/diff/D67996459/)

[ghstack-poisoned]
swolchok pushed a commit that referenced this pull request Jan 10, 2025
Pull Request resolved: #7546

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

ghstack-source-id: 260917860
@exported-using-ghexport

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67904052

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67904052

swolchok pushed a commit that referenced this pull request Jan 10, 2025
…,reference}-delegation"

Without this, these builds don't respect the torchgen pinned commit and thus fail with #7546.

Differential Revision: [D67996459](https://our.internmc.facebook.com/intern/diff/D67996459/)

[ghstack-poisoned]
swolchok pushed a commit that referenced this pull request Jan 10, 2025
…gation"

Without this, these builds don't respect the torchgen pinned commit and thus fail with #7546.

Differential Revision: [D67996459](https://our.internmc.facebook.com/intern/diff/D67996459/)

[ghstack-poisoned]
swolchok pushed a commit that referenced this pull request Jan 10, 2025
Pull Request resolved: #7546

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

ghstack-source-id: 260930165
@exported-using-ghexport

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)
It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)

[ghstack-poisoned]
swolchok pushed a commit that referenced this pull request Jan 10, 2025
…,reference}-delegation"

Without this, these builds don't respect the torchgen pinned commit and thus fail with #7546.

Differential Revision: [D67996459](https://our.internmc.facebook.com/intern/diff/D67996459/)

[ghstack-poisoned]
swolchok pushed a commit that referenced this pull request Jan 10, 2025
…gation"

Without this, these builds don't respect the torchgen pinned commit and thus fail with #7546.

Differential Revision: [D67996459](https://our.internmc.facebook.com/intern/diff/D67996459/)

[ghstack-poisoned]
swolchok pushed a commit that referenced this pull request Jan 10, 2025
Pull Request resolved: #7546

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

ghstack-source-id: 260935342
@exported-using-ghexport

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67904052

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)

[ghstack-poisoned]
swolchok pushed a commit that referenced this pull request Jan 11, 2025
…,reference}-delegation"

Without this, these builds don't respect the torchgen pinned commit and thus fail with #7546.

Differential Revision: [D67996459](https://our.internmc.facebook.com/intern/diff/D67996459/)

[ghstack-poisoned]
swolchok pushed a commit that referenced this pull request Jan 11, 2025
…gation"

Without this, these builds don't respect the torchgen pinned commit and thus fail with #7546.

Differential Revision: [D67996459](https://our.internmc.facebook.com/intern/diff/D67996459/)

[ghstack-poisoned]
swolchok pushed a commit that referenced this pull request Jan 11, 2025
Pull Request resolved: #7546

It should be permissible for this library to use exceptions, since it is not required to supported embedded systems.

TODO: presumably we need to manage rollout of the torchgen patch?

ghstack-source-id: 260988789
@exported-using-ghexport

Differential Revision: [D67904052](https://our.internmc.facebook.com/intern/diff/D67904052/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67904052

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. fb-exported 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