-
Notifications
You must be signed in to change notification settings - Fork 497
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
Arm backend: Size Test for Cortex-M #9569
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/9569
Note: Links to docs will display an error until the docs builds have been completed. ❌ 5 New FailuresAs of commit 04c29f9 with merge base f174d55 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
364c2d6
to
e30bc7d
Compare
.github/scripts/run_nm.py
Outdated
sys.exit(1) | ||
|
||
def _get_nm_output(self) -> Dict[str, Symbol]: | ||
args = ["--print-size", "--size-sort", "--reverse-sort", "--demangle"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you might want to specify the format. it can differ between systems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added!
.github/scripts/run_nm.py
Outdated
symbol_pattern = re.compile( | ||
r"(?P<addr>[0-9a-fA-F]+)\s+(?P<size>[0-9a-fA-F]+)\s+(?P<type>\w)\s+(?P<name>.+)" | ||
) | ||
match = symbol_pattern.match(line) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as written, compiling this regex doesn't help. you'd need to store it somewhere that outlives a single call to this function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed by moving it up out of the function. Thanks.
@@ -0,0 +1,167 @@ | |||
# Copyright (c) Meta Platforms, Inc. and affiliates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps we could use bloaty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I did think about it. This is just nm
TBH so not sure if we need it to be more complicated than that. Wrote a python wrapper to print sorted table, and use cross-tools. But bloaty
is nice though a bit "bloated" with dependency etc.
74b8c59
to
e3d5815
Compare
Could not find ET installation when cross-compiling.
It should be more in line with Arm Core Platform and TFLite Micro builds.
Prints useful tables about binary size. TODO: expand it to parse linker map and also dump module, objects, and section names with a given symbol.
Just getting started. We will build on top of this.
e3d5815
to
04c29f9
Compare
Summary
Add size test for cortex-M and add it in the CI