Skip to content

Reduce size of Method::parse_types #7603

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
Jan 11, 2025

Conversation

swolchok
Copy link
Contributor

@swolchok swolchok commented Jan 10, 2025

Stack from ghstack (oldest at bottom):

It looks like this function was big enough that inlining gave up, since I was seeing non-inlined calls to val_as_Foo() that should have been easily optimized away. Do said optimization manually.

Differential Revision: D68037113

It looks like this function was big enough that inlining gave up, since I was seeing non-inlined calls to val_as_Foo() that should have been easily optimized away. Do said optimization manually.

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

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Jan 10, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit 5162c92 with merge base e1c0bcf (image):

NEW FAILURE - The following job has failed:

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 10, 2025
swolchok pushed a commit that referenced this pull request Jan 10, 2025
It looks like this function was big enough that inlining gave up, since I was seeing non-inlined calls to val_as_Foo() that should have been easily optimized away. Do said optimization manually.

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

ghstack-source-id: 260959235
Pull Request resolved: #7603
@swolchok swolchok requested a review from dbort January 10, 2025 21:32
@facebook-github-bot
Copy link
Contributor

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

@swolchok swolchok requested a review from lucylq January 10, 2025 21:32
@swolchok swolchok added the release notes: runtime Changes related to the core runtime which loads the program methods, initializes delegates, and runs label Jan 10, 2025
Copy link
Contributor

@lucylq lucylq 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!

swolchok pushed a commit that referenced this pull request Jan 10, 2025
Apply the same technique as #7603 to Method::init

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

[ghstack-poisoned]
swolchok pushed a commit that referenced this pull request Jan 10, 2025
Apply the same technique as #7603 to Method::init

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

ghstack-source-id: 260974726
Pull Request resolved: #7608
@facebook-github-bot facebook-github-bot merged commit 6361ae5 into gh/swolchok/129/base Jan 11, 2025
44 of 49 checks passed
@facebook-github-bot facebook-github-bot deleted the gh/swolchok/129/head branch January 11, 2025 02:13
lucylq pushed a commit that referenced this pull request Jan 13, 2025
* add maybe_unused where needed in size_test.cpp

At least one internal build have -Werror -Wunused-variable and ExecuTorch logging disabled.

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

ghstack-source-id: 260945746
Pull Request resolved: #7602

* Reduce size of Method::parse_types

It looks like this function was big enough that inlining gave up, since I was seeing non-inlined calls to val_as_Foo() that should have been easily optimized away. Do said optimization manually.

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

ghstack-source-id: 260959235
Pull Request resolved: #7603

---------

Co-authored-by: Github Executorch <[email protected]>
kirklandsign pushed a commit that referenced this pull request Jan 21, 2025
Apply the same technique as #7603 to Method::init

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

ghstack-source-id: 260974726
Pull Request resolved: #7608

Co-authored-by: Github Executorch <[email protected]>
YIWENX14 pushed a commit that referenced this pull request Jan 28, 2025
* add maybe_unused where needed in size_test.cpp

At least one internal build have -Werror -Wunused-variable and ExecuTorch logging disabled.

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

ghstack-source-id: 260945746
Pull Request resolved: #7602

* Reduce size of Method::parse_types

It looks like this function was big enough that inlining gave up, since I was seeing non-inlined calls to val_as_Foo() that should have been easily optimized away. Do said optimization manually.

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

ghstack-source-id: 260959235
Pull Request resolved: #7603

---------

Co-authored-by: Github Executorch <[email protected]>
YIWENX14 pushed a commit that referenced this pull request Jan 28, 2025
Apply the same technique as #7603 to Method::init

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

ghstack-source-id: 260974726
Pull Request resolved: #7608

Co-authored-by: Github Executorch <[email protected]>
zonglinpeng pushed a commit to zonglinpeng/executorch that referenced this pull request Jan 30, 2025
Apply the same technique as pytorch#7603 to Method::init

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

ghstack-source-id: 260974726
Pull Request resolved: pytorch#7608

Co-authored-by: Github Executorch <[email protected]>
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: runtime Changes related to the core runtime which loads the program methods, initializes delegates, and runs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants