Skip to content

Add event tracing and ETDumps to executor_runner #4502

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

Conversation

benkli01
Copy link
Collaborator

@benkli01 benkli01 commented Aug 1, 2024

  • Enabled via EXECUTORCH_ENABLE_EVENT_TRACER
  • Add flag 'etdump_path' to specify the file path for the ETDump file
  • Add flag 'num_executions' for number of iterations to run
  • Create and pass event tracer 'ETDumpGen'
  • Save ETDump to disk
  • Update docs to reflect the changes

- Enabled via EXECUTORCH_ENABLE_EVENT_TRACER
- Add flag 'etdump_path' to specify the file path for the ETDump file
- Add flag 'num_executions' for number of iterations to run
- Create and pass event tracer 'ETDumpGen'
- Save ETDump to disk
- Update docs to reflect the changes

Signed-off-by: Benjamin Klimczak <[email protected]>
Change-Id: I876d5138455d1b04fba9af4016d8341e8866f9c0
Copy link

pytorch-bot bot commented Aug 1, 2024

🔗 Helpful Links

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

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

❌ 2 New Failures

As of commit 50b711e with merge base 6c69ebd (image):

NEW FAILURES - The following jobs have 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 Aug 1, 2024
Copy link

pytorch-bot bot commented Aug 1, 2024

Didn't find following labels among repository labels: partner:arm

@benkli01
Copy link
Collaborator Author

benkli01 commented Aug 1, 2024

@pytorchbot label 'partner: arm'

@pytorch-bot pytorch-bot bot added the partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm label Aug 1, 2024
@benkli01
Copy link
Collaborator Author

The failing test looks unrelated to my changes.

Copy link
Contributor

@digantdesai digantdesai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Left some comments. I assume you tried running this with both portable and XNNPACK, with and without this flag and it works OK?

Do you want to add a test with this flag enabled just so we can catch any build issues in this part of the logic?

@facebook-github-bot
Copy link
Contributor

@digantdesai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@digantdesai digantdesai added the module: xnnpack Issues related to xnnpack delegation and the code under backends/xnnpack/ label Aug 13, 2024
- Make flag 'num_executions' available in the executor_runner
  irrespective of the event tracing
- Update docs to explain usage of 'ENABLE_XNNPACK_PROFILING' for
  additional profiling info

Signed-off-by: Benjamin Klimczak <[email protected]>
Change-Id: I35abbd2d913880cb129bddb80514992f4dd84004
@benkli01
Copy link
Collaborator Author

Thanks for the review @digantdesai ! I pushed a patch with some changes.

I assume you tried running this with both portable and XNNPACK, with and without this flag and it works OK?

Yes, I didn't see any problems.

Do you want to add a test with this flag enabled just so we can catch any build issues in this part of the logic?

Sure. Where would you add this test? I haven't found an obvious place.

@benkli01 benkli01 requested a review from digantdesai August 14, 2024 13:15
@facebook-github-bot
Copy link
Contributor

@digantdesai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot merged commit 35da5bf into pytorch:main Aug 15, 2024
33 of 36 checks passed
kirklandsign pushed a commit to kirklandsign/executorch that referenced this pull request Aug 15, 2024
Differential Revision: D61211201

Pull Request resolved: pytorch#4502
@GregoryComer
Copy link
Member

Hey @benkli01, I ended up needing to back out this change due to it breaking the test-llama-runner-qnn-linux job (see https://github.com/pytorch/executorch/actions/runs/10398365231/job/28795542762). I apologize for the inconvenience, it didn't get caught on the PR. I'm happy to help re-land this, as this is a change that we want to keep. Thanks.

@digantdesai
Copy link
Contributor

cc @cccclai

@digantdesai digantdesai added the module: qnn Issues related to Qualcomm's QNN delegate and code under backends/qualcomm/ label Nov 26, 2024
Copy link

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@benkli01
Copy link
Collaborator Author

Re-opened with #5027 as this change was reverted.

@benkli01 benkli01 deleted the add-profiling-to-xnn-executor-runner branch January 10, 2025 15:00
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. module: qnn Issues related to Qualcomm's QNN delegate and code under backends/qualcomm/ module: xnnpack Issues related to xnnpack delegation and the code under backends/xnnpack/ partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants