Skip to content

Conversation

swolchok
Copy link
Contributor

This seems to improve code size. Comparing output of test/build_optimized_size_test.sh before/after this change:

(I've edited out the unchanged "no ops" test case.)

before:

ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  2004816 Jun 26 14:02 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
1441792	65536	0	4295524352	4297031680	1001f8000
ExecuTorch with optimized ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  6746968 Jun 26 14:02 cmake-out/test/size_test_all_optimized_ops
__TEXT	__DATA	__OBJC	others	dec	hex
4947968	65536	0	4296753152	4301766656	10067c000

after:

ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  1989392 Jun 26 14:37 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
1425408	65536	0	4295524352	4297015296	1001f4000
ExecuTorch with optimized ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  6731784 Jun 26 14:37 cmake-out/test/size_test_all_optimized_ops
__TEXT	__DATA	__OBJC	others	dec	hex
4931584	65536	0	4296753152	4301750272	100678000

for test/build_size_test.sh, we see a smaller improvment which is reflected in the file sizes but not the size command output, probably because the latter is rounded up to the next page:

before:

ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  2696640 Jun 26 13:44 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
2162688	65536	0	4295491584	4297719808	1002a0000

after:

ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  2695344 Jun 26 14:33 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
2162688	65536	0	4295491584	4297719808	1002a0000

[ghstack-poisoned]
@swolchok swolchok requested a review from manuelcandales as a code owner June 26, 2025 21:42
Copy link

pytorch-bot bot commented Jun 26, 2025

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 3 New Failures, 1 Unrelated Failure

As of commit 9f740d9 with merge base 8bc99d3 (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

swolchok added a commit that referenced this pull request Jun 26, 2025
This seems to improve code size. Comparing output of test/build_optimized_size_test.sh before/after this change:

(I've edited out the unchanged "no ops" test case.)

before:
```
ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  2004816 Jun 26 14:02 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
1441792	65536	0	4295524352	4297031680	1001f8000
ExecuTorch with optimized ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  6746968 Jun 26 14:02 cmake-out/test/size_test_all_optimized_ops
__TEXT	__DATA	__OBJC	others	dec	hex
4947968	65536	0	4296753152	4301766656	10067c000
```

after:
```
ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  1989392 Jun 26 14:37 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
1425408	65536	0	4295524352	4297015296	1001f4000
ExecuTorch with optimized ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  6731784 Jun 26 14:37 cmake-out/test/size_test_all_optimized_ops
__TEXT	__DATA	__OBJC	others	dec	hex
4931584	65536	0	4296753152	4301750272	100678000
```

for test/build_size_test.sh, we see a smaller improvment which is reflected in the file sizes but not the `size` command output, probably because the latter is rounded up to the next page:

before:
```
ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  2696640 Jun 26 13:44 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
2162688	65536	0	4295491584	4297719808	1002a0000
```

after:
```
ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  2695344 Jun 26 14:33 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
2162688	65536	0	4295491584	4297719808	1002a0000
```


ghstack-source-id: 249444e
ghstack-comment-id: 3010230941
Pull-Request-resolved: #12031
@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 Jun 26, 2025
[ghstack-poisoned]
swolchok added a commit that referenced this pull request Jun 26, 2025
This seems to improve code size. Comparing output of test/build_optimized_size_test.sh before/after this change:

(I've edited out the unchanged "no ops" test case.)

before:
```
ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  2004816 Jun 26 14:02 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
1441792	65536	0	4295524352	4297031680	1001f8000
ExecuTorch with optimized ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  6746968 Jun 26 14:02 cmake-out/test/size_test_all_optimized_ops
__TEXT	__DATA	__OBJC	others	dec	hex
4947968	65536	0	4296753152	4301766656	10067c000
```

after:
```
ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  1989392 Jun 26 14:37 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
1425408	65536	0	4295524352	4297015296	1001f4000
ExecuTorch with optimized ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  6731784 Jun 26 14:37 cmake-out/test/size_test_all_optimized_ops
__TEXT	__DATA	__OBJC	others	dec	hex
4931584	65536	0	4296753152	4301750272	100678000
```

for test/build_size_test.sh, we see a smaller improvment which is reflected in the file sizes but not the `size` command output, probably because the latter is rounded up to the next page:

before:
```
ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  2696640 Jun 26 13:44 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
2162688	65536	0	4295491584	4297719808	1002a0000
```

after:
```
ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  2695344 Jun 26 14:33 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
2162688	65536	0	4295491584	4297719808	1002a0000
```


ghstack-source-id: 6ac1c77
ghstack-comment-id: 3010230941
Pull-Request-resolved: #12031
[ghstack-poisoned]
swolchok added a commit that referenced this pull request Jun 27, 2025
This seems to improve code size. Comparing output of test/build_optimized_size_test.sh before/after this change:

(I've edited out the unchanged "no ops" test case.)

before:
```
ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  2004816 Jun 26 14:02 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
1441792	65536	0	4295524352	4297031680	1001f8000
ExecuTorch with optimized ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  6746968 Jun 26 14:02 cmake-out/test/size_test_all_optimized_ops
__TEXT	__DATA	__OBJC	others	dec	hex
4947968	65536	0	4296753152	4301766656	10067c000
```

after:
```
ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  1989392 Jun 26 14:37 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
1425408	65536	0	4295524352	4297015296	1001f4000
ExecuTorch with optimized ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  6731784 Jun 26 14:37 cmake-out/test/size_test_all_optimized_ops
__TEXT	__DATA	__OBJC	others	dec	hex
4931584	65536	0	4296753152	4301750272	100678000
```

for test/build_size_test.sh, we see a smaller improvment which is reflected in the file sizes but not the `size` command output, probably because the latter is rounded up to the next page:

before:
```
ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  2696640 Jun 26 13:44 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
2162688	65536	0	4295491584	4297719808	1002a0000
```

after:
```
ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  2695344 Jun 26 14:33 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
2162688	65536	0	4295491584	4297719808	1002a0000
```


ghstack-source-id: f5eed37
ghstack-comment-id: 3010230941
Pull-Request-resolved: #12031
swolchok added a commit that referenced this pull request Jun 27, 2025
This seems to improve code size. Comparing output of test/build_optimized_size_test.sh before/after this change:

(I've edited out the unchanged "no ops" test case.)

before:
```
ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  2004816 Jun 26 14:02 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
1441792	65536	0	4295524352	4297031680	1001f8000
ExecuTorch with optimized ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  6746968 Jun 26 14:02 cmake-out/test/size_test_all_optimized_ops
__TEXT	__DATA	__OBJC	others	dec	hex
4947968	65536	0	4296753152	4301766656	10067c000
```

after:
```
ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  1989392 Jun 26 14:37 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
1425408	65536	0	4295524352	4297015296	1001f4000
ExecuTorch with optimized ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  6731784 Jun 26 14:37 cmake-out/test/size_test_all_optimized_ops
__TEXT	__DATA	__OBJC	others	dec	hex
4931584	65536	0	4296753152	4301750272	100678000
```

for test/build_size_test.sh, we see a smaller improvment which is reflected in the file sizes but not the `size` command output, probably because the latter is rounded up to the next page:

before:
```
ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  2696640 Jun 26 13:44 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
2162688	65536	0	4295491584	4297719808	1002a0000
```

after:
```
ExecuTorch with portable ops binary size, unstripped:
-rwxr-xr-x  1 swolchok  staff  2695344 Jun 26 14:33 cmake-out/test/size_test_all_ops
__TEXT	__DATA	__OBJC	others	dec	hex
2162688	65536	0	4295491584	4297719808	1002a0000
```


ghstack-source-id: 7c5516f
ghstack-comment-id: 3010230941
Pull-Request-resolved: #12031
@swolchok
Copy link
Contributor Author

this now looks like a regression to me

@swolchok swolchok closed this Jun 28, 2025
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants