-
Notifications
You must be signed in to change notification settings - Fork 560
Simplify runtime FunctionRef #555
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for resplendent-gnome-14e531 canceled.
|
This pull request was exported from Phabricator. Differential Revision: D49798748 |
This pull request was exported from Phabricator. Differential Revision: D49798748 |
41ba5ce
to
9ebc771
Compare
Summary: Now there are two FunctionRef classes, (A) torch::executor::pytree::FunctionRef in executorch/extension/pytree/function_ref.h (B) torch::executor::FunctionRef in executor/runtime/core/function_ref.h Rationale: - version (B) compared to (A) will have features going fwd, and we are planning to eventually delete it completely Differential Revision: https://internalfb.com/D49780124 fbshipit-source-id: 143a984140d4a95980e63e11bd16561f9ae9d46f
Summary: Pull Request resolved: pytorch/executorch#555 FunctionRef simplified - removing lambdas in constructor initializer list, to ensure runtime portability for embedded systems w/ C++11. Reviewed By: dbort Differential Revision: D49798748 fbshipit-source-id: 03f1669adaf0150de06b8c89229ba63be674ab91
This pull request was exported from Phabricator. Differential Revision: D49798748 |
9ebc771
to
ebfcf0f
Compare
This pull request has been merged in 7642538. |
tarun292
pushed a commit
that referenced
this pull request
Oct 5, 2023
Summary: Pull Request resolved: #555 FunctionRef simplified - removing lambdas in constructor initializer list, to ensure runtime portability for embedded systems w/ C++11. Reviewed By: dbort Differential Revision: D49798748 fbshipit-source-id: 4c9e46603ebbddeb71fc78f43de6b3e149285738
swolchok
added a commit
that referenced
this pull request
Apr 25, 2025
…ore (#10441) I just re-synced it with LLVM, and it seems harmless. We previously simplified FunctionRef because of an ARM baremetal toolchain issue around placement of a lambda (#555), but the current implementation has no lambda. Motivation: I want to be able to use it in the next PR in thread_parallel_interface.h (the "threadpool active" mode) and threadpool in order to save a ton of size that std::function is currently wasting by virtue of supporting ownership and copying.
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
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary: FunctionRef simplified - removing lambdas in constructor initializer list, to ensure runtime portability for embedded systems w/ C++11.
Differential Revision: D49798748