Skip to content

[Profiling] Add python scripts to generate per-op profiling from etdumps #13302

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mcr229
Copy link
Contributor

@mcr229 mcr229 commented Aug 11, 2025

I've been doing a lot of profiling out in open source, and that generally involves generating an etdump after running the model. I find this script very useful for generating a CSV of the per-op profiling numbers after getting an etdump. Currently the profiling flow looks like this for me:

# Build executor_runner with profiling enabled
cmake --preset profiling
cmake --build cmake-out --target executor_runner

# run and profile my model
./executor_runner --model_path="my_model" --etdump_path="path_to_et_dump"

# generate op profiling .csv from my last run
python devtools/scripts/generate_profiling_csv.py --etdump_path="path_to_et_dump" --output="op_profiling.csv"

This generates some nice CSVs for investigating the per-op profiling times. See some of the commits in this stack for profiling info.

mcr229 added 2 commits August 11, 2025 16:00
[ghstack-poisoned]
[ghstack-poisoned]
@mcr229
Copy link
Contributor Author

mcr229 commented Aug 11, 2025

@mcr229 mcr229 requested a review from Gasoonjia as a code owner August 11, 2025 23:00
Copy link

pytorch-bot bot commented Aug 11, 2025

🔗 Helpful Links

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

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

❌ 4 New Failures

As of commit 55d189a with merge base a84b3c9 (image):

NEW FAILURES - The following jobs have failed:

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

@meta-cla meta-cla 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 Aug 11, 2025
mcr229 added 4 commits August 11, 2025 16:49
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@Gasoonjia
Copy link
Contributor

LGTM. Thanks for adding scripts!

Please add some comments and/or a .md file demonstrating how to use your script

Base automatically changed from gh/mcr229/48/head to main August 12, 2025 22:35
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